Repository navigation
perf(ui): keep split and fork responsive during transcript mount - #194200
Conversation
…lit-edit-1106 # Conflicts: # scripts/check-control-ui-performance.mts
…lit-edit-1106 # Conflicts: # scripts/check-control-ui-performance.mts
|
🦞👀 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: needs changes before merge. What this changesThis PR lets the pane shell and composer paint before mounting transcript rows through the existing frame scheduler. Example: Open split view on a conversation containing 400 messages.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it addresses measured transcript-mount stalls with a focused lifecycle change, and no concrete introduced defect was found; it remains draft with a reported merge conflict. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI chat renderer receives session projections and presentation state, then mounts transcript rows through the existing transcript and virtualizer owners. flowchart LR
A[Split or fork action] --> B[Retained chat pane]
B --> C[Shell and composer]
B --> D[Presentation lifecycle]
D --> E[Existing frame scheduler]
E --> F[Transcript renderer]
F --> G[Virtualized message rows]
Technical reviewBest possible solution: Retain this focused mount boundary and existing transcript ownership, preserving main’s newer budget ratchets during conflict resolution. Do we have a high-confidence way to reproduce the issue? Source inspection confirms synchronous transcript construction on main, supported by the author’s comparative browser measurements; this read-only review ran no target code. Is this the best way to solve the issue? The change uses the existing presentation lifecycle and scheduler, preserves the renderer and virtualizer owners, and avoids a competing rendering path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 642fd21190f2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +33, Tests +208, Other +59. Total +300 across 15 files. Added test files: 2. 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:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 6, 2026, 11:17 AM ET / 16:17 UTC. |
…lit-edit-1106 # Conflicts: # scripts/check-control-ui-performance.mts
…lit-edit-1106 # Conflicts: # scripts/check-control-ui-performance.mts
Codex Review SummaryThis 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. |
…lit-edit-1106 # Conflicts: # scripts/check-control-ui-performance.mts
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…nclaw#194200) * perf(ui): yield before mounting a new chat transcript * test(ui): settle direct transcript mounts and refresh chat budget * perf(ui): ratchet Chat bytes after refreshing mount proof * perf(ui): set measured packaged Chat budget * perf(ui): record accepted transcript mount byte trade * fix(ui): retain first-frame transcript restoration and inset * perf(ui): record complete-build transcript mount budget * test(ui): correct transcript mount fixture props
What Problem This Solves
Opening split view or forking a conversation mounted the destination transcript in one task, delaying paint and input. This change paints the pane shell and composer first, then prepares and mounts rows after two turns of the existing frame scheduler. It reuses the transcript owner's initial-range path, cancels pending mounts on hide/disposal, and retains revealed content. Restored snapshots still render in the first frame; the placeholder preserves the loaded transcript annotation inset.
The campaign coordinator accepted the disclosed WebKit single-key movement and authorized the native pre-existing-failure route for the inherited test-line debt. The original fixture type error is repaired; the focused test-type leaf passes.
User Impact and Measured Trade
The split-view longest task falls from 76 → 56 ms at 1× and 391 → 304.5 ms at 4×. Fork's 4× longest task falls from 233.5 → 187 ms. Both preserve native typing and composer geometry. Edit/resubmit remains accepted as done from the earlier 174–199 ms evidence; this change does not alter composer geometry.
The campaign coordinator accepted the byte trade after comparing raw, served and normalized sizes. Both complete builds contain all eight native UI plugin distributions / 41 inputs. The measured base is
07ef5b84fd1b1bf29c069cf7d3b92686cf5a1f1f; the runtime build is4b9b85c65b5e9ed861970dedaf83dec363e3c0be. Subsequent commits change only the cap and test fixture. Current source head:877ffc8d32338f1d61777af13d7a2a6007ffb51b.Nineteen of twenty normalized Chat chunks are identical. No code moved across chunk boundaries: identifier mangling makes normalized gzip price this small change differently. The trade was accepted by the campaign coordinator because the normalized delta is minifier noise, not comparable real growth. Real whole-Chat served growth is 111 B. Whole-Chat served Brotli decreases 66 B. Only
chatBootJsGzipByteschanges, to 1,287,669 B = measured head +64 B. Strict performance check: zero violations. New Session remains 796,175 B normalized gzip; startup/Chat/New JS requests remain 3/20/15, with one startup CSS request. The Solid performance guide now records the normalization caveat in two lines.Evidence
The committed engines harness ran 20 rotated base/head/A-A triplets per cell, with bounded confirmations of the cells whose tails needed review. 1,260 observations, zero behavior failures. Chromium ran at 1× and 4×. WebKit has no supported 4× throttle here; its results below are native application time, not a fabricated throttled or CPU result. All local browsers were headless.
All times are milliseconds. A recorded zero means no task reached the Long Tasks API's 50 ms threshold, not zero work. Chromium fork task CPU also falls about 9% at 1× and 11% at 4×. Split application time remains in the confirmation band; its 1× p95 is +3.9%, disclosed above.
Full application matrix: median / p95 (min–max), all runs retained
The extra triplets are pooled with the original samples using run-qualified pair identities. One-minute host load is shown per cell.
WebKit's single-key median remains 32 → 37.5 ms after 40 triplets, while A/A is 34.5 ms; p95 is 42 → 42.05 ms, and first observed value commit is 3 ms with 24 mutations in all arms in the original 20-triplet set. The A/A median is outside the timing band and the distribution is bimodal, so the median difference is inconclusive. WebKit's sampled utilization is not trustworthy per-action CPU evidence; it is not substituted for missing CPU proof. The campaign coordinator explicitly accepted this disclosed movement as non-blocking. Other confirmed application cells are within the 5% band.
All loaded-message counts are 2,000 and all traversal endpoints passed. Head mixed heap is within the A/A spread. This is bounded retention evidence, not a statistical leak claim.
The 24 phase cases cover Chromium 1×/4× and WebKit, normal/reduced motion, split and ordinary session opening. Candidate destination blank-frame count is zero; destination viewport/composer geometry stays fixed and final bottom gap is zero. Cold restoration keeps the measured 889 px width in all 30 sampled frames. WebKit has no running or detached shimmer animations in the inspected cases. The split placeholder is frame-sampled at 159–187 ms, versus 84–91 ms for ordinary opening: the coordinator accepted the brief extra placeholder, and these diagnostic captures are not substituted for untraced timings.
A separate pending-input probe retained the full first-pane draft and focus while trusted input overlapped the pending destination: 8 events in Chromium 1×, 1 at 4×, and 2 in WebKit. Page errors: zero. Intended split resizing creates interaction-associated layout entries; the destination viewport/composer do not jump during row replacement.
The UI typecheck passed. Four affected unit files passed (52 tests), including restored first-frame content and annotation-inset coverage. The final Chat test-type leaf passes after removing the redundant invalid property. Independent P0–P2 implementation review and the final fixture-repair review found no actionable issues. Full CI run 42267796383 passed its UI, E2E and Gateway jobs on the prior head; its fixture type failure is now fixed, but the test-line gate remains red. Current-head full CI 42277923787 is complete: 36 jobs succeeded, 23 were skipped, and eight failures plus the aggregate are attributed below. CI remains recorded as failed.
Inherited Failure and Landing Evidence
After fetching current main, the exact merge base remains
07ef5b84fd1b1bf29c069cf7d3b92686cf5a1f1f. Fresh runs ofscripts/check-test-lines-ratchet.mts --base 07ef5b84fd1b1bf29c069cf7d3b92686cf5a1f1freport:This PR allocates exactly its 213 added lines. The remaining 47 inherited lines are unchanged debt; the shared scalar is unchanged. Main's no-new-tests exception can pass despite that debt, so its passing ratchet job does not disprove inheritance. The campaign coordinator explicitly directed the native
pre-existing-failureroute on this evidence, following #194009 and #194070. The failed gate is retained as failed rather than described as green.Production Knip reports the unchanged unused
extensions/deep-research/browser/client.ts; the exact same file is reported on the measured base. There are no new unused files in this change.The current CI attempt tests merge
33d7578439eb0b7778e758e8b71324bd0c73e153over main parent077eac1f36fa1d6e8c1fd2888cc326b8fa6088d3. On this newer main parent, debt is 52 lines (6,551,670 against 6,551,618); CI reports the same 52 lines after the PR (6,551,883 against 6,551,831). The net addition remains exactly +213. Both comparisons preserve the shared scalar.Other observed failures in run 42277923787 were reproduced on that exact main parent:
renders async page loads and retains the page and focus through successful and failed refreshesexpected null to be 'false'.restores uncertain starts only for the same account after a native remount;opens native pane, safely navigates citations, handles cancellation/offline/reconnect and clears denied data./client.js; its plugin build independently reproduces the same error.confirms replacement from the literal command and Goal picker without restarting the goal;confirms a running goal without stopping on Cancel and adopts its resumed turn/goalprefix after Cancel, received the objective text without the prefix../client.jsinbrowser/index.tsxandbrowser/pane.tsx, with the resulting implicit-anyidandvalue.The relevant Browser, Deep Research, build, checker and scalar inputs are identical between this main parent and the tested merge. The latest completed scheduled main run predates the broken Deep Research addition, so these attributions use direct exact-parent reproductions, not a matching-job-name claim. No failed CI is presented as green.
Renderer LOC: 445 → 486 (+41). Whole PR: 19 files, +425/−107. Manual effects/listeners/DOM queries/flush/owner APIs remain 0 → 0;
onSettledsites are 3 → 4. No new dependency, eager page import, host-tag/class rename, or composer-geometry change.Inspected Synthetic Captures