Repository navigation
fix(ui): reduce blank frames during fast transcript scrolling - #196001
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 makes the incoming measuring transcript row visible at its estimated position while keeping it out of normal flow and inert. Example: Fast upward scrolling through a 400-message completed transcript in Chromium.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: it addresses a real rendering defect, but the pinned head worsens blank-frame coverage for large transcripts and needs a test-budget repair. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe Control UI virtualizer supplies row positions to the existing admission owner; the Solid renderer turns admitted and preparing rows into browser layout and paint. flowchart LR
A[Completed transcript] --> B[Virtualizer geometry]
B --> C[Row admission owner]
C --> D[Solid row renderer]
D --> E[Browser paint]
F[Reader anchor] --> B
Technical reviewBest possible solution: Keep the existing measurement and admission owners, and land a painting change that reduces blanks at both transcript sizes without restoring bounce. Do we have a high-confidence way to reproduce the issue? Current-main source hides the preparing predecessor, and the inspected Chromium screenshot demonstrates the resulting blank viewport; no target code was executed during this read-only review. Is this the best way to solve the issue? Changing paint inside the existing renderer is a focused approach, but the current implementation fails its own large-transcript qualification and cannot yet establish a net improvement. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 245cbaf915c2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +10, Tests +14. Total +24 across 2 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. 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, 8:58 AM ET / 13:58 UTC. |
|
Merged via explicitly authorized admin squash with prior CI and scoped validation.
|
…aw#196001) * fix(ui): keep measuring transcript rows paintable * test(ui): verify measuring transcript row placement * fix(ui): paint only the incoming transcript predecessor * test(ui): time key validation from the save action * test(ui): preserve row height across overscan remounts * test(ui): settle lazy menu and handshake boundaries
Problem and fix
#195097 fixed completed-run scroll bounce by measuring cold rows outside the transcript flow. During fast upward scrolling, hiding the preparing row also leaves the viewport blank until that row is admitted. Ten matched historical pairs isolate the admission policy as sufficient for the 400-message blank increase; reversing only reader anchoring has no median effect. A plain admission revert brings back the bounce and worsens downward coverage.
Paint only the actively preparing row immediately preceding the first active row at its estimated slot, clipped to that estimate. Background preparation stays hidden. Measurement, content preparation, admission, inertness, retention, and reader anchoring keep their existing owners. This adds no row to the mounted window.
The final candidate improves both 400-message paint cells. The 2,000-message cells stay within same-run A/A variation. It preserves the bounce fix; it does not solve every fast-scroll blank.
Evidence
Counts are blank / sparse ink / populated ink from masked compositor captures. Sparse ink is not certified semantic partial content; populated ink is not certified correct content. Full semantic correct/partial/stale counts remain unclassified because these captures have no independent displayed-offset oracle. Every delta is the median of paired observation fractions, not a ratio of the total counts.
Historical comparison, Chromium, ten rotated pairs:
Parent
3a25991e37c4bad581b34ebf19f0b9b3e036b5cf; measured main518e8a7d43f32499276f8b60526f2e0b54e150fd. The separate main/main A/A check has only one pair per flow: absolute blank difference 0.00 pp for interpolation and 6.27 pp for wheel; it is not a noise distribution. Admission-only reversal changes 627/0/601 → 10/640/580 (blank −50.41 pp); reader-only reversal has 0.00 pp median effect.Final candidate, Chromium, twenty main/candidate/main triples per flow in a six-permutation rotation within one run (240 valid observations, no incomplete comparison arms; each arm occupies each position six or seven times):
All twenty 400-message pairs improve. At 400 interpolation, the gain is primarily blank becoming sparse; longest upward held-blank median drops 1,008.56 → 83.33 ms. Native-wheel upward drops 50 → 16.67 ms. Holding each captured image until the next timestamp gives a duration proxy; it does not enumerate physical refreshes. Duration-weighted blank changes are −10.4198/−8.5897/+0.0374/−0.1688 pp in the table's order, each compared with its A/A distribution.
Directional changes remain visible: 400-wheel downward blank rises 2.2292 pp against A/A abs median 2.5626 / p95 11.4552 pp, while blank+sparse improves 0.9109 pp. Its duration-weighted rise is 1.5567 pp against A/A p95 9.6155 pp. The 2,000-wheel downward rise is 0.4356 pp against A/A p95 7.4853 pp. No directional regression is resolved beyond those noise bands.
Two broader painting variants were rejected: both improved 400 messages but raised 2,000-interpolation blank fraction about 20.23%, with +29.235 pp downward held-blank duration. The immediate-predecessor predicate removes that regression. Forecast/retention/window alternatives were also screened and rejected for coverage, mounted-row growth, or CPU regressions.
Baseline/A/A bundle SHA-256
6149a7c42fc4a77c592dfd56c44130028392133ae158101038814f1a8a26459d; candidatecd3c745dd1bbbc898be99479e505e0f6f69cc2475c4ad7e01ced1ea17f252874. Candidate build marker31199de22733was retained for the immutable bundle; final source/test commit3a28422f5ffhas the same runtime.Screenshot
Both full screenshots were inspected and contain only synthetic fixture data. They sample each independent run at upward +115 ms, not a certified identical scroll offset. The companion JSON records source-image hashes.
Clean CPU and frame results
Chromium Performance
threadTicksmeasures renderer main-thread CPU. These are paired median changes; A/A columns show absolute paired-change p95, not acceptance thresholds. No separate CPU speedup is claimed.Top/bottom frame-p95 medians remain 16.70–16.80 ms, and every arm’s observed p95 range is 16.70–16.80 ms. Maximum gaps are at most 33.5 ms. Script/task p95 across observations: 400 interpolation 501.071→508.343 / 950.821→951.852 ms; 400 wheel 671.223→662.543 / 1315.915→1306.590; 2,000 interpolation 654.097→647.540 / 1094.363→1091.588; 2,000 wheel 771.405→731.432 / 1409.227→1342.614.
The 400-interpolation paintability change adds 36 style recalculations (464→500, +7.76%), with style CPU +1.16%; other work is not claimed to uniformly decrease. Heap snapshot paired changes are +0.71/−1.28/+0.17/+0.69% in table order and inside GC-sensitive A/A spread. Mounted-window bounds stay unchanged.
Every native-wheel CPU observation settles in both directions. These are finite wheel trajectories, not forced endpoint navigation: candidate pair 6 in the 2,000-message CPU cell ends 1,360 px from the bottom and A/A pair 14 ends 645 px from it; the paint run also has baseline/A/A non-endpoint finishes. Candidate pair 6 retains full final geometry coverage and has no stalled-input or empty stationary-tail evidence.
Validation
transcriptLayoutAudit=false; no resolved regression beyond same-run control variation.3b6efc38fe3; no other P0–P2 findings in that reviewed working tree. Fresh reviews of the Save-timing and overscan-remount test repairs are scoped-clean at P0–P2. The two ClawSweeper P2s on the old head—broad-paint 2,000-message regression and missing 14-line allocation—are both addressed by this commit.untrack, listeners, queries, flush, and cleanup all 0→0; owner APIs 1→1.ci:full; exact head3a28422f5ffpassed full CI 42655789717: 41 successful jobs, 26 skipped, no failures. See the prior-head failures and test repairs below.Chromium renders and captures but context close still has the baseline-matching CoreVideo failure. The harness reconnects only between completed observations; no failed-observation retry is counted. This reports a Chromium verdict. WebKit's retained smoke failed during launch before a page existed; there is no WebKit performance verdict or Firefox acceptance evidence. These are disclosed cross-engine gaps. The 2,000-message upward interpolation blank remains unsolved, and full semantic stale/correct/partial counts remain unmeasured.
Local full evidence:
.artifacts/fast-scroll-round2/final-report.md, with linked manifests, paired metrics, classified frames, image hashes, bounds, bounce measurements, rejected experiments, and host diagnostics. No reports or captures are committed.CI timing repair
The production-fix head
3b6efc38fe32bc9280db803b828208edaa0294b6passed every selected test job except the real-Gateway testSaving an API key checks it against the provider > reports a rejected key where it was entered and keeps the field editable. Run42637731218measured 2,000 ms against< 2,000 ms; its one targeted job rerun measured 2,088 ms. The rejected-key message and prior correctness assertions passed both times. The exact test passed on the latest completed scheduled main comparison (42634794981); this was not treated as inherited and no admin failure bypass was used.The test's timer included opening the replacement form and entering the key. Commit
e7c406c6e74performs that setup before timing Save through the final result. The strict two-second deadline and every message/editability assertion remain. This changes only the test boundary and its exact +3-line allocation; production runtime and all retained performance measurements are unchanged. The repaired test passes locally (25.22 s command, 20.44 s test process including startup), as do UI typecheck, formatting, lint and test-line accounting. Fresh independent review found no P0–P2 issues. The original unmodified test also had one passing local replay; that alone was not accepted as a repair after the second CI failure.Run
42647131943one7c406c6e74passed the real-Gateway repair but failedholds deferred reader compensation without interrupting native scrolling(expected scrollTop 510, received 480). The latest completed scheduled main run passed that exact test, so no inherited-failure waiver was claimed. A focused local replay passed; that alone was not accepted as an explanation.Advancing the movement clock 110 ms reproduced the exact 480 result. The test set row 2's height to 150 px on its DOM node, then scrolled far enough to evict that node. Delayed range recalculation restored preceding overscan and remounted the row at the fixture's default 120 px. The legitimate −30 px receipt cancelled the held +30 px. Instrumentation recorded the row-2 measurements 150→120 while retained content remained stable. The test now gives row 2 a persistent scoped CSS height and explicitly crosses the movement window; all original geometry and timing assertions stay. The repaired file passes 32/32 with clean process exit 0. Production runtime and the qualified immutable bundles are unchanged. Exact net test growth is 21 geometry lines plus three Save-boundary lines.
The old auto-merge intent remains retired. Fresh replacement-head CI and native recovery will be recorded before landing.
Host contention was recorded per observation. One-minute load min/median/max was 4.50/8.38/11.33 in final paint qualification and 5.62/8.93/15.23 in clean CPU qualification. Arms were serially interleaved and position-rotated with same-run main/main controls; no CPU speedup is claimed.
Remaining CI readiness repairs
Run
42651430695failed three additional exact names:Attachment opening focus > keeps native media selection across the real opening animation,Gateway connect denial > paces unavailable handshakes at a reachable Gateway, andChatComposerCapabilityHost > keeps unavailable plugin settings distinct from an empty configuration in the open menu. The corresponding jobs passed on latest completed scheduled main42644606362; no inherited waiver is claimed. The geometry shard and both real-Gateway jobs passed.The capability test waited for the parent menu import but not its later-added lazy connector subview; it now awaits that module before the unchanged state assertions. CI's denial diagnostic recorded nine closed sockets but only two connect requests. The test now holds virtual time while a socket prepares its real-thread signature and requires a request for each closed socket; its sixty-second window and both retry-count bounds remain. The attachment test now explicitly pauses the second opening animation and verifies row focus before Enter. It still reopens immediately after cancellation and selects during entry, with no wait for
overlay-after-show.An original full-Chrome replay passed one attachment case then crashed in the host graphics path (
CVReturn -6670,SIGBUS) before the other cases. A diagnostic headless-shell replay passed all four original E2E cases and recorded the expected item→hide→native-input sequence, plus eight sockets/eight requests. These are test-boundary repairs, not claims of reproduced production defects. Final repaired E2E files pass 4/4 with clean exit 0 (17.44 s), capability-host passes 19/19 (5.02 s), and UI types, scoped lint/format, exact test-line accounting pass. Fresh independent review is scoped-clean P0–P2. Full Linux CI run42655789717subsequently passed on this exact replacement head, including all repaired names and all seven UI E2E shards.Production source and measured bundles remain identical. Additional test growth is 23 lines; the allocation is exact. The old auto intent remains retired; qualified replacement-head recovery uses exact-head green CI, without an inherited-failure waiver.
The final offline semantic audit confirms that all 40 historical and 240 acceptance layout audits lack the per-image marker/ruler needed to bind displayed offsets. Semantic correct/partial/stale totals are unknown. An earlier marked diagnostic's zero certified-stale lower bound is not zero actual stale frames; older manually verified ruler samples use a superseded candidate and are excluded from acceptance. No new browser experiments were run for this audit.