Repository navigation
fix(ui): stop completed transcripts bouncing during scroll - #195097
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. |
…ed-scroll-cls-1107
…ed-scroll-cls-1107
|
Codex review: needs changes before merge. What this changesThis PR measures cold completed-run overscan fragments outside normal flow before admitting them above visible messages. Example: Scroll upward through a completed 2,000-message run.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR addresses a demonstrated transcript-rendering defect with a focused change to the existing preparation and reader-anchor owners. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI transcript virtualizer turns chat rows and native measurements into a bounded mounted window; preparation controls admission, and the reader anchor reconciles geometry without interrupting native scrolling. flowchart TD
A[Completed chat rows] --> B[Transcript virtualizer]
B --> C[Initial range preparation]
C --> D[Solid transcript rows]
D --> E[Native resize measurements]
E --> F[Reader anchor]
F --> B
Technical reviewBest possible solution: Keep predecessor admission in the existing preparation slot and native-height owner, and adapt the existing prepared-row fixtures to that lifecycle. Do we have a high-confidence way to reproduce the issue? Current-main admission allows a cold predecessor into normal flow before its native size lands, matching the supplied bounce sequence and reported base-failing browser regression; no target code was executed during this review. Is this the best way to solve the issue? Preparing the predecessor before admission addresses the painted displacement at its producer while preserving the existing measurement, retention, and scrolling owners. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a1f1248ee90e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +27, Tests +61, Other +31. Total +119 across 7 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 8, 2026, 3:32 AM ET / 08:32 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…195097) * fix(ui): measure incoming transcript overscan outside flow * fix(ui): restrict predecessor preparation to retained fragments * fix(ui): mount pending transcript predecessors after resume * perf(ui): set Chat cap to measured predecessor fix size
Problem and fix
A cold preceding fragment of a completed run entered the transcript at its estimated height. It moved retained content before native measurement corrected it. Census 7's one-wheel-plus-interpolation trajectory exposed a visible 206.5 px reversal at 2,000 messages. Current-main diagnostics also show a painted 273.94 px reversal at 400 messages.
Measure cold retained predecessors in the existing out-of-flow preparation slot, then admit their measured height. The reader anchor records that native measurement without compensating in-flow content. Ordinary rows bypass preparation. Refresh range extraction when claiming the predecessor so a resumed pane cannot wait for an unmounted row.
The broad candidate was discarded after approximately 15% ordinary-scroll Chromium task CPU growth. This focused version adds no cache, owner, listener, effect, or synchronous layout pass.
Correctness and visual proof
The prepared-row fixture previously sent ResizeObserver receipts only to parked rows. It now measures active/preparing rows while preserving explicit heights and deliberate withholding. Existing assertions remain; the short-predecessor regression fails on base with 450 px drift.
400-message verdict: extra initial screen motion falls from 273.94 px in all five base observations to ≤0.0625 px on head. Adjacent compositor images capture the base's jump and return while head stays aligned. Raw CLS remains nonzero on head; this is not a true-zero CLS claim.
2,000-message verdict: extra initial screen motion falls from 205.5 px in all five base observations to 0 px on head. The fresh base filmstrip misses the brief painted reversal before interpolation begins; earlier captures established the visible defect. Current-head geometry and images show no corresponding reversal. Both sides' raw CLS are zero in the fresh run, illustrating why CLS alone is insufficient here.
Blank-frame limitation: the interpolated trajectory produces real empty compositor captures on both builds. At 400 messages the count is 211/663 base versus 348/685 head; at 2,000 it is 364/728 versus 370/726. These are capture counts, not refresh-frame counts or blank duration. Two low-blank base runs retain stale prior-offset text where head shows empty new-offset content. The fixture writes roughly 1,566 px inside rAF after its geometry sample, exceeding the 846 px viewport; the sampled coverage and subsequent compositor image describe different phases. Do not call the 400 counts unchanged or claim this fixes the whole interpolation. A follow-up should first reproduce the direct-write presentation gap with realistic fast input. No speculative overscan change is included.
Ordinary native wheels provide the negative control: Chromium has 0/551 blank captures on base and 0/552 on head. Both Chromium and WebKit have no empty geometry samples, no >2 px backwards same-node motion, and no resize/audit errors. WebKit's check is geometry-only; compositor capture is unavailable. Existing column compensation remains responsible for native wheel continuity.
Timing qualification
Twenty rotated base/head/base triples per cell, headless at desktop size. Values are median / p95 across runs (ms); frame values summarize each run’s frame-gap p95. Base/base is the A/A control. Chromium alone exposes main-thread CPU.
Host one-minute load: chromium 2000: median 12.40, p95 16.87; chromium 400: median 11.59, p95 14.36; firefox 2000: median 12.46, p95 16.23; firefox 400: median 11.52, p95 15.36; webkit 2000: median 12.37, p95 16.45; webkit 400: median 11.57, p95 15.65.
Failures: 0; incomplete triples excluded: 0.
All six cells completed20 triples,360/360 observations passed. The earlier partial Firefox downward-cadence warning did not persist: final median25.23ms versus33.15ms base, p95 unchanged33.34ms. At2,000, Chromium task CPU changes+4.12% median/+0.98% p95, while A/A is+4.08%/+2.87%; no measurable change exceeds the requested band. Other frame-tail medians stay within5% with equal or lower p95. The bounce reduction is the intended correctness win; no cross-engine latency-speedup claim.
Earlier 20 rotated ordinary-wheel triples per engine exercised the same unchanged ordinary path: Chromium task CPU median/p95 1551.28/1610.98 → 1530.77/1604.82 ms; application 8167.5/8582 → 8166.5/8249.9 ms. WebKit application 5299/5365 → 5306.5/5414 ms (A/A 5290/5414); Firefox 6676.5/6866 → 6628/6878 ms (A/A 6695/6798). Fresh final-head wheel proof above verifies that behavior after the retained-only resume repair and main merge.
All browsers run headless against synthetic Gateway fixtures. Chromium task CPU is renderer main-thread CPU. WebKit application time/frame gaps are reported; its utilization sample is not action CPU. Firefox CPU/CLS are unavailable. Mounted DOM and anchors are covered; no post-GC heap-neutrality claim.
Size and scope
Built both sides on the same machine, after merging main
306bf7730b0. Runtime bundle built at0c0c32812d7; final head0462dfa08c6only adjusts the Chat cap/comment.Coordinator-accepted: +159 B normalized Chat gzip, within the coordinator's approximately 300 B allowance. Only Chat's cap moves to measured 1,296,751 B. Main's former cap was already 213 B below its measured build: total cap adjustment 372 B = existing 213 B deficit + actual 159 B growth. No additional headroom or other ceiling increase. Strict performance check passed.
Production owners: 1,118 → 1,147 lines (+29). Test allocation: 71 net added lines. Solid refactor audit: no added controller, effect, listener, DOM query, owner API, import boundary, or cache; existing flush count unchanged.
Reproduction commands
Untraced timing is separate from the 4× Chromium filmstrip/layout audit. Base and head bundles are immutable throughout each rotated run. The same native harness drives the two ordinary-wheel pairs and the five mobile triples reported above.
CI exception attribution
The nine failed job roots are
check-additional-boundaries,checks-ui (1/3),checks-ui (3/3),checks-node-compact-small-1,checks-node-changed,check-lint-core-1,check-lint,check-lint-extensions-3, andcheck-lint-core-2. They stop with HTTP504 while downloading pinned Bun or “could not stage the pinned fork.” One targeted retry of additional-boundaries failed at the same setup boundary. No product test assertion failed in this attempt. The aggregate CI gate reports those roots.The actual CI checkout is merge
1fe6359f2d053c216405604ba5b429f91b2e53f8, with ordered parents main64e82b39243dda0131cb960bad96ea933b66e8e9and PR head0462dfa08c6e26523da8351764b874641a07c895; its tree matches the reconstructed merge. Bun staging, pin, invocation owner, and workflow inputs are unchanged between baseline and this tested merge. Scheduled main run42467134059 independently logs the same Bun setup failures in UI1/UI3, additional-boundaries, compact-small1 and core-lint1/2. That run was not completed at observation; it corroborates the infrastructure incident, not a matching failed-test claim. The earlier completed main run passed these jobs. CI checks blocked by setup remain uncovered; local scoped checks and passing browser shards are listed above.ClawSweeper’s old-head finding about prepared-row fixtures is resolved in
3ca082d096e: native receipts now reach active/preparing rows, explicit measurement withholding remains, and the existing32 cases pass. Current-head Codex review reports no findings.