Repository navigation
fix(ui): load earlier history into underfilled transcripts - #125080
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 1:39 AM ET / 05:39 UTC. ClawSweeper reviewWhat this changesThe PR lets a short Control UI transcript automatically request further older-history pages until it becomes scrollable, history ends, or a request fails. Merge readinessKeep open. Current main still stops automatic history loading after one underfilled page; this PR removes that obsolete observer-local limit while retaining pagination progress, failure, and scrollability guards. No blocking patch defect found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders Gateway-paginated session history in a chat transcript. Its top-of-transcript sentinel determines whether another older page is requested, which affects whether an opened session has enough visible conversation without a manual action. flowchart LR
A[Gateway session history] --> B[Paginated history response]
B --> C[Control UI transcript]
C --> D[Earlier-history sentinel]
D --> E{Transcript scrollable?}
E -->|No| F[Fetch another older page]
E -->|Yes or exhausted| G[Stop automatic loading]
F --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource -13, Tests +103. Total +90 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Make the transcript fill an initially short viewport through the existing sentinel while retaining the current pagination, failure, and exhaustion safeguards as the sole stopping conditions. Do we have a high-confidence way to reproduce the issue? Yes. Current main increments the one-page bootstrap counter before loading, and the next render blocks further automatic loading if the pane is still unscrollable; the PR E2E’s second offset request is a direct regression detector. Is this the best way to solve the issue? Yes. The observer owns the erroneous one-page decision, so removing its cap is narrower than changing Gateway pagination; existing progress, failure, and scrollability guards remain in that same owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 49ff3e5b6940. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready evidence for Root cause: the transcript sentinel had an observer-local one-page bootstrap cap. When projection collapsed that older page, the pane could remain underfilled with no scroll delta available to re-arm loading. This patch deletes the cap/counter and keeps the existing single-flight, progress, failure, exhaustion, intent, and anchor guards. Production LOC: +1/-14 (net -13); tests: +150/-47.
ClawSweeper completed on this exact head with no patch findings and no literal Rank-up moves. Its sole P2 checklist item is ordinary maintainer review, satisfied by the repo-native review artifacts. The stored-data-model heuristic is skipped as inapplicable: it matched the existing |
|
Merged via squash.
|
Related: #110771
What Problem This Solves
Fixes an issue where opening a paginated Control UI session could leave most of the transcript viewport empty when projection collapsed the first older page. Earlier history remained stranded behind the manual Show earlier action even though the visible pane still had room to display it.
Why This Change Was Made
The transcript now keeps observing its earlier-history sentinel after each successful page while the rendered pane is still shorter than its viewport. It stops as soon as the transcript becomes scrollable, history is exhausted, or a request fails, while preserving the existing scroll-to-top intent gate, single-flight loading, cursor progress checks, viewport anchoring, and manual retry path.
The obsolete one-page bootstrap counter and its lifecycle state were deleted rather than replaced with another limit.
User Impact
Opening a clipped session now fills the visible transcript automatically. Scrolling a longer session to the top continues to load earlier history automatically, without requiring repeated clicks on Show earlier.
Evidence
[2, 6], but only[2]was requested; the second page never loaded.2and6without click, wheel, keyboard, touch, or synthetic scroll, then made no third request after the transcript became scrollable.ui/src/pages/chat/chat-pane-history.test.ts: 25/25 passed.run_7e64a9f50e40oncbx_8273c2236521, exit 0 (coreTests,ui).Initial underfilled viewport
Continued automatic loading
Final scrollable transcript
AI-assisted; the implementation and proof were reviewed against the owning transcript pagination and virtualization boundaries.