Skip to content

perf(ui): keep split and fork responsive during transcript mount - #194200

Merged
steipete merged 14 commits into
mainfrom
solid2/w-perf-fork-split-edit-1106
Nov 6, 2026
Merged

steipete merged 14 commits into
mainfrom
solid2/w-perf-fork-split-edit-1106

Conversation

@steipete

@steipete steipete commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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 is 4b9b85c65b5e9ed861970dedaf83dec363e3c0be. Subsequent commits change only the cap and test fixture. Current source head: 877ffc8d32338f1d61777af13d7a2a6007ffb51b.

Surface Raw bytes, base → head Served gzip, base → head Normalized gzip, base → head
Changed Chat chunk 1,401,982 → 1,402,455 (+473) 415,266 → 415,395 (+129) 412,507 → 413,371 (+864)
Whole Chat JS 4,152,222 → 4,152,695 (+473) 1,294,742 → 1,294,853 (+111) 1,286,741 → 1,287,605 (+864)
Startup JS 281,061 → 281,061 89,853 → 89,851 (−2) 89,480 → 89,480

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 chatBootJsGzipBytes changes, 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.

Flow Engine Samples/arm Longest task median / p95: base → head (A/A) Application median / p95: base → head (A/A)
Split Chromium 1× 30 76 / 82.55 → 56 / 61 (76.5 / 82.55) 139.85 / 150.37 → 140.35 / 156.22 (144.35 / 150.64)
Split Chromium 4× 20 391 / 451.9 → 304.5 / 334 (396 / 474.1) 704.85 / 790.85 → 705.35 / 775.84 (694.35 / 819.02)
Fork Chromium 1× 20 0 / 51.05 → 0 / 0 (0 / 2.5) 459.65 / 488.93 → 434.60 / 461.13 (457.60 / 495.92)
Fork Chromium 4× 20 233.5 / 289.15 → 187 / 207.15 (232.5 / 269.15) 1238.15 / 1367.28 → 1094.40 / 1221.13 (1202.60 / 1341.79)
Split WebKit 20 Unavailable 237.5 / 275 → 228 / 256.4 (241 / 270.15)
Fork WebKit 20 Unavailable 527 / 557.45 → 506.5 / 524.1 (534 / 553.1)

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.

Engine Flow n/arm Base ms Head ms A/A ms Host load
chromium 1x Copy control 20 1.60 / 2.43 (1.30–14.40) 1.50 / 1.70 (1.30–1.70) 1.50 / 1.61 (1.30–1.70) 7.7–17.8
chromium 1x Fork 20 459.65 / 488.93 (442.10–569.30) 434.60 / 461.13 (426.60–476.90) 457.60 / 495.92 (439.80–496.30) 5.1–12.1
chromium 1x Split open 30 139.85 / 150.37 (130.00–154.10) 140.35 / 156.22 (130.60–158.10) 144.35 / 150.64 (130.60–155.80) 5.1–10.9
chromium 1x Typing 20 56.15 / 58.84 (54.60–69.00) 56.05 / 57.80 (53.80–57.90) 56.45 / 68.21 (53.60–70.20) 5.2–11.8
chromium 1x Single key 20 25.45 / 38.69 (23.10–40.30) 25.00 / 37.03 (22.60–37.60) 25.90 / 39.24 (23.40–41.90) 4.4–6.4
chromium 1x Session switch 30 197.10 / 214.34 (194.90–232.20) 197.10 / 223.81 (195.60–232.20) 197.60 / 213.90 (195.30–231.10) 4.8–17.4
chromium 4x Copy control 20 25.80 / 29.85 (21.70–32.60) 26.45 / 29.14 (20.90–31.80) 26.45 / 30.68 (21.90–32.20) 6.5–9.1
chromium 4x Fork 20 1238.15 / 1367.28 (1145.70–1667.20) 1094.40 / 1221.13 (953.80–1250.10) 1202.60 / 1341.79 (1029.10–1413.90) 6.1–14.4
chromium 4x Split open 20 704.85 / 790.85 (605.80–837.40) 705.35 / 775.84 (601.20–780.50) 694.35 / 819.02 (585.30–823.20) 9.2–14.2
chromium 4x Typing 30 212.25 / 239.29 (183.70–260.10) 210.35 / 247.15 (178.40–386.90) 208.20 / 232.78 (181.40–358.50) 8.0–15.0
chromium 4x Single key 20 60.35 / 63.42 (45.70–63.80) 60.80 / 63.16 (44.40–64.30) 58.75 / 62.15 (44.50–63.00) 7.8–11.2
chromium 4x Session switch 20 577.20 / 631.25 (525.60–634.10) 577.20 / 608.90 (522.60–618.50) 570.40 / 641.15 (526.60–651.60) 8.9–12.8
webkit 1x Copy control 20 10.50 / 12.00 (10.00–12.00) 10.00 / 12.05 (9.00–13.00) 11.00 / 12.00 (9.00–12.00) 7.2–17.8
webkit 1x Fork 20 527.00 / 557.45 (503.00–566.00) 506.50 / 524.10 (486.00–526.00) 534.00 / 553.10 (509.00–555.00) 5.1–11.5
webkit 1x Split open 20 237.50 / 275.00 (210.00–275.00) 228.00 / 256.40 (215.00–264.00) 241.00 / 270.15 (211.00–273.00) 5.1–10.3
webkit 1x Typing 20 71.00 / 83.10 (66.00–104.00) 69.00 / 74.15 (64.00–77.00) 71.00 / 80.60 (66.00–111.00) 5.3–11.3
webkit 1x Single key 40 32.00 / 42.00 (24.00–42.00) 37.50 / 42.05 (24.00–47.00) 34.50 / 42.05 (24.00–43.00) 4.4–26.5
webkit 1x Session switch 30 220.50 / 254.55 (193.00–265.00) 223.50 / 257.75 (209.00–275.00) 218.00 / 259.85 (206.00–273.00) 4.4–15.9

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.

Retention, 2,000 messages Final post-GC heap MB: base / head / A/A Rows: base / head / A/A Listeners: base / head / A/A
Direct, three traversals each 73.23 / 73.15 / 73.34 13 / 13 / 13 2399 / 2399 / 2399
Mixed, three traversals each 88.94 / 90.41 / 90.48 6 / 6 / 6 3435 / 3435 / 3435

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 of scripts/check-test-lines-ratchet.mts --base 07ef5b84fd1b1bf29c069cf7d3b92686cf5a1f1f report:

Tree Test lines Effective ceiling Existing overage Net test delta
Exact base, without this PR 6,550,717 6,550,670 47 0
PR head 6,550,930 6,550,883 47 +213

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-failure route 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 33d7578439eb0b7778e758e8b71324bd0c73e153 over main parent 077eac1f36fa1d6e8c1fd2888cc326b8fa6088d3. 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:

Failure Exact-base evidence
Browser panel: renders async page loads and retains the page and focus through successful and failed refreshes The same named test fails with expected null to be 'false'.
Deep Research native bundle: 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 Both exact named tests reproduce on the CI main parent: fixture setup cannot resolve ./client.js; its plugin build independently reproduces the same error.
Two real-Gateway setup jobs and E2E shard 7 The same Deep Research build error occurs before tests run; base plugin build reproduces it.
Goal replacement: 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 Both exact named E2E tests reproduce on the CI main parent: expected the /goal prefix after Cancel, received the objective text without the prefix.
Production extension types Exact base reproduces all four diagnostics: missing ./client.js in browser/index.tsx and browser/pane.tsx, with the resulting implicit-any id and value.

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; onSettled sites are 3 → 4. No new dependency, eager page import, host-tag/class rename, or composer-geometry change.

Inspected Synthetic Captures

Before: settled split view on the measured base

After: settled split view on the measured head

Accepted WebKit placeholder with the first pane and both composers visible

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: M labels Nov 6, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This 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.

  • Before: Destination transcript construction runs synchronously with opening the pane.
  • After: The composer and loading placeholder appear first, then transcript construction starts after two scheduled frames.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and has meaningful lifecycle coverage; the supplied performance evidence remains preliminary.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor proof gate does not apply to this maintainer-authored PR; inspected WebKit screenshots and earlier browser measurements exercise the changed renderer, while the author explicitly withholds readiness pending final confirmation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Opening a split pane or forked conversation can briefly freeze the window while its transcript mounts.
Reason: The maintainer-authored direction addresses a measured interaction cost with a small lifecycle change and explicitly accepts the brief placeholder.

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
Reviewed head: 437ce115a96f020216b0522c1d8a0f64be6ff656

Before merge

  • Complete next step - Resolve GitHub’s reported merge conflict while preserving main’s newer performance ceilings.

Findings

None.

Tests

  • Missing end-to-end proof: The author’s final current-base split/fork timing, typing-control, retention, visual, and packaged-plugin budget confirmation remains pending.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Focused mount lifecycle: The introduced wrapper retains the outer viewport, schedules initial content through two layout frames, cancels pending work on teardown, and retains mounted content after later hides. (ui/src/pages/chat/components/chat-thread-view.tsx:98, 437ce115a96f)
  • Distinct lifecycle regression: The new pane-level regression covers cancellation while hidden or disposed, latest-history rendering on reveal, and retained viewport, row, composer, and focus identity. (ui/src/pages/chat/chat-pane-transcript-mount.test.tsx:30, 437ce115a96f)
  • Main still mounts synchronously: Fetched main retains the original ChatThread implementation without the two-frame mount boundary; the central change remains necessary. (ui/src/pages/chat/components/chat-thread-view.tsx:90, 642fd21190f2)
  • Author pause and accepted tradeoff: The maintainer-authored body explicitly accepts the brief WebKit placeholder and keeps final performance, retention, captures, and packaged-plugin budget qualification pending before readiness. (437ce115a96f)
  • Visual evidence inspected: Prepared before and after screenshots show matching settled split layouts, and the intermediate screenshot shows the destination placeholder with its composer already present; these captures are explicitly from the earlier base. (437ce115a96f)
  • Conflict and overlapping budget movement: GitHub reports mergeable=false and dirty for the reviewed head; fetched main independently lowers Chat and New Session ceilings in the same budget block. (scripts/check-control-ui-performance.mts:59, 642fd21190f2)

PR surface

Source +33, Tests +208, Other +59. Total +300 across 15 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 1 40 7 +33
Tests 9 283 75 +208
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 5 64 5 +59
Total 15 387 87 +300

Preflight source

Source 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

Metric Value Why it matters
Runtime versus regression coverage Runtime +40/−7 lines; tests and helpers +283/−75 lines The runtime growth creates one cancellable presentation boundary; test growth covers its lifecycle and adapts existing consumers without removing assertions.

Labels

Label changes:

  • add P2: Large split and fork destinations cause bounded, recoverable UI stalls, with measured improvement and limited scope.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Large split and fork destinations cause bounded, recoverable UI stalls, with measured improvement and limited scope.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the already-running confirmation and publish its split/fork results, typing controls, retention outcome, and inspected captures.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 6, 2026, 11:17 AM ET / 16:17 UTC.

@steipete steipete changed the title improve(ui): keep split and fork responsive while transcripts mount perf(ui): keep split and fork responsive during transcript mount Nov 6, 2026
@steipete
steipete marked this pull request as ready for review November 6, 2026 17:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T18:09:51.333186Z 1cb29b7 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit cddc5ee into main Nov 6, 2026
129 of 144 checks passed
@steipete
steipete deleted the solid2/w-perf-fork-split-edit-1106 branch November 6, 2026 19:44
@steipete

steipete commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant