Repository navigation
Contain sample scrolling and refine expanded progress messages - #2219
Merged
Merged
Conversation
leaf-agent
approved these changes
Oct 10, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 11, 2026
…behind "1 new reply" (#2294) A Codex reply now streams into an open thread card as the agent writes it, and the agent's answer completes that same message in place. Before, an idle open card showed an empty agent bubble behind "1 new reply" until the user pressed it, and held the answer again as an edit. Since #1926 the agent's first move is a progress acknowledgement, so nearly every answer folds progress or completes a streaming placeholder, and the card's hold on changes to existing messages held almost all of them. Journey runs (#2144) showed the notice on every Codex reply. ### What changes - **One name for a reply and its answer.** The server adds a streaming reply to its thread once it has words, and draws it and the input's first answer under one key, `response:<input>` (`served_state/thread.py`). The browser draws a message under that key (`messageKey`, `thread/model.js`), so the answer completes the stream rather than arriving as a second message. `thread.is_answer` is the one rule for what counts as an answer, so a failure receipt keeps its own name; a second answer in the log keeps its own id. - **Held news reads a stream as arrival** (`thread/held-news.js`). Words joining a streaming reply, and its answer completing it, are the reply arriving, not an edit. An answer folding the progress run at the thread's end shows at once in an idle open card (`footFold`), unless the reader stands in that progress by focus or selection. Notices now say "new reply", "new message" (the user's own, from another tab) or "message edited". - **Where the user stands is read once** (`focus.js`, `standingNodes`/`standsOn`): focus, then the selection's ends. `standingPlace` and the held-arrival lapse use it. - **A message sent while the agent streams** goes above the streaming reply, so its acceptance moves nothing. - **An open progress group draws its border around its messages** rather than padding them in (`styles/components/surfaces.css`). With #2219's inset padding, the fold above moved the words the reader was on 13px right and 11px down. Its messages now line up with the rest of the transcript; the group otherwise looks as before. - **Journey timing** records when the reply's own message came into view (`responseMessageVisible`), apart from its row or notice. ### Testing Eight new browser journeys in `tests/test_render_threads.py` cover streaming into an open card, a held card counting the stream once, a send during a stream, an answer completing its stream with the same words, the foot fold under the shift watch, a selection holding the fold, and no change above the fold. Runtime tests, the fold-related render tests, and the thread appearance snapshots pass locally. Real `codex-app-server --browser` and `claude-code --browser` journeys showed no notice at any step, with the stream visible about 2.1–2.4 s after send. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Embedded conversation samples could move the containing page when navigating, expanding progress, or editing a long reply. Move the existing overflow-reveal operation into the shared document-bounded scrolling API and migrate runtime/widget callers, preserving current main's header clearance and short-item visibility. Host-driven sample changes also keep keyboard focus with the host control.
Apply the selected inset border to expanded progress groups, retaining ordinary sender headers and the normal background. Clarify the intermediate Escape destination as “back to element”.
Add
leaf page interactions PAGEto read existing browser/request diagnostics with session, time and type filters, retry deduplication, multipart reconstruction and visible gap diagnostics. This makes the interaction evidence used to diagnose these journeys available through the CLI.Review removed the broader document-lifetime cancellation changes because real browser navigation, loading iframe removal and BFCache recovery were not sufficiently established. TODO.md records that investigation.
Validation: independent integrated code review and eight focused browser journeys; 288 runtime tests; browser framework checks; lint; reproducible bundles; macOS message screenshot suite (11 passed, 1 platform skip); interaction-reader and CLI checks. Full landing coverage runs in CI.