Repository navigation
fix(client): reveal earlier agent turns in one load - #24417
juliusmarminge wants to merge 5 commits into
Conversation
…n agent run One load-earlier request fetches a single history page, so a long agent run takes several clicks before its opening turn appears. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g agent run One Load earlier click fetched a single history page, so a run with more rows than a page left its opening message absent for several clicks. A plain load-earlier now keeps paging until a page holds a turn start or history runs out. Find navigation keeps its single two-phase page. Closes #21821 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The timeline shows every notification as a response boundary, so a page containing one already reveals visible history, whether it opened its run or arrived mid-run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Earlier-history loading now recognizes agent-started turns and notifications while skipping steer-only boundaries. The change remains confined to existing history retrieval, with cursor, cancellation and failure safeguards unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Handoff of #23760 findings from #23780 at On Linux Chromium with a synthetic 464-message thread, main omitted the first loaded turn's heading from the DOM while scrolled to the end. Screen-reader heading navigation can only reach mounted headings. Folded automation prompts and agent messages also hid their headings. The candidate fix kept the first and last loaded message rows mounted and moved folded-message headings outside the fold. A browser regression test with 120 messages failed on main and passed with the fix. In the integrated app, heading order was correct and scripted Before capture, after at the end, jump to first, jump to last. Details and scroll measurements are in #23780.
No new tests or pushes were started after the takeover notice. |
|
Thank you for the thorough work on this. #26240 (d2429f733c) already makes a single load continue across activity-only pages. Please cut this down to the remaining boundary behavior: stopping at an agent-started turn or visible notification, which main currently skips while looking for a human message and can therefore over-fetch older history. |
Main's load-earlier now pages until a human-authored message. Keep its loop and apply this branch's stop rule: any turn-opening user message (not steers) or a visible notification. Replace the branch's test with a focused table next to main's paging test. AI-assisted; verified with the tests and tools listed above.
EvidenceWeb app, Chromium, 1280×800, light theme, fresh synthetic databases on both commits. Create older human history, a completed long MCP-started replay run, and ten newer human turns. Reopen the bounded history and click Load earlier turns once. Base fetches past the agent opener into older human history and exhausts history. Head reveals the agent opener and keeps older history behind Load earlier turns. Stills were stable across captures 500 ms apart; both recordings were visually inspected.
Scenario file · Complete reproduction driver and recording setup AI-assisted; verified with the tests and tools listed above. Not shown:
|


Problem
When an older completed run was started by an agent and spanned several history pages, clicking “Load earlier turns” loaded only one slice into its collapsed activity group. Repeated clicks changed the “Worked for…” duration without revealing the run's opening message. Reproduced in the web dev app with a completed 532-row MCP-started run followed by ten human turns.
Change
The shared client history loader continues through activity-only pages until it reaches a user-message turn start, a visible notification, or the end of history. Each server request keeps its existing page budget. Loading and the active cursor stay consistent across later-page failures, retry, cancellation, and replacement snapshots. Targeted find navigation keeps its existing two-phase loading.
Scope and approval
Fixes #21821
GitCafe: #21821
Triaged bug via the automated issue flow; accepted by the maintainer on the linked issue. The change is limited to the shared client loader and focused regression tests.
Verification
Evidence report and scripts · Fixture matrix · Manifest and request traces.
Chrome 154/Linux integrated web, incognito, DPR 2, font 16px/100%, frozen clock, reduced motion. Viewports 1440×900 and 390×844 CSS; wide stills scaled full-frame to 1280×800, narrow stills 780×1688. Same synthetic data, theme and shared-content alignment; pointer parked away from controls. Each exact delivered still pair is pixel-identical at least 600ms apart. Diff0 retains all nonzero differences amplified 8×; DiffT marks maximum RGB channel difference >16/255. No masks or crops.
Visible changes are the opener replacing the earlier-history control, Worked duration/time, and navigator marks. Shared later content is aligned by scrolling head 16px. Narrow composer subtraction is zero; wide common-text raster edges include 51/light or 34/dark bottom-region pixels at at most 2/255. No renderer code changed. Full openers are unobscured in supplemental expanded stills and recordings.
1440light
Before — two-click recording · After — one-click recording
Exact temporal stability:0 changed pixels in each base/head pair. Across revisions:15579 nonzero;3462 above16, of1024000. Bottom13%:51 nonzero pixels. Before second still · After second still · Unobscured full opener · Before newer turns · After newer turns · Expanded Worked.
1440dark
Before — two-click recording · After — one-click recording
Exact temporal stability:0 changed pixels in each base/head pair. Across revisions:15237 nonzero;3449 above16, of1024000. Bottom13%:34 nonzero pixels. Before second still · After second still · Unobscured full opener · Before newer turns · After newer turns · Expanded Worked.
390light
Before — two-click recording · After — one-click recording
Exact temporal stability:0 changed pixels in each base/head pair. Across revisions:42081 nonzero;5803 above16, of1316640. Bottom13%:0 nonzero pixels. Before second still · After second still · Unobscured full opener · Before newer turns · After newer turns · Expanded Worked.
390dark
Before — two-click recording · After — one-click recording
Exact temporal stability:0 changed pixels in each base/head pair. Across revisions:42043 nonzero;5465 above16, of1316640. Bottom13%:0 nonzero pixels. Before second still · After second still · Unobscured full opener · Before newer turns · After newer turns · Expanded Worked.
Evidence was captured and audited at 67c9f4b5d8. The final head merges main; both changed files are identical to that audited head. Scoped tests were rerun after the merge.
Unverified coverage
Actual Electron, native iOS/Android, remote/relay/tunnel connections and the reporter's large-checkpoint fixture were not exercised. Responsive web captures do not certify native clients. Runtime fixtures for queued/steer boundaries, notification boundaries, opener-with-older-history, no-opener exhaustion, protocol edge flags, first-page disconnect, replacement during a later page and cancellation/remount were not captured. Notification stop and later-page failure/retry have focused unit coverage. Normal find navigation and forced later-page failure/retry have supplemental recordings in the full report; delayed targeted find/retry remains unverified.
Final proof audit: sufficient. Independent 390/light rebuild matched the delivered head capture exactly (zero changed pixels).
Models: Claude Opus 5.5 via Claude Agent (tests and implementation); GPT-6.1-Sol via Codex and Claude Opus 5.5 via Claude Agent (review); GPT-6.1-Sol via Codex (triage and evidence).