Skip to content

perf(control-ui): reduce dashboard loading flashes on warm reload - #190925

Merged
steipete merged 9 commits into
mainfrom
steipete/coldload-board-widgets-warm
Nov 2, 2026
Merged

steipete merged 9 commits into
mainfrom
steipete/coldload-board-widgets-warm

Conversation

@steipete

@steipete steipete commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Final head: 35138da3cf7cf532f96c146fcd15885b7b5aebd0. Supersedes #190820. Reopened under explicit lead acceptance of the measured runtime at f8043775d6ffd41a1219a8f4937f9dea879bdf81. Measurement baseline: b0fdadd6b3448af5e23c45794465d48d97944fbe; landing rebase: 2777468d26e5f21455b67591a045a40c770aee13. Runtime files are byte-identical after the conflict-free rebase.

The campaign evidence recorded 14 visual states on a signed-in dashboard deep-link reload. This lane attributed 60 shimmer nodes to three successive 20-node panel placeholders. The previous experiment held route admission while preparing optional wrappers and delayed the side-pane transcript.

Why This Change Was Made

The route now returns its entry immediately while starting both existing lazy wrappers without awaiting them. Only the rendered boundary waits. The shared panel placeholder uses the existing scoped cached-session fact to keep its background for a 200 ms grace, then shows normal loading feedback if still pending. This bounds a brief wait without an immediate shimmer flash; cold admission stays immediate. One stylesheet implementation reaches native component roots, including widget-frame overlays, and a nested cold pane resets the inherited delay. No persisted field, store, config option, protocol, ticket, or sandbox change.

The page-board selectors now target the real board's direct children, excluding the placeholder's identically named grid and tabs. The superseded direct implementation preload block and route-level Promise.all barrier are removed. No new untrack allowance remains.

User Impact

The visible gain is substantial: median viewport panel-shimmer exposure falls from 13,290 to 0 node·ms, with improvement in 11/11 pairs; 7/11 candidate reloads have zero panel-shimmer exposure. Cached widget layout and widget readiness improve in every pair, and side-pane paint is earlier by paired median.

The standing hello-handled secondary gate fails. Dashboard hello-handled moves from 679.34 [654.31, 695.49] to 723.14 [698.48, 743.08] ms: non-overlapping IQRs, paired median +26.28 ms, 8/11 later. The paired-sign limb alone does not trigger (8, not 9); the separate non-overlapping-IQR limb does. Matched A/A is 673.89 [656.79, 698.11] → 671.75 [656.31, 692.90] ms, paired median +11.07 ms, 6/11 later with overlapping IQRs. It does not reproduce the shifted distribution.

The original transcript regression is gone: first painted rows have paired median −31.88 ms, visible transcript −30.47 ms, both 7/11 earlier. Chat secondaries satisfy the no-regression rule. Explicit lead exception; this is not a claim that the gate passed. The lead accepts dashboard hello-handled paired median +26.28 ms (IQRs separated by about 3 ms, 8/11 later; matched A/A +11.07 ms with overlapping IQRs) as the cost of compiling/mounting the board work the user is waiting for before the handshake. Every listed dashboard content milestone moves earlier: panel shimmer 13,290 → 0 node·ms (11/11 better), cached layout −281.56 ms (11/11), all widgets visible −193.32 ms (11/11), widget content −160.42 ms (10/11), side-pane first painted rows / visible transcript −31.88/−30.47 ms (7/11), LoAF blocking −26.10 ms, warm CLS occurrences 2/11 → 0/11; chat has no measured regression. The hello gate guards against trading away visible transcript time; visible transcript instead improves here, and no measured visible content is delayed. The decision to deviate from the standing hello secondary belongs explicitly to the lead.

Evidence

AWS Crabbox cbx_6387e254d075, run run_d7e29e0bb21ead47b244528fd241b987; one fixed c7a.4xlarge, 16 CPUs, about 31 GiB RAM, Chromium 156.0.8078.4. Unprofiled native real-Gateway Team-scale workload: 3,000 synthetic sessions, bundled Workboard plus synthetic plugin modules, archived routes, operator-like involving-me/category/created sidebar settings, 97 synthetic groups, 102 section-order entries, five collapsed sections, always-visible empty groups, previews disabled, and pins. Eleven interleaved AB/BA pairs per route, then eleven matched A/A pairs per route. A/A uses a separate byte-identical baseline directory so root swapping matches A/B. Both arms use the same built Gateway and durable synthetic state.

Native CDP shaping: 80 ms latency, 10 MiB/s each direction; it is not calibrated per-RPC wire RTT. Initial fixture-inclusive CPU idle was 74.7% (A/B) and 75.9% (A/A); live synthetic peers remain active. A/B end load was 0.90/1.04/1.27 on 16 CPUs. No unrelated workload was run on the lease. No local timings are performance results.

Command for each comparison (A/A substitutes the byte-identical directory):

node --import ./scripts/tsx.mjs scripts/perf/warm-reload-proof.ts \
  --dist dist --base .local/l280-r2/base-ui --candidate .local/l280-r2/candidate-ui \
  --output .local/l280-r2/comparison --route both --transcript-late-paint \
  --dashboard-end-anchor --plugin-activation --reloads 11 \
  --capture-ms 8000 --rtt-ms 80 --init-script scripts/perf/board-widgets.init.js

Every warm capture has one document load and zero browser errors. Snapshot bytes are unchanged: chat 62,970 → 62,970; dashboard 64,783 → 64,783. Growth: 0 bytes.

cachedBoardLayoutMs is the first rAF observing the real cached widget layout; allBoardWidgetsVisibleMs observes the existing non-inert readiness contract. First rows use the browser's element-timing paint observation. DOM readiness marks are not display-vsync proof. The contact strips below are Chromium compositor captures, aligned at common timestamps with the last delivered representative held between frames.

CLS attribution

Baseline dashboard pair 3 records CLS 0.0071706087 at 834.53 ms. Both sources are div.widget inside openclaw-panel-loading-skeleton > .board-grid, not the transcript or header:

Placeholder card Previous rectangle (x,y,w,h) New rectangle (x,y,w,h)
Eight-column card 680, 380, 700, 192 680, 276, 700, 114
Four-column card 324, 380, 344, 192 324, 276, 344, 114

The page-mode descendant .board-grid selector overrides the skeleton's 56 px rows with minmax(0,1fr): the lower cards move up 104 px and shrink 78 px. Restricting the rule to > .board-view > .board-grid preserves the placeholder geometry; the matching tab rule is scoped too. The browser regression asserts 56 px placeholder rows while HTML is held. Warm dashboard CLS occurrences: baseline 2/11, candidate 0/11. A/A retains intermittent occurrences; chat warm CLS is zero in both arms.

Representative widget path

Pair 6 is selected by the median paired widget-readiness delta. One sandboxed widget is exercised; the plugin activation fixture does not establish data-heavy MCP app performance. Times are diagnostic document-relative milliseconds (rAF metrics are navigation-normalized; the other event marks use the document clock).

Stage Baseline Candidate
First panel placeholder exists 559.1 504.1
Side-pane first painted rows 603.4 555.5
Iframe created 890.5 637.2
Ticket-bound HTML fetch starts 890.7 637.4
HTML response headers (200, no-store) 1039.3 648.9
Cached widget layout observed in rAF 947.2 637.8
Sandbox proxy ready 1040.0 728.8
Inner resource loaded 1111.9 939.8
Widget readiness / non-inert frame 1171.4 978.1
Hello handled 679.3 705.6

The rAF layout marker can follow iframe creation when the main thread is busy. Board/layout data comes from the existing snapshot in both arms. The candidate starts the iframe before hello; it does not wait for connect or a fresh board.get. Static sandbox assets retain their cache path; the existing ticket-bound HTML fetch remains fresh. Response headers do not mean the document body/iframe bootstrap has finished. Existing host-state posting and authorization are unchanged; no data RPC is added. The remaining document/iframe work is outside this change.

Diagnostic timing for the accepted secondary exception: dashboard connected-state publication medians are 639.54 → 676.64 ms; publication-to-handled interval medians are 41.6 → 44.7 ms. Most of the shift precedes publication. These unprofiled marks do not establish a specific CPU or server cause.

Inspected synthetic before/after strips

All nine strips for pair 6 were inspected locally. Only synthetic app content and public app artwork are present. No private capture is uploaded. The common bootstrap loading surface remains visible in both arms; this lane changes the subsequent panel placeholders, not the entire campaign's warm-reload experience.

Early panel interval (baseline left, candidate right):

Synthetic dashboard early panel interval

Widget fill interval:

Synthetic dashboard widget fill interval

Validation and gaps

Measured head f8043775d6ffd41a1219a8f4937f9dea879bdf81 on cbx_6387e254d075 (retained prior-head proof): build, scoped scripts/UI lint, stylesheet lint, Solid guard, exact test-line guard, and five focused suites 58/58 passed (10.63 s remote wall). Dashboard regression 2/2 passed: pnpm test ui/src/e2e/dashboard-cold-load.e2e.test.ts --maxWorkers=1, 31.98 s wall. The same changed test on measurement baseline b0fdadd6b3448af5e23c45794465d48d97944fbe fails 2/2 at the intended warm-shimmer visibility assertion, 25.16 s wall. It also covers cold immediate feedback, independent transcript/layout readiness while a board chunk is held, expiry of the grace, and fixed placeholder geometry. The browser/build setup is included in that wall time; real lazy-chunk admission, iframe lifecycle, and computed CSS animation/geometry are the contract a mocked unit test cannot exercise.

Initial landing CI found an owned unit-test timeout in route-subscription-preload.test.ts: it awaited presentation imports in the data loader, although the measured fix intentionally starts them at component entry. The test now retains subscription preload/no-observer coverage; the dashboard browser regression owns the independent chunk/render behavior. The test-only fix passes locally (3.71 s wrapper) and remotely on the final head (pnpm test ui/src/pages/chat/route-subscription-preload.test.ts --maxWorkers=1, 4.44 s wall), with no runtime change. Independent local review is clean through P2 for the candidate and the test-only repair.

Final-head validation used AWS cbx_c475a08f3c1a, one c7a.4xlarge (16 CPUs, 31,378 MiB RAM). Collector run run_81b9c8d6ab777ac9c9dd74ccfbaa5030; pinned-main control run run_cee74ccf92b1a84d6aa67f8c1c9580d4. Both candidate and control source trees were verified clean at their pinned SHAs. All runtime files in this diff are byte-identical to the measured head after the conflict-free rebases; the conditional five-pair recheck was not triggered.

The full UI e2e suite ran once on final head with no include-file filter and no real-Gateway/production-artifact opt-outs: 896 files: 894 passed, 2 inherited failures; 3,387 tests passed, 2 inherited failures, 4 intentional skips. Wall time: 4,853.39 s (80m53s). The dashboard regression passed 2/2 on this head. The full per-file native JSON and pass/fail inventory are retained with the task evidence.

The changed-file gate ran to completion in 1,015.67 s. Its other 28 phases passed; only the global export scan failed. Every failure below reproduces on pinned baseline 2777468d26e5f21455b67591a045a40c770aee13, installed from its frozen lockfile on the same lease:

Validation Final-head failure Pinned-main control
node scripts/check-changed.mjs --base 2777468d26e5f21455b67591a045a40c770aee13 Production Knip: PluginHookChannelPairingContext, PluginHookChannelPairingRequestedEvent, PluginHookRunStoppedContext; full-tree: the two pairing types Exact same production/full-tree findings from node --import tsx scripts/check-deadcode-exports.mts; exit 1, 141.88 s
ui/src/e2e/chat-outbox-migration.e2e.test.ts Initial roster readiness timeout in the v3 Blob migration case Same test and same error; 1 passed / 1 failed, 33.14 s wall
extensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts Transport setup rejects a private mutation boundary writable by another POSIX principal Same test and same error; 1 passed / 1 failed, 84.17 s wall

Each e2e control ran separately through node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts <file> --maxWorkers=1. No assertions, permissions, or timeouts were relaxed. The four default skips are mobile deferred steering, opt-in live DeepSeek, the configured desktop worker carrier, and creator-review authority. These are recorded as gaps, not passing proof.

The on-lease UI base-budget comparison and packaged build passed. Exact-head CI 41420865844 completed successfully: 42 successful checks, 24 intentional skips, including the corrected unit shard and control-ui-performance. No performance budget was raised or waived. No CI rerun/update-branch was used to chase green. Independent local autoreview is clean through P2 for the candidate and test-only repair. The accepted native A/B and A/A remain the performance evidence; the canonical live-capped script was not run at the prior stop, and no new timings are claimed for the rebase.

All owned leases are released and all test Gateways have stopped; no local Gateway was started. This PR is ready for lead review and remains unmerged. The standing hello secondary still fails as documented above; its explicit lead exception is the only performance-gate deviation claimed.

Runtime delta remains +39 LOC, required for the shared warm-only grace and independent nested preparation without a route barrier. Tooling is reduced from +219 to +99 net LOC by removing 120 lines of one-off fetch/message/iframe/presentation timeline and detailed layout-shift source collection. The proof command retains the gate metrics and synthetic peer heartbeat fix; sibling metrics on main are preserved. Final prescribed production delta is +140 LOC (+39 runtime, +99 tooling, +2 exact allocation-record lines). The regression's test-line allocation is exactly +36, covering independent cached layout/transcript readiness, warm grace/no flash, cold immediate feedback, and fixed placeholder geometry, after deleting the obsolete loader-owned presentation test harness; no slack or changelog edit.

Release-note context: fewer dashboard loading flashes while cached layout and transcript remain independently available.

All table deltas are candidate minus baseline; negative is earlier/lower. Distribution cells show median [Q1, Q3]. Times are milliseconds, shimmer exposure is node·ms, and CLS is dimensionless.

All A/B metrics and per-pair deltas

chat

Metric Baseline median [IQR] Candidate median [IQR] Paired delta Better / worse
boardWidgetSkeletonMs 0.00 [0.00, 0.00] 0.00 [0.00, 0.00] 0.00 [0.00, 0.00] 0 / 0
cachedBoardLayoutMs — — — 0 / 0
allBoardWidgetsVisibleMs — — — 0 / 0
widgetContentReadyMs — — — 0 / 0
helloHandledMs 619.98 [606.38, 629.56] 619.60 [604.40, 643.52] 9.53 [-16.59, 26.42] 5 / 6
fcpMs 74.18 [72.26, 77.22] 75.28 [74.40, 77.24] -0.16 [-0.75, 2.38] 6 / 5
firstPaintedRowsMs 547.38 [533.44, 579.48] 539.47 [525.45, 557.44] -0.07 [-37.92, 32.00] 6 / 5
finalRowsDomMs 468.88 [457.19, 498.63] 466.30 [444.15, 481.97] 2.23 [-40.92, 27.50] 5 / 6
visibleTranscriptMs 468.78 [457.19, 498.63] 466.20 [444.10, 481.97] 2.13 [-40.92, 27.55] 5 / 6
loafBlockingMs 250.40 [241.50, 276.95] 243.00 [237.95, 260.15] -5.60 [-27.75, 6.05] 8 / 3
cls 0.00000 [0.00000, 0.00000] 0.00000 [0.00000, 0.00000] 0.00000 [0.00000, 0.00000] 0 / 0
Pair boardWidgetSkeletonMs cachedBoardLayoutMs allBoardWidgetsVisibleMs widgetContentReadyMs helloHandledMs fcpMs firstPaintedRowsMs finalRowsDomMs visibleTranscriptMs loafBlockingMs cls
1 0.00 — — — 11.47 5.03 8.07 8.47 8.47 -0.80 0.00000
2 0.00 — — — -3.06 0.89 -63.96 -53.96 -53.96 -41.40 0.00000
3 0.00 — — — 32.40 -1.02 36.00 24.40 24.50 -5.60 0.00000
4 0.00 — — — -35.56 -7.81 -35.96 -38.86 -38.96 -30.40 0.00000
5 0.00 — — — 36.60 -0.49 28.00 30.60 30.60 24.10 0.00000
6 0.00 — — — -43.49 -0.16 -39.89 -42.99 -42.89 -25.10 0.00000
7 0.00 — — — 20.43 1.69 39.93 43.13 43.23 -8.10 0.00000
8 0.00 — — — -9.69 -2.90 -72.09 -70.09 -70.09 -51.00 0.00000
9 0.00 — — — 9.53 3.08 -0.07 2.23 2.13 -4.60 0.00000
10 0.00 — — — -23.49 -0.40 -31.99 -31.89 -31.79 12.90 0.00000
11 0.00 — — — 53.00 11.96 40.00 38.30 38.30 23.20 0.00000

dashboard

Metric Baseline median [IQR] Candidate median [IQR] Paired delta Better / worse
boardWidgetSkeletonMs 13290.00 [12495.00, 13633.00] 0.00 [0.00, 1569.00] -12258.00 [-13281.00, -11552.00] 11 / 0
cachedBoardLayoutMs 947.24 [925.32, 970.49] 658.12 [636.90, 677.95] -281.56 [-327.22, -240.72] 11 / 0
allBoardWidgetsVisibleMs 1215.22 [1186.17, 1242.74] 1018.62 [973.07, 1071.80] -193.32 [-231.25, -117.34] 11 / 0
widgetContentReadyMs 1223.12 [1171.52, 1267.44] 1046.82 [1000.72, 1089.06] -160.42 [-226.22, -144.49] 10 / 1
helloHandledMs 679.34 [654.31, 695.49] 723.14 [698.48, 743.08] 26.28 [-2.66, 79.41] 3 / 8
fcpMs 68.65 [66.53, 74.07] 70.37 [68.79, 77.13] 3.79 [-2.00, 5.57] 4 / 7
firstPaintedRowsMs 603.44 [583.48, 613.39] 583.55 [565.49, 603.35] -31.88 [-49.80, 15.81] 7 / 4
finalRowsDomMs 560.94 [539.48, 570.89] 545.32 [524.49, 560.70] -30.47 [-46.55, 16.06] 7 / 4
visibleTranscriptMs 560.94 [539.48, 570.84] 545.32 [524.44, 560.70] -30.47 [-46.60, 16.06] 7 / 4
loafBlockingMs 255.30 [252.60, 265.20] 244.10 [220.35, 258.95] -26.10 [-37.00, 3.85] 7 / 4
cls 0.00000 [0.00000, 0.00000] 0.00000 [0.00000, 0.00000] 0.00000 [0.00000, 0.00000] 2 / 0
Pair boardWidgetSkeletonMs cachedBoardLayoutMs allBoardWidgetsVisibleMs widgetContentReadyMs helloHandledMs fcpMs firstPaintedRowsMs finalRowsDomMs visibleTranscriptMs loafBlockingMs cls
1 -14436.00 -244.42 -229.62 -160.42 -15.82 -1.50 -40.12 -35.02 -35.02 -32.00 0.00000
2 -11818.00 -325.47 -192.77 -235.57 1.93 -18.78 -31.88 -30.47 -30.47 -26.10 0.00000
3 -11286.00 -27.22 -80.92 -100.52 90.28 5.77 23.68 22.58 22.58 39.70 -0.00717
4 -12732.00 -328.97 -232.87 -216.87 12.83 3.79 -51.67 -46.67 -46.67 -59.80 0.00000
5 -11988.00 -281.56 -142.26 -152.56 71.24 0.45 7.94 9.54 9.54 0.20 0.00000
6 -12258.00 -309.42 -193.32 -158.72 26.28 14.40 -47.92 -46.42 -46.52 -35.40 0.00000
7 -11202.00 -237.01 -92.41 -136.41 87.59 5.37 23.89 28.79 28.79 7.50 0.00000
8 -13290.00 -338.95 -283.25 -243.45 -14.85 17.08 -59.95 -55.25 -55.25 -38.60 0.00000
9 -11106.00 -10.47 -53.07 15.03 118.03 -8.29 35.93 35.03 35.03 73.40 -0.00717
10 -13468.00 -342.85 -283.65 -249.65 -7.25 -2.50 -51.85 -48.85 -48.75 -56.20 0.00000
11 -13272.00 -268.40 -216.90 -176.30 59.20 5.08 -16.20 -8.80 -8.70 -2.40 0.00000
Matched A/A metrics and per-pair deltas

chat

Metric Baseline median [IQR] Candidate median [IQR] Paired delta Better / worse
boardWidgetSkeletonMs 0.00 [0.00, 0.00] 0.00 [0.00, 0.00] 0.00 [0.00, 0.00] 0 / 0
cachedBoardLayoutMs — — — 0 / 0
allBoardWidgetsVisibleMs — — — 0 / 0
widgetContentReadyMs — — — 0 / 0
helloHandledMs 624.13 [600.84, 637.30] 621.24 [595.68, 642.45] -20.07 [-30.31, 28.86] 6 / 5
fcpMs 72.73 [71.50, 73.64] 73.40 [72.25, 74.82] 0.00 [-1.15, 2.30] 5 / 6
firstPaintedRowsMs 547.43 [525.49, 561.49] 547.44 [513.41, 559.46] -23.97 [-48.04, 25.91] 6 / 5
finalRowsDomMs 471.93 [447.89, 486.44] 474.04 [438.86, 482.66] -21.87 [-48.79, 28.16] 6 / 5
visibleTranscriptMs 471.93 [447.84, 486.44] 473.94 [438.81, 482.61] -21.87 [-48.84, 28.16] 6 / 5
loafBlockingMs 242.50 [229.80, 274.85] 245.90 [231.90, 261.40] -0.70 [-28.95, 14.75] 6 / 4
cls 0.00000 [0.00000, 0.00000] 0.00000 [0.00000, 0.00000] 0.00000 [0.00000, 0.00000] 0 / 0
Pair boardWidgetSkeletonMs cachedBoardLayoutMs allBoardWidgetsVisibleMs widgetContentReadyMs helloHandledMs fcpMs firstPaintedRowsMs finalRowsDomMs visibleTranscriptMs loafBlockingMs cls
1 0.00 — — — -20.07 -0.39 -23.97 -21.87 -21.87 -0.70 0.00000
2 0.00 — — — -20.80 -1.91 -64.00 -61.90 -62.00 -47.50 0.00000
3 0.00 — — — 21.54 3.35 19.84 20.44 20.34 -19.60 0.00000
4 0.00 — — — -24.48 -2.37 -35.98 -32.58 -32.68 -38.30 0.00000
5 0.00 — — — 46.12 2.46 39.92 39.72 39.72 51.70 0.00000
6 0.00 — — — -70.34 0.00 -63.94 -66.04 -66.04 -19.10 0.00000
7 0.00 — — — 58.78 2.14 71.78 65.48 65.48 25.60 0.00000
8 0.00 — — — -57.95 1.49 -44.15 -46.55 -46.55 -38.30 0.00000
9 0.00 — — — 33.46 -0.13 23.86 26.76 26.76 37.50 0.00000
10 0.00 — — — -36.13 -3.93 -51.93 -51.03 -51.13 3.90 0.00000
11 0.00 — — — 24.26 5.44 27.96 29.56 29.56 0.00 0.00000

dashboard

Metric Baseline median [IQR] Candidate median [IQR] Paired delta Better / worse
boardWidgetSkeletonMs 12976.00 [12143.00, 14014.00] 12884.00 [12315.00, 13455.00] -432.00 [-1293.00, 1158.00] 6 / 5
cachedBoardLayoutMs 941.19 [713.54, 961.98] 927.91 [821.80, 960.62] -20.89 [-57.06, 125.99] 6 / 5
allBoardWidgetsVisibleMs 1200.28 [1140.31, 1274.76] 1207.50 [1162.51, 1215.39] 7.22 [-95.16, 53.46] 5 / 6
widgetContentReadyMs 1214.91 [1146.32, 1262.46] 1182.12 [1148.63, 1264.34] -2.96 [-73.09, 35.90] 6 / 5
helloHandledMs 673.89 [656.79, 698.11] 671.75 [656.31, 692.90] 11.07 [-34.28, 28.17] 5 / 6
fcpMs 68.72 [66.22, 72.28] 66.41 [65.44, 70.74] -1.59 [-4.13, 3.39] 8 / 3
firstPaintedRowsMs 599.49 [581.49, 619.38] 599.35 [585.39, 613.40] 8.17 [-31.95, 23.87] 5 / 6
finalRowsDomMs 554.89 [538.19, 576.51] 556.85 [543.09, 571.05] 11.27 [-31.25, 25.07] 5 / 6
visibleTranscriptMs 554.89 [538.19, 576.46] 556.85 [543.09, 571.05] 11.37 [-31.20, 25.02] 5 / 6
loafBlockingMs 255.00 [233.65, 265.40] 239.80 [236.65, 261.75] -8.90 [-16.10, 17.10] 6 / 5
cls 0.00000 [0.00000, 0.00717] 0.00000 [0.00000, 0.00359] 0.00000 [-0.00359, 0.00000] 3 / 2
Pair boardWidgetSkeletonMs cachedBoardLayoutMs allBoardWidgetsVisibleMs widgetContentReadyMs helloHandledMs fcpMs firstPaintedRowsMs finalRowsDomMs visibleTranscriptMs loafBlockingMs cls
1 -792.00 -20.89 -48.99 -49.79 -13.19 -7.35 -8.19 -9.39 -9.39 -17.80 0.00000
2 -1622.00 -65.58 -115.98 -124.78 -52.58 -2.70 -36.08 -34.88 -34.78 -34.80 0.00000
3 -2162.00 31.61 -86.59 -96.39 29.21 7.23 19.91 21.51 21.51 5.20 0.00000
4 932.00 -171.43 59.47 114.37 11.07 -1.59 8.17 12.77 12.87 -10.20 0.00717
5 1616.00 262.23 126.93 189.33 57.53 6.96 44.03 46.13 46.03 51.40 -0.00717
6 -1618.00 -21.33 -108.53 -36.03 -31.03 -0.17 -27.83 -27.63 -27.63 -8.90 0.00000
7 -432.00 242.92 7.22 54.22 27.12 -18.78 27.82 28.62 28.62 55.70 -0.00717
8 1384.00 -48.54 28.26 4.16 -37.54 -2.32 -43.84 -41.04 -40.94 -14.40 0.00000
9 376.00 30.44 47.44 -2.96 36.14 -0.60 31.84 28.64 28.54 29.00 0.00000
10 -968.00 -285.93 -103.73 -114.53 -60.03 -5.56 -55.83 -55.43 -55.33 -57.10 0.00717
11 1684.00 220.37 95.77 17.57 12.27 14.68 11.87 11.27 11.37 2.30 -0.00717

@clawsweeper

clawsweeper Bot commented Nov 2, 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 docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: M labels Nov 2, 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR prepares dashboard renderers without blocking route admission and delays cached-panel loading decorations by 200 ms.

Example: Reload a dashboard with a cached session while its board renderer is still loading.

  • Before: Successive lazy boundaries can immediately display loading shimmers.
  • After: Renderer preparation runs independently, and cached-panel decorations remain hidden for the first 200 ms.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The experiment has a coherent implementation and preserves existing owners, but the baseline expansion is definite and the replacement has no qualifying runtime results yet.
Proof confidence 🦪 silver shellfish (2/6) This maintainer-authored draft is outside the ordinary contributor proof gate; its body reports shared-placeholder tests and a synthetic CSS smoke, while explicitly leaving qualification of the changed real-Gateway reload behavior pending.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: A cached dashboard reload flashes successive loading placeholders while the board and transcript presentation prepare.
Reason: The maintainer-directed experiment addresses an observed loading sequence and explicitly preserves a qualification gate before adoption.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-directed experiment open and respect its do-not-merge status; the introduced baseline expansion is a concrete blocker.

Priority: P3
Reviewed head: da4881b33b66a9be20d35cb1b33bfb26bcfd7f6b

Before merge

  • Preserve the shrink-only untrack allowance (P2) - This entry raises chat-pane-runtime-view.tsx from zero allowed untrack calls to one. The Solid policy explicitly prohibits increasing these allowances, and the controller guard compares the proposed baseline with the merge base using countAtRef: () => 0, so this head is rejected as an allowance expansion even though its current count matches the edited file. Capture the initial cached-session fact without adding guarded debt and remove this baseline entry.

Findings

  • [P2] Preserve the shrink-only untrack allowance — config/control-ui-untrack-baseline.txt:14

Tests

  • Missing end-to-end proof: Exact-head real-Gateway warm/cold captures, inspected before/after images, declared performance comparisons, and base-red/head-green dashboard regression results remain pending.
Agent review details

How this fits together

The Control UI dashboard route loads presentation modules, consumes existing scoped session snapshots, and renders the board and transcript through independent lazy boundaries.

flowchart LR
  A[Dashboard route] --> B[Route entry]
  A --> C[Lazy renderer preparation]
  B --> D[Cached session pane]
  C --> E[Board and sidebar boundaries]
  D --> E
  E --> F[Shared loading placeholder]
  E --> G[Board and transcript]
Loading

Technical review

Best possible solution:

Keep preparation in the existing lazy owners and loading grace in the shared placeholder, while preserving the shrink-only guard and qualifying the experiment before advancing it.

Do we have a high-confidence way to reproduce the issue?

Current source contains successive lazy placeholders and broad page-mode selectors that reach placeholder grids; the earlier experiment supplies matching observations, but this read-only review ran no target code.

Is this the best way to solve the issue?

The change reuses the existing cache, lazy boundaries, and shared placeholder rather than adding a competing owner; its smallest complete form must also avoid expanding the untrack baseline.

Full review comments:

  • [P2] Preserve the shrink-only untrack allowance — config/control-ui-untrack-baseline.txt:14
    This entry raises chat-pane-runtime-view.tsx from zero allowed untrack calls to one. The Solid policy explicitly prohibits increasing these allowances, and the controller guard compares the proposed baseline with the merge base using countAtRef: () => 0, so this head is rejected as an allowance expansion even though its current count matches the edited file. Capture the initial cached-session fact without adding guarded debt and remove this baseline entry.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6deb24aa4654.

Provenance checked

  • Dashboard renderer preparation keeps the original intent (0a9f3a6: perf(ui): shorten remote page loading waterfalls #188922 starts Board presentation modules together to reduce remote lazy-module discovery waterfalls.)
  • Lazy panel readiness and error ownership keeps the original intent (5b4ee4d: refactor(ui): lazy-load chat panels and widgets #181229 replaces manual component-loading state with Solid lazy boundaries while retaining local loading and error behavior.)
  • Shared loading presentation changes intended behavior with a stated reason (eca633a: refactor(ui): share presentation primitives across Solid and Lit #168576 establishes one shared presentation implementation; the PR explains its intentional cached-pane grace while retaining that owner.)
  • Page-mode board geometry keeps the original intent (5c1691e: Fullscreen website dashboards use a filling grid; narrowing selectors preserves real board sizing while excluding the placeholder grid.)
  • Warm-reload synthetic peers changes intended behavior with a stated reason (5df2f45: The real-Gateway proof rig paused synthetic peers; the linked stopped experiment documents missed heartbeats and explains keeping peers running without relaxing viewer acknowledgements.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff replaces speculative implementation imports with non-awaited preloads of the rendered lazy wrappers, adds pane-scoped loading grace, and narrows board selectors. (ui/src/pages/chat/route.ts:80, da4881b33b66)
  • Baseline expansion is rejected by its owner: The added per-file untrack allowance increases from zero to one; the controller guard supplies no grandfathered allowance for this addition and the shared ratchet rejects expanded baselines. (scripts/check-control-ui-controllers.mts:573, da4881b33b66)
  • Draft and explicit pause: The complete current PR body calls this an unqualified experiment, explicitly says do not merge, and leaves exact-head qualification pending; GitHub reports draft=true and mergeable=true. (da4881b33b66)
  • Earlier experiment explains the replacement: experiment(control-ui): preload cached dashboard renderers [stopped] #190820 was closed unmerged after its route-blocking candidate improved shimmer exposure but failed its transcript-paint acceptance gate; those results do not establish this replacement's performance.
  • Current-main behavior and feature history: Fetched main retains the earlier direct-import preparation and immediate shared placeholders; history identifies the dashboard waterfall optimization, lazy-panel ownership, shared skeleton migration, and later visual refinements. (ui/src/pages/chat/route.ts:38, 6deb24aa4654)
  • Repository policy applied: Read root and applicable UI, scripts, and docs guidance; no maintainer-notes directory exists at this checkout, and the requested installed Solid cheatsheet is absent. (ui/AGENTS.md:5, da4881b33b66)

PR surface

Source +42, Tests +65, Docs 0, Other +207. Total +314 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 55 13 +42
Tests 1 66 1 +65
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 6 214 7 +207
Total 15 336 22 +314

Review metrics

Metric Value Why it matters
Loading-feedback timing Cached pane: 200 ms grace; cold pane: immediate The shared placeholder changes loading feedback throughout a cached pane, including independently mounted native roots.

Root-cause cluster

Relationship: canonical
Canonical: #190925
Summary: This PR explicitly replaces the stopped route-blocking dashboard experiment.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P3: This is a paused loading-presentation experiment without evidence of an urgent user-facing failure.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is a paused loading-presentation experiment without evidence of an urgent user-facing failure.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 2, 2026, 2:09 AM ET / 07:09 UTC.

@steipete
steipete force-pushed the steipete/coldload-board-widgets-warm branch 3 times, most recently from fbe3ef3 to f804377 Compare November 2, 2026 07:35
@steipete steipete changed the title experiment(control-ui): non-blocking warm dashboard panels [do not merge] experiment(control-ui): non-blocking warm dashboard panels [stopped] Nov 2, 2026
@steipete steipete closed this Nov 2, 2026
@steipete steipete reopened this Nov 2, 2026
@steipete steipete changed the title experiment(control-ui): non-blocking warm dashboard panels [stopped] perf(control-ui): show cached dashboard panels without loading flashes Nov 2, 2026
@steipete
steipete force-pushed the steipete/coldload-board-widgets-warm branch from f804377 to da220d5 Compare November 2, 2026 09:09
@steipete
steipete marked this pull request as ready for review November 2, 2026 09:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-02T09:30:19.688127Z 35138da 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 force-pushed the steipete/coldload-board-widgets-warm branch from da220d5 to 35138da Compare November 2, 2026 09:27
@steipete steipete changed the title perf(control-ui): show cached dashboard panels without loading flashes perf(control-ui): reduce dashboard loading flashes on warm reload Nov 2, 2026
@steipete
steipete merged commit 31edd1e into main Nov 2, 2026
153 of 154 checks passed
@steipete
steipete deleted the steipete/coldload-board-widgets-warm branch November 2, 2026 11:53
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…enclaw#190925)

Warm reloads of a dashboard deep link no longer flash three successive panel shimmers. The dashboard route now returns its entry immediately and starts the sidebar-region and board lazy wrappers without awaiting them, so only the rendered boundary waits. The shared panel placeholder uses the existing cached-session fact (captured once at pane mount) to keep the settled background for a 200 ms grace before normal loading feedback; cold admission stays immediate. Page-board grid/tab selectors now target the real board's direct children, so the placeholder's 56 px rows no longer collapse and shift (the source of the warm-dashboard CLS). The route-level preload block is removed. No persisted field, store, config, protocol or untrack allowance.

Native 11-pair proof (AWS c7a.4xlarge, Team-scale synthetic fixture, 80 ms RTT): panel-shimmer exposure 13,290 -> 0 node*ms (11/11), cached widget layout -282 ms (11/11), all widgets visible -193 ms (11/11), widget content -160 ms (10/11), side-pane first rows / visible transcript -32/-30 ms (7/11), warm CLS occurrences 2/11 -> 0/11, snapshot growth 0 B; chat route unchanged. Lead exception: dashboard hello-handled +26 ms paired median (non-overlapping IQRs, 8/11 later; A/A +11 ms overlapping), accepted as the cost of compiling the board work before the handshake; no visible content is delayed.

Supersedes openclaw#190820.
steipete added a commit that referenced this pull request Nov 7, 2026
On a warm reload of an active chat, automatic end-follow aimed at estimated heights for the newly appended rows. Once the real measurements replaced those estimates, the transcript scrolled backward. A later tool completion repeated the correction. On Peter's real page this showed up as repeated corrections over roughly 500 ms and a CLS of 0.11 to 0.12.

Automatic end-follow now picks its destination from the existing native measurement batch. It waits until the mounted destination rows and their virtual sizes agree, and the competing synchronous warm measurement pass is gone. The measured window covers the full destination viewport, including several appended turns. Warm reader restoration joins that same batch. Real older-history prepends keep the synchronous anchor they need before paint, because deferring that boundary broke continuous native reading. Arrival retires the scroll command through its existing owner. Retargeting keeps an already-issued smooth destination while its measured replacement is prepared, so native motion that is still running is not mistaken for reader input. No store, config, protocol field or cache shape is added.

Proof: 11 interleaved pairs plus A/A on a quiet AWS c7a.4xlarge (132 pair deltas in total), Team-scale fixture.
- Active-chat backtracking goes from 76 to 0 px in 11/11 pairs. A planned second block confirms it.
- History replacement followed by tool completion goes from 144 to 0 px in 11/11.
- Both reader variants keep 0 px movement with no missing anchor frames.
- RPC counts and payloads are unchanged in every pair.
- The native regression e2e fails on the pre-fix code and passes on this head.
The lead accepted a recorded cost exception: +34 ms total blocking, +21 ms forced style/layout in the 700-1300 ms replacement window, and +7 ms final rows. That cost delays no visible content (same precedent as #190925).

Exact-head CI is green. Chat boot JS is +661 B against its base and stays inside the unchanged 1,289,030 B cap. No cap or baseline changed. The full UI suite's three reds reproduce identically on main.

The test-lines checker now lets an exact allocation reconcile the base's existing overage without creating slack. The bound is own growth plus inherited debt, floored at zero, with real-Git regression cases. This PR's allocation is 278 lines: 273 regression-test lines plus 5 lines of lead-approved inherited debt.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
On a warm reload of an active chat, automatic end-follow aimed at estimated heights for the newly appended rows. Once the real measurements replaced those estimates, the transcript scrolled backward. A later tool completion repeated the correction. On Peter's real page this showed up as repeated corrections over roughly 500 ms and a CLS of 0.11 to 0.12.

Automatic end-follow now picks its destination from the existing native measurement batch. It waits until the mounted destination rows and their virtual sizes agree, and the competing synchronous warm measurement pass is gone. The measured window covers the full destination viewport, including several appended turns. Warm reader restoration joins that same batch. Real older-history prepends keep the synchronous anchor they need before paint, because deferring that boundary broke continuous native reading. Arrival retires the scroll command through its existing owner. Retargeting keeps an already-issued smooth destination while its measured replacement is prepared, so native motion that is still running is not mistaken for reader input. No store, config, protocol field or cache shape is added.

Proof: 11 interleaved pairs plus A/A on a quiet AWS c7a.4xlarge (132 pair deltas in total), Team-scale fixture.
- Active-chat backtracking goes from 76 to 0 px in 11/11 pairs. A planned second block confirms it.
- History replacement followed by tool completion goes from 144 to 0 px in 11/11.
- Both reader variants keep 0 px movement with no missing anchor frames.
- RPC counts and payloads are unchanged in every pair.
- The native regression e2e fails on the pre-fix code and passes on this head.
The lead accepted a recorded cost exception: +34 ms total blocking, +21 ms forced style/layout in the 700-1300 ms replacement window, and +7 ms final rows. That cost delays no visible content (same precedent as openclaw#190925).

Exact-head CI is green. Chat boot JS is +661 B against its base and stays inside the unchanged 1,289,030 B cap. No cap or baseline changed. The full UI suite's three reds reproduce identically on main.

The test-lines checker now lets an exact allocation reconcile the base's existing overage without creating slack. The bound is own growth plus inherited debt, floored at zero, with real-Git regression cases. This PR's allocation is 278 lines: 273 regression-test lines plus 5 lines of lead-approved inherited debt.
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 docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: M 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