web: steady chat composer and running indicator

Keep caret focus, value and selection across live-frame re-renders, and show a
single in-place running-tool line so tool calls no longer grow and shrink the
transcript for every call. Right-align the pipeline-list miniature.
This commit is contained in:
2026-10-20 03:29:37 +01:00
parent c291327610
commit d5cda887ee
4 changed files with 91 additions and 14 deletions
+1
View File
@@ -165,6 +165,7 @@ to it, but the server never lists it and a reload drops it.
| B2 | Pipeline list mini graph | `list_pipelines` (`shape`) | done — each summary now carries the current version's parsed graph as `shape`; the browser draws a label-free miniature from the real `layoutGraph` with terminal-free stage routes. The row shows the name, the shape and only `{N stages}`; the cryptic `id {n} · v{n} · …` line is gone. Verified at 390×844 against the live server: 9 rows, 9 miniatures, and the detail still owns the full Graph tab. Additive field; older clients ignore it. |
| B3 | Equal phone dock cells | — | done — the narrow dock is a four-cell grid (one cell per destination plus Search) with a subgrid for the tablist, so every control has the same width and height. At 390×844 the measured widths are 92/92/92/92 and the row is 48px high. The phone shell uses `100svh` so a browser toolbar cannot hide the tab row while leaving only the Connected/Settings status row visible. |
| B4 | Full-height pipeline Source | — | done — the Source block no longer caps itself at `60vh`; it is as tall as its content and the detail pane owns the scroll. Verified at 390×844: a 4386px definition sits in the full pane (656px viewport) and scrolls. |
| B8 | Composer keeps focus and the running line stays stable | — | done — a live frame re-renders the transcript, so the composer now captures and restores its focus, value and selection (verified in a real browser: a synthetic `chat_event` arrived while the caret sat at 8–14 and the input stayed focused with the same value/selection). The running indicator is one ellipsised line that updates in place for the longest-running tool instead of adding/removing a line per call; measured height stayed 52px across tool start/finish until the step ended. Pipeline-list miniatures are right-aligned at the row's trailing edge. |
| B7 | Chat detail is a real history entry with a compact Back | `/chat/:id` | done — opening a session pushes `/chat/:id`, so Android's back gesture/browser Back returns to the chat list instead of the previous destination. The conversation header now owns a 32px back control matching the create pane (the full-width "Back to list" row is gone for chat; it remains on the other detail panes). Verified at 390×844: the header control reads `Back to chats`, the URL changes to `/chat/ses_…`, pressing it returns to `/chat` with the list restored, and `history.back()` from a reopened chat does the same. |
| B6 | Agent questions are answerable in the browser | `chat_event` (`form`), `chat_answer` | done — OpenCode's question tool pauses inside a `form.created` event; the broker now maps `form.created` / `form.replied` / `form.cancelled` to a `form` chat_event, the browser renders a question card with the form's options and free-text fields, and `chat_answer` posts the field-keyed answer to `/api/session/{id}/form/{id}/reply`. A question for a backgrounded chat also raises the existing browser notification. Verified end to end with a real model turn: the card appeared with a `Demo colour` field, selecting Red and pressing `Send answer` cleared it and the same turn completed with "You chose Red for the demo."; the OpenCode form normalizer is unit-tested. |
| B5 | Sign-in reaches the app, and stays signed in | — | done — a successful `POST /login` redirects to the requested path; a fresh browser with no saved endpoint now connects to its own origin instead of stopping on Settings/"Not configured". The session cookie is `SameSite=Lax` (a Strict cookie was withheld when the installed app or another app opened the page) and carries both `Max-Age` and `Expires` for Remember me. Verified in headless Chrome: login with `next=/pipelines` reached the connected list, and a closed/reopened page stayed signed in with no local endpoint. **iOS Safari/PWA itself was not directly exercised**, so the toolbar/cookie fixes are targeted at that report rather than claimed as device-verified. |