Repository navigation
fix(ui): group chat position markers by assistant run - #143296
vyctorbrzezowski merged 3 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 4:07 PM ET / 20:07 UTC (Revision 7). ClawSweeper reviewWhat this changesThe Control UI groups assistant responses into one navigation marker per run, preserves streaming marker identity, and aligns previews, highlights, and jumps with displayed responses. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still lacks run-level marker aggregation. No blocking correctness or security defect was found, and the inspected visual evidence supports the change. The broader related navigation request remains separate. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI projects loaded chat history and streaming responses into a virtualized transcript. Its position rail uses that projection to preview messages, track reading position, and navigate through the existing scroll owner. flowchart LR
A[Loaded history] --> C[Transcript grouping]
B[Streaming responses] --> C
C --> D[Visible messages and run identities]
D --> E[Position rail]
E --> F[Latest response preview]
E --> G[Transcript scroll owner]
G --> H[Highlighted message]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +175, Tests +502, Docs 0. Total +677 across 30 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep marker identity derived from canonical transcript runs and navigation within the existing virtualizer, with complete-session indexing handled separately. Do we have a high-confidence way to reproduce the issue? Yes, from source: loaded history beginning mid-run can produce multiple assistant landmarks across tool-separated groups. The focused regression exercises that path; this review did not execute it. Is this the best way to solve the issue? Yes. The patch derives one index from prepared transcript visibility and uses the existing scroll owner, avoiding competing grouping or navigation implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a2b2391e3538. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
961bc09 to
2005d2a
Compare
daa88dd to
66e5834
Compare
66e5834 to
aae730b
Compare
aae730b to
a2eea3b
Compare
|
Merged via squash.
|
* fix(ui): group chat position markers by assistant run * fix(ui): reuse prepared visibility for chat position markers * test(ui): cover provisional rail target reconciliation
Related: #143290
What Problem This Solves
Fixes an issue where users navigating the chat position rail would see several markers for one assistant run when the loaded history starts after that run's user message. A run with three responses separated by tool calls could appear three times. The current marker could also disappear while reading a later response in the same run.
Why This Change Was Made
The rail now keeps one marker per visible user message and one per assistant run. It uses the first displayed response as the jump target and the latest displayed response for the preview. Tool calls, results, thinking, and status alone create no marker. A streaming marker keeps its identity and focus when the response is saved; an empty failed run creates no marker.
The marker index reuses visibility prepared by transcript grouping, avoiding repeated normalization of loaded history. All visible responses in a run contribute to its current-position highlight. Message jumps replace the virtualizer's row target with the selected bubble's position, so returning from a long continuation reaches the first response reliably. This builds on the compact rail in #142227 by @vyctorbrzezowski.
User Impact
Users can navigate questions and assistant runs without duplicate tool-related entries, keep their place through long responses, and retain user/assistant previews, assistant image previews, and shared-participant attribution.
Evidence
2d87daf04b78992382299d552f15ac84a86a23ed, reconciling fix(ui): avoid extra chat rail work while replies stream #146883 by @vincentkoc with assistant-run grouping. The native mutation observer ignores streamed text edits and still reconciles mounted, removed, and renamed bubble targets, including provisional stream messages.checks-node-compact-large-16, atsrc/agents/cli-runner/execute-plugin-native-bash.test.ts:50(applies allowlist/on-miss to native Bash with configured PATH), receivingdenyinstead ofallow. The failing test and its agent/infra owners are outside this PR's diff. This was classified as an external runner/PATH failure; the single rerun of failed jobs passed on the unchanged head. The exact-head watcher finished GREEN, and the CI workflow completed successfully. No assertion, timeout, or baseline was changed.Risk and coverage
Grouping relies on the transcript's canonical run identity. Messages without it retain the existing transcript grouping. The rail indexes loaded history; fetching a session-wide index remains separate work. Folded work is excluded from jump targets until expanded. No production Gateway session was accessed; proof uses the actual transcript model and mocked Gateway flows. Mobile visibility and existing rail styling remain unchanged.
The shared display helper's consumers were checked by name: transcript grouping, transcript Markdown rendering, rail previews, New Session draft previews, and Custodian messages. Grouping, Markdown, and rail behavior have focused automated coverage; the New Session and Custodian call-site migrations were inspected in source. The transcript cache compares the prepared visibility fact, and the session virtualizer remains the scrolling owner. No new visual captures were produced during the rebase. The related issue #143290 also requests user-only markers and complete-session indexing; those remain separate from this PR's stated run-grouping fix.
The shared scroll owner also serves Reply to an already loaded source (
ui/src/pages/chat/components/chat-transcript-projection.ts:678–688) and Reply after history pagination (ui/src/pages/chat/chat-pane-reply-navigation.ts:126–180). Both call sites were inspected on this head; 14 message-action and Reply-recovery E2E cases and 38 transcript-controller tests passed. Those flows cover source selection/highlighting, avoiding unnecessary lookup, pagination, and recovery after reconnect. The four rail E2E cases cover the shared owner's long-row return geometry; the paginated Reply E2E does not separately measure final bubble alignment, and its unit coverage spies onrevealMessage.