Repository navigation
fix: keep Latest destination mounted until scrolling settles - #196181
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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR retains Latest destination rows until their measurements and native scrolling settle. Example: Press PageUp during a 200-tool turn, activate Latest, and receive eight growing answer chunks.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 3 items remain This PR addresses a real Latest failure, but introduced reader-position and automatic-follow regressions need repair before merge. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe Control UI transcript converts Latest requests, native input, and row measurements into virtual ranges and browser scroll positions. flowchart TD
A[Latest and reader input] --> B[Transcript scroll owner]
B --> C[Initial range owner]
C --> D[Mounted destination rows]
D --> E[Native measurement receipts]
E --> F[Layout settlement]
F --> B
B --> G[Browser scroll position]
Technical reviewBest possible solution: Keep destination retention in the existing range owner while preserving measured automatic retargeting and reader takeover after genuine arrival. Do we have a high-confidence way to reproduce the issue? Current-main source releases the destination before smooth scrolling starts, supported by the supplied before screenshot and reported failing destination-retention regression; this review ran no target code. Is this the best way to solve the issue? Retaining the destination through the existing owner is appropriate, but completion and growth retargeting must preserve the earlier measured-follow and reader-position contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ce7788f5a24e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +34, Tests +100, Other 0. Total +134 across 10 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 1:53 PM ET / 18:53 UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6099fe1483
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if (this.initialRange.preparingEnd && this.offsetState.scrollCommand?.target === "end") { | ||
| // An unissued end command is already preparing this destination. | ||
| return true; |
There was a problem hiding this comment.
Retarget issued end commands when their destination grows
Once a smooth Latest command is issued, preparingEnd now remains true until settlement, so this guard also skips automatic follow requests for already-issued commands, not just unissued preparation. It never checks whether the issued offset differs from the new endpoint. This contradicts the newly added retargets growth during Latest settlement without restarting unchanged motion regression: with its issued offset of 900 and native endpoint of 1100, this method returns true without calling virtualizer.scrollToEnd, so the test's first scroll assertion fails. Distinguish unissued preparation from issued motion and retarget changed destinations while preserving the current smooth behavior.
Useful? React with 👍 / 👎.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…w#196181) * fix: keep Latest destination mounted until scrolling settles * fix(ui): preserve reader takeover after Latest settlement * fix(ui): separate Latest range retention from native scroll completion * fix(ui): release automatic end preparation to reader movement * chore(ui): reconcile measured Latest proof budgets * test(ui): sample the painted spinner pseudo-element * chore(ui): record Latest proof on current main
What Problem This Solves
Fixes Latest stopping above the final answer after PageUp during a large tool turn, including a final row leaving the mounted virtual range.
User Impact
Latest keeps its destination mounted and measured until it rests within 8 px of the end for three stable idle frames. Fresh reader input still cancels it immediately.
Why This Change Was Made
The range owner released the destination before issuing the smooth scroll. Geometric arrival could then retire the journey against a temporary native extent. Keep that range until the last row is mounted and its recorded measurement matches the virtualizer, using the existing layout queue.
Native command ownership and destination retention have different lifetimes. Retire the native command at its existing endpoint, then let the range owner finish the three-frame measurement check. Retaining the command longer suppressed reader anchoring and reclaimed small reader movements. A prepared destination issues its command only once; subsequent commits resume the settlement stage. Native reader movement releases retained destination rows even when the command has already retired.
The full Firefox flow also exposed delayed PageUp movement cancelling a newer Latest while its destination was being measured. Preserve that unissued intent and native smooth settling; fresh reader input still releases both stages.
Evidence
The final byte comparison, typecheck, scoped lint, Knip, and spinner E2E regression were refreshed after merging main
d325e9e069a. The unchanged Latest owner passed the complete growing-answer flow in Chromium and Firefox before this main merge. The full replacement CI is requested withci:full.pnpm deadcode:knipcommandThe earlier 128 px/final-unmounted Firefox failure was captured in receipt qualification. Ten fresh main replays did not reproduce that exact rare outcome. The deterministic range regression demonstrates the premature release, and the growing-answer browser flow reproduced main stopping short before the repair. WebKit is unavailable on this host.
Production LOC: 2,324 → 2,389 (+65); changed tests: 1,120 → 1,267 (+147), preserving the existing temporary-clamp regression. The baseline was already 25 B above its old Chat cap; the cap now records the measured head. Startup and other caps are untouched. The range uses its existing frame queue, without a new timer or listener. Solid checklist: no added effects, untrack, listeners, DOM queries, cleanup, or owner APIs. Fresh independent review of the lifetime correction found no actionable P0–P2 findings.
CI repairs: 42670915437 exposed history-maintenance and native-jump regressions; 42675277431 exposed native clamp/departure, saved-offset, cached-refresh, and test-fixture typing failures. The lifetime separation repairs those contracts, and the test fixture now supplies complete typed rows. CI 42680391198 also exposed two unclassified-reader regressions and an obsolete direct-retarget test. Both reader regressions pass after allowing automatic commands to yield before issuance; the obsolete test is removed in favor of the real virtualizer growth proof. All 15 offset/history cases pass. Full UI CI is requested with
ci:full.Before: main stops while the answer continues below the viewport. After: Latest follows all eight growth checkpoints. Both captures were inspected and contain synthetic data only.
CI follow-up:
42683619151passed43 jobs but its original and one retried UI E2E5/7 both failedkeeps session titles on the first line and collapses rows that have no second line. CI tested merge87660e60e6d, including main #193930, which moved spinner ink from the host to::before. The old local base lacked that CSS change, explaining its passing result. After merging current main, the same test reproduces all four color failures locally on main; the one-line assertion correction reads the painted pseudo-element and passes. No color assertion or theme/motion case was removed. Main's spinner-art browser test independently specifies the transparent host/static painted-child contract.CI attribution for exact head
c68cba2a0a1:Control UI session ownership > aligns Person left status at 1200 pxand the 390 px variant fail with 14 px versus 13 px;Control UI mocked Gateway E2E > keeps a single web conversation with in-page native navigation and Dashboard handofffails with header height 56 px versus 64 px. All three exact names and assertions reproduce on merge based325e9e069a, whose UI tree is identical to the scheduled-main CI checkoute64c3514e41. The same main run42692902936reports those failures. Thesidebar-rail-alignment.e2e.test.ts:201no-shadow diagnostic also reproduces on the merge base. No assertion is waived or called passing.The separate background-navigation and handshake failures passed their single E2E4 retry. The inline-plugin case passes on both the base and head in focused headless-shell runs; its single CI retry passed in run
42692079820, attempt 3. Node is used only for these Playwright E2E reproductions because the full-Chrome context-close path crashes on this Mac; the supported installed headless shell completes the same scenarios.Native landing uses the documented inherited-failure route for those exact remaining failures. Full CI is not described as passing; the separate scope checks and complete Chromium/Firefox growing-answer proof pass.