Merge lane-retry: re-verify the chat record at ec27a2d

Combine the chat end-to-end verification record update (revision, APK
artifact, test totals and the 3ffc126..ec27a2d chat-surface delta) into main.
Docs-only; no behaviour change.
This commit is contained in:
2026-10-17 20:56:01 +01:00
+54 -19
View File
@@ -36,20 +36,22 @@ failures.
## Revision and build
- **Run directory HEAD: `3ffc126`.** `git rev-parse --short HEAD` = `3ffc126`
and `git rev-parse --short main` = `3ffc126`, so this lane is **at main** (not
behind it). The operator checkout's main is also `3ffc126`
- **Run directory HEAD: `ec27a2d`.** `git rev-parse --short HEAD` = `ec27a2d`
and `git rev-parse --short main` = `ec27a2d`, so this lane is **at main** (not
behind it). The operator checkout's main is also `ec27a2d`
(`git -C /Users/alan/repos/pipelines rev-parse --short main`). **No feature of
main is absent from the build reviewed here** — this is main's build.
main is absent from the build reviewed here** — this is main's build. This
record supersedes the first one (`3ffc126`); the chat-relevant deltas between
the two are listed under "Changes since the previous record".
- **Server reachable.** `curl -s http://10.0.0.75:8080/healthz` →
`{"healthy":true}`. The phone's own connection to it is the visual reviewer's
to confirm.
- **APK published** as `pipelines-debug-wip-3ffc126.apk`
(18,552,316 bytes, sha256
`5289b4f3d5dc6f9fd587e1e5decf075246b0e82b6fd7255335f2e27a2895aab7`), served at
**http://10.0.0.75:8080/artifacts/298/1/pipelines-debug-wip-3ffc126.apk**
- **APK published** as `pipelines-debug-wip-ec27a2d.apk`
(18,585,084 bytes, sha256
`5ee4b38ca3557fedf4d659a8c6f3ada9afc083e883acc034f6238e09abdcda84`), served at
**http://10.0.0.75:8080/artifacts/315/1/pipelines-debug-wip-ec27a2d.apk**
(`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 18552316`).
`Content-Length: 18585084`).
### Commands and observed output
@@ -59,20 +61,19 @@ Gradle `~/.gradle/wrapper/dists/gradle-8.11.1-bin/bpt9gzteqjrbo1mjrsomdt32c/grad
Every command used `--no-daemon` as the brief requires.
```
gradle --offline --no-daemon --console=plain :app:testDebugUnitTest
→ BUILD SUCCESSFUL in 5s (41 tasks up-to-date, from the warm build)
gradle --offline --no-daemon --console=plain :app:testDebugUnitTest --rerun-tasks
→ BUILD SUCCESSFUL in 22s; testDebugUnitTest executed (22 tasks executed)
→ BUILD SUCCESSFUL in 25s (22 actionable tasks: 22 executed)
gradle --offline --no-daemon --console=plain :app:assembleDebug --rerun-tasks
→ BUILD SUCCESSFUL in 25s; app-debug.apk 18,552,316 bytes,
sha256 5289b4f3…aab7 (byte-for-byte identical to the non-forced package)
→ BUILD SUCCESSFUL in 25s (35 actionable tasks: 35 executed);
app-debug.apk 18,585,084 bytes,
sha256 5ee4b38ca3557fedf4d659a8c6f3ada9afc083e883acc034f6238e09abdcda84
```
The unit-test JUnit XMLs under
`android/app/build/test-results/testDebugUnitTest/` aggregate to:
```
60 suites / 545 tests / 0 failures / 0 errors / 0 skipped
61 suites / 558 tests / 0 failures / 0 errors / 0 skipped
```
with the chat suites green: `ChatProtocolTest`, `ChatStreamTest`,
@@ -82,6 +83,40 @@ with the chat suites green: `ChatProtocolTest`, `ChatStreamTest`,
`ChatAttachmentTest`, `ChatAttachmentStateTest`, `MarkdownTest`,
`ToolPanelPositionProviderTest`.
The server side builds and its chat-related Go tests pass too: `go build ./...`
(BUILD_EXIT=0) and `go test ./internal/server/ ./internal/opencode/
./internal/protocol/ ./internal/cli/ -run 'Chat|Session|Adopt' -count=1` → all
four packages `ok`, including `TestChatAdoptRecordsEndpointSession` and
`TestCLIChatAdoptSendsOneRequest` (both `--- PASS`).
## Changes since the previous record (`3ffc126` → `ec27a2d`)
The previous record was written at `3ffc126`; this revision re-verifies at
`ec27a2d`. `git diff 3ffc126..HEAD` touches the chat surface in only these ways,
so the per-flow map below still holds:
- **`internal/server/chat.go`, `internal/opencode/chat.go`,
`internal/protocol/chat.go`: a new `chat_adopt` request** records a session
that already exists on the operator's own OpenCode endpoint (its directory and
title verbatim, never guessed) into the operator-session registry, so it
appears in `chat_sessions` and can be continued. It is covered by
`internal/server/chat_test.go` `TestChatAdoptRecordsEndpointSession` and
`internal/cli/chat_adopt_test.go` `TestCLIChatAdoptSendsOneRequest`, and it is a
**CLI** flow (`internal/cli/app.go`, `chat-adopt`); the app has no adopt control,
so no phone flow in this brief is affected. It adds no model catalogue, so the
"model choice" gap below stands.
- **`ui/chat/Markdown.kt`: a lazy `MarkdownBlocks` renderer** (parses once,
composes only the blocks on screen) for large exported documents in the run
view. It reuses chat's single `MarkdownBlock` renderer, so chat rendering is
unchanged.
- **`ui/AppViewModel.kt` run-watch scope** now subscribes to every workspace (the
blank scope) rather than the configured one. That is the run list, not chat;
the chat re-sync on the connected edge is untouched.
- **Path correction.** The previous record named the chat protocol file
`ChatProtocol.kt`; the file is
`android/app/src/main/java/net/awan/pipelines/data/protocol/Chat.kt`, and the
table below now says so.
## Per-flow table
`Result` keys: **Pass (unit)** — the flow's logic is pinned by an executed,
@@ -94,18 +129,18 @@ device captures will be added by the visual reviewer.
| --- | --- | --- | --- |
| Create — directory picker, home first + a recent | Pass (unit); device — visual review | `android/app/src/main/java/net/awan/pipelines/ui/chat/ChatDirectories.kt`, `ChatCreatePane.kt`; `android/app/src/test/java/net/awan/pipelines/ui/chat/ChatDirectoriesTest.kt` | `directoryChoices` puts the home first and keeps the server's recents order; `ChatDirectoriesTest.homeIsFirstAndIsTheDefaultChoice`, `recentsKeepTheServersOrderAndCreateInTheirFullPath`, `anEmptyOrBlankReplyStillYieldsTheHomeChoice`. On-screen picker not captured here. |
| Create — the model choice | Gap (server) | `ChatCreatePane.kt` (the note at the create footer); `ChatFormatTest.chatHeaderMeta*` | No `chat_models`/`chat_agents` request exists and `chat_prompt` drops `model`/`agent`, so the flow says so plainly and shows only the model the server reports. Needs the server catalogue to exist before it can be verified. |
| Create — session appears tagged `Operator` | Pass (unit); device — visual review | `ChatProtocol.kt` (`ChatSession.tag`, `TAG_OPERATOR`), `ChatFormat.kt` `sessionTagLabel`; `ChatSessionManagementTest.theKindChipComesFromTheServersOwnTag`, `ChatProtocolTest.chatSessionsCarryTheServersOwnKindTag` | The chip label derives from the server's own `tag`; an older server omitting it shows no chip. |
| Create — session appears tagged `Operator` | Pass (unit); device — visual review | `data/protocol/Chat.kt` (`ChatSession.tag`, `TAG_OPERATOR`), `ChatFormat.kt` `sessionTagLabel`; `ChatSessionManagementTest.theKindChipComesFromTheServersOwnTag`, `ChatProtocolTest.chatSessionsCarryTheServersOwnKindTag` | The chip label derives from the server's own `tag`; an older server omitting it shows no chip. |
| List — recency order | Pass (unit); device — visual review | `ChatListPane.kt`; `ChatListFilter.kt`; `ChatListFilterTest.filteringKeepsTheRecencyOrderOfTheSurvivors` | The list is the server's order (MRU first, `internal/server/chat.go` `handleChatSessions`); the app never re-sorts it, only narrows. |
| List — activity marks | Pass (unit); device — visual review | `ChatListPane.kt` `SessionActivityBadge`; `ChatSeen.kt`; `ChatFormat.kt` `sessionActivity`; `ChatActivityTest` (5 cases) | Streaming / New / Open derivations pinned; distinct from each other and from idle. |
| List — search and filter | Pass (unit); device — visual review | `ChatListPane.kt` `ChatListSearchControl`; `ChatListFilter.kt`; `ChatListFilterTest` (9) | Case-insensitive over title and directory; blank matches all; survivors keep order; the create action is never hidden. |
| List — rename and remove | Pass (unit); device — visual review | `ChatListPane.kt`; `ChatStore.kt` `rename`/`remove`/`undoRemove`; `ChatSessionManagementTest.rename*`, `remove*`, `overrides*` | Both are local and honest (no server rename/delete); removal is undoable and the dialog says so. |
| List — no pipeline run session ever appears | Pass (unit + server source); device — visual review | `internal/server/chat.go` `handleChatSessions` (lists `registry.OperatorSessions` only); `ChatStore.kt` `visibleSessions`; `ChatSessionManagementTest.theListShowsTheServersSessionsVerbatimWhenNothingIsOverridden` | The server filters to operator sessions; the app performs no guessing. The brief's on-phone confirmation with real runs present is the visual reviewer's. |
| Conversation — sending a prompt | Pass (unit); device — visual review | `AppViewModel.kt` `sendChatPrompt`; `ChatProtocol.kt` `promptRequest`; `ChatProtocolTest.chatPromptRequestCarriesTheAttachedFileUris`, `chatRequestsRoundTripTheirBodies`; `ChatAttachmentStateTest.sendingClearsTheAttachmentsAndStillShowsThemOnTheOptimisticTurn` | Optimistic user turn; the wire shape is pinned. |
| Conversation — sending a prompt | Pass (unit); device — visual review | `AppViewModel.kt` `sendChatPrompt`; `data/protocol/Chat.kt` `promptRequest`; `ChatProtocolTest.chatPromptRequestCarriesTheAttachedFileUris`, `chatRequestsRoundTripTheirBodies`; `ChatAttachmentStateTest.sendingClearsTheAttachmentsAndStillShowsThemOnTheOptimisticTurn` | Optimistic user turn; the wire shape is pinned. |
| Conversation — streaming reply arriving | Pass (unit); device — visual review | `ChatStore.kt` `applyDelta`/`upsertPart`; `ChatStreamTest.deltaSequenceGrowsRenderedTextAndTogglesRunning`; `ChatProtocolTest.chatEventDeltaCarriesTheTargetPartAndText` | Deltas grow the part and mark the thread running. |
| Conversation — tool chip expanding | Partial (position logic only); device — visual review | `ChatToolCalls.kt`; `ToolPanelPositionProviderTest` (3); `ChatFormatTest.prettyToolInput*` | The chip/panel tap, the popup overlay and the INPUT/OUTPUT/ERROR blocks are rendering that needs the device; the placement maths and the input formatting are pinned. |
| Conversation — diff card | Partial (diff logic); device — visual review | `ChatDiffCard.kt`; `ChatFormatTest.toolEditDiff*` (3), `toolEditDiffSummarisesAnOversizedEditInsteadOfRenderingEveryLine` | `+N -M` counts, line kinds and the oversized summary are pinned; the rendered card is the visual reviewer's. |
| Conversation — approval once / always / rejected | Pass (unit); device — visual review | `ChatApprovalCard.kt`; `ChatProtocol.kt` `replyRequest`; `ChatApprovalTest` (10) | The three decisions' wire values, the in-place settle, the server-resolved card and the failed-reply reopen are pinned. |
| Conversation — stopping a turn mid-stream | Pass (unit, wire); device — visual review | `AppViewModel.kt` `stopChat`; `ChatProtocol.kt` `interruptRequest`; `ChatProtocolTest.chatInterruptRequestCarriesTheRunningSession` | The interrupt frame is pinned; the Stop control's live behaviour needs the device. |
| Conversation — approval once / always / rejected | Pass (unit); device — visual review | `ChatApprovalCard.kt`; `data/protocol/Chat.kt` `replyRequest`; `ChatApprovalTest` (10) | The three decisions' wire values, the in-place settle, the server-resolved card and the failed-reply reopen are pinned. |
| Conversation — stopping a turn mid-stream | Pass (unit, wire); device — visual review | `AppViewModel.kt` `stopChat`; `data/protocol/Chat.kt` `interruptRequest`; `ChatProtocolTest.chatInterruptRequestCarriesTheRunningSession` | The interrupt frame is pinned; the Stop control's live behaviour needs the device. |
| Switching — two sessions, transcript + scroll each | Pass (unit); device — visual review | `ChatStore.kt` `open`/`activate`/`showList`; `MultiChatStateTest.switchingPreservesEachConversation`, `scrollPositionIsPerChat`, `draftsArePerChat` | Each open chat keeps messages, draft and scroll; a running chat re-syncs on return. |
| Scroll — opens at the newest message | Pass (unit); device — visual review | `ChatScroll.kt`; `ChatTranscript.kt` placement; `ChatScrollTest.aFreshConversationOpensAtItsNewestMessage`, `anItemAppendedPastTheFoldHasNoMeasurableGapSoItMustBeBroughtIntoView` | A chat with no saved position lands on its newest item, instantly (no animation). |
| Scroll — following while at the bottom | Pass (unit); device — visual review | `ChatTranscript.kt` follow effect; `ChatScrollTest.theFollowResumesAtTheBottomAndWithinTheThreshold`, `theFollowMeasuresAgainstTheContentNotTheLayoutThatStillLagsIt`; `Dimens.kt` `CHAT_FOLLOW_THRESHOLD_DP` (32dp) | Every arrival (message, delta, tool chip, grown composer, IME) follows while following. |