Repository navigation
fix(control-ui): restore dashboards independently of transcript validation - #178658
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. |
a1cb7d8 to
8da6fc0
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR separates cached dashboard restoration from transcript validation and seeds sandbox themes to allow earlier frame painting. Example: Reload a saved dashboard while its history-validator download is delayed by 800 ms.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open under its explicit experiment hold; current main retains the reported dependency, and no definite introduced code defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI reads scoped browser snapshots, restores boards through the existing provider, validates transcript receipts separately, and renders ticket-bound documents through the shared sandbox. flowchart TD
A[Dashboard reload] --> B[Scoped snapshot reader]
B --> C[Transcript validation]
B --> D[Connect dispatch barrier]
D --> E[Existing board provider]
F[Live Gateway] --> E
E --> G[Themed sandbox frame]
C --> H[Transcript adoption]
Technical reviewBest possible solution: Restore dashboards through the existing scoped reader and board provider, retaining the earlier-paint strategy only if the declared performance and visual gates pass. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows cached board restoration waiting for the lazy transcript validator; the reported browser regression was not independently executed during this read-only review. Is this the best way to solve the issue? The restoration change reuses existing admission and lifecycle owners, and the theme seed addresses the documented opaque-canvas cause; the extracted hydration module replaces the previous implementation without introducing another store or authority owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1c4b27072712. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +46, Tests +344, Docs +3, Other +180. Total +573 across 23 files. Added test files: 1. View PR surface stats
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 October 20, 2026, 3:16 PM ET / 19:16 UTC. |
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. |
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8da6fc0d5f
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -346,7 +345,14 @@ openclaw-board-widget-cell { | |||
| min-height: 0; | |||
| } | |||
|
|
|||
| .board-view--loading .board-widget__frame-pane > .board-widget__frame { | |||
| z-index: 3; | |||
There was a problem hiding this comment.
Raise the loading grid above the skeleton overlay
When initial dashboard loading is active, this z-index: 3 cannot place the iframe above openclaw-panel-loading-skeleton[overlay] (which has z-index: 2), because the iframe's .board-grid ancestor uses container-type: inline-size, establishing a separate stacking context at the default stack level. The overlay therefore continues to cover early iframe paints until view().loading clears, defeating the intended progressive reveal; raise or restructure the owning stacking context rather than only the descendant iframe.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This presentation change is now isolated in #178740. I checked its exact CSS in the repository's Playwright Chromium (156.0.8078.4): the container-type: inline-size grid and widget do not prevent the iframe at z-index: 3 from painting above the sibling skeleton at z-index: 2. The screenshot shows the unobscured synthetic frame, and a hit-test after removing only pointer/inert exclusions selects the iframe. Adding explicit contain: layout is a positive failure control: it makes the same skeleton cover the frame. The full dashboard compositor filmstrips also show the chart before host readiness. No CSS change is warranted for this finding on the tested browser.
8da6fc0 to
eace012
Compare
eace012 to
0fc1039
Compare
|
Final proof is current for The detached-handle clamp assertion is repaired without retries or weaker expectations. The three auxiliary repository guard failures reproduce on the unchanged main base; matching signatures and lease results are in the body. Independent review and the exact-head code review have no actionable findings through P2. The reveal change is separate in #178740. Both PRs remain unmerged for lead review. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…ript validation (openclaw#178658) L158 (openclaw#178113) restores a cached dashboard before hello, but the restore waited on the lazily loaded transcript validator, so on Team the sandbox iframe often attached only after board.get returned (live r173: 776-797 ms in one batch, 505-633 ms in another). Restore the board snapshot independently of transcript validation, after the WebSocket connect request has been sent (a new initialConnectSent signal) so the early dashboard render never lands in the hello-handling window; re-read the cache after that wait and keep every openclaw#178113 safety rule (shape validation, session match, pending/rejected grant filter, ticket TTL aging, board.get authority). Evidence (AWS c7a.4xlarge, 11 pairs, synthetic dashboard fixture with the transcript validator held): sandbox iframe insertion 808.8 -> 359.3 ms (-450.7 paired, 11/11); hello handling +8.1 ms paired with overlapping IQRs (within the no-regression rule); FCP, LoAF, chat catch-up and chat-route controls unchanged. Runtime +35 LOC. Full UI 837 files / 3,617 tests (4 opt-in skips); focused tests incl. a held-validator negative control that fails on the original restore; exact-head CI green.
…ticket (#179058) A warm-restored dashboard attaches its sandbox iframe before hello (#178658) and shows the frame as soon as the app paints (#178740), but the board widget's sandbox host stayed inactive until the gateway was available, so the app HTML fetch and document delivery waited for hello. A restored, unexpired view ticket already authorizes that HTTP read: while the first connection is still connecting (no hello yet), activate document loading when the restored ticket has TTL remaining. Bridge actions stay gated on the connected socket; after hello, gateway availability governs as before; the server still validates the ticket on every request. Evidence (AWS c7a.4xlarge, 11 pairs per theme, filmstrip-measured first visible chart pixels): light 1,000.6 -> 917.4 ms (-94.8 paired, 9/11), dark 1,014.1 -> 909.2 ms (-95.0 paired, 10/11); 0 flashes; hello, FCP, LoAF, chat catch-up and chat route within the no-regression rule. Runtime +13 LOC. Focused/native tests, HTTP/account-scope checks, full UI 846 files (inherited failures repaired on main by #179052); exact-head CI green.
…ticket (openclaw#179058) A warm-restored dashboard attaches its sandbox iframe before hello (openclaw#178658) and shows the frame as soon as the app paints (openclaw#178740), but the board widget's sandbox host stayed inactive until the gateway was available, so the app HTML fetch and document delivery waited for hello. A restored, unexpired view ticket already authorizes that HTTP read: while the first connection is still connecting (no hello yet), activate document loading when the restored ticket has TTL remaining. Bridge actions stay gated on the connected socket; after hello, gateway availability governs as before; the server still validates the ticket on every request. Evidence (AWS c7a.4xlarge, 11 pairs per theme, filmstrip-measured first visible chart pixels): light 1,000.6 -> 917.4 ms (-94.8 paired, 9/11), dark 1,014.1 -> 909.2 ms (-95.0 paired, 10/11); 0 flashes; hello, FCP, LoAF, chat catch-up and chat route within the no-regression rule. Runtime +13 LOC. Focused/native tests, HTTP/account-scope checks, full UI 846 files (inherited failures repaired on main by openclaw#179052); exact-head CI green.
What Problem This Solves
A warm dashboard reload can miss its early restore because the persisted board waits for a lazily loaded transcript-validator chunk. In the campaign's signed-in deep-link evidence, the dashboard appeared last in a 14-state reload sequence. This corrects the warm-restore dependency on the lazy validator in #178113.
Release the already validated board envelope before loading the transcript validator, and schedule its restoration after initial connection dispatch. Both the early envelope and full-cache path use that ordering. Shape validation, session/scope checks, grant filtering, ticket TTL aging, and authoritative
board.getreconciliation remain in their existing owners. Transcript hydration retains its existing timing and lifetime. The prior hydration method moves into its own cohesive pane module to stay within the source-file size limit; its old definition is deleted.Evidence
11 interleaved pairs per scenario on one quiet AWS Crabbox
c7a.4xlarge, leasecbx_3c617a884495, run. Repository Playwright Chromium; synthetic Team-scale dashboard, rotating tickets and separate sandbox origin. Connect floor 350 ms, connect latency 240 ms, board.get 160 ms, other RPCs 35 ms. Measurements use final head0fc10392fc87c34b42cf98bd38377af0858949f2; the baseline replaces only the four existing restore runtime owners from merge-base65f3ca05d794. Both bundles share all other source, dependencies, fixtures, and the sandbox server. The new hydration module is unreferenced by the baseline history owner. No private captures or real account data are included.All 11 candidates insert exactly one iframe before hello while the validator is delayed 800 ms. Hello's paired median is +8.1 ms with overlapping IQRs, below the declared 3% threshold; FCP is unchanged and chat catch-up improves 89.7 ms. Ordinary warm-cache, fast-validator and chat-route controls pass the no-regression gate. Fast-validator LoAF blocking rises 10.0 ms paired with overlapping IQRs and mixed signs (8/11 worse), retained in the tables below.
Predeclared primary: at least 9/11 better with negative median paired delta. Secondary regression: worse non-overlapping IQRs, or at least 9/11 worse pairs with median paired rise above max(10 ms, 3%). No pair was dropped.
Benchmark command
Use the baseline/candidate bundle construction described above, one fixed build ID, the campaign probes, and one
FIXTURE_NOW_MScaptured at the start of the comparison. The benchmark alternates baseline/candidate for 22 runs (11 pairs).The ordinary dashboard control omits
--history-validator-delay-ms; the fast-validator control sets it to 1. The chat control uses--face chat --untracedwithout--chat-dashboard-routeor a validator delay.Validation
Final head:
0fc10392fc87c34b42cf98bd38377af0858949f2, rebased onto65f3ca05d794f8cc26ad15fcc16860028fe7467a. Independent review is clean through P2; the exact-head automated code review also has no findings. Exact-head CI is green. This PR remains unmerged for lead review.Final-head full UI e2e passed on AWS
c7a.4xlarge, leasecbx_3c617a884495, run: 837 files / 3,617 tests passed; 4 files / 4 tests skipped. Command wall: 6,216 s; Vitest: 6,095.44 s. The four opt-in skips aredesktop-resize,peer-followup-restart,chat-steer-deferred-custody, anddeepseek-searchreal-Gateway e2e. Both dashboard-before-hello regressions and all six plugin-skills cases pass within this full run. Focused owners also pass 6 files / 92 tests (23 s); plugin-skills passes separately (35 s command / 31.50 s Vitest). Changed-file lint, UI/script types, and all core test type graphs pass. Runtime hashes match before and after the comparisons, and tracked source stayed unchanged.The full run on the preceding head exposed a detached-element sampling race in the installed plugin description clamp assertion. Diagnostics showed a connected, correctly clamped row at 1440 px, then a detached sampled handle with zero geometry at 390 px. The repaired assertion queries the current DOM and measures it synchronously inside
page.evaluate; the exact one-row, clamp, overflow, text, and screenshot requirements remain. No retry, longer timeout, or weaker expectation was added. That failure was not classified as inherited: the unchanged test passed on the original base and a later main snapshot.The held-validator regression fails on the old restoration path, and a separate full-cache negative control catches bypassing connect-dispatch ordering. Shape validation, session/scope checks, grants, ticket aging, and
board.getauthority retain their owner coverage.pnpm test <file> --maxWorkers=1walls on the unchanged runtime contracts: gateway connect 3.90 s; dashboard cold load 61.64 s; snapshot custody 9.98 s; board loading 5.88 s; snapshot store 4.42 s. Browser command times include production build/setup; these files exercise real layout and held-network boundaries that unit fixtures cannot establish.The composite remote payload exited 1 because
check-changedreported the three repository-wide guards below; the full UI suite itself exited 0. All three reproduce on the unchanged main base65f3ca05d794f8cc26ad15fcc16860028fe7467a, on fresh AWS leasecbx_c8c48e3ca452, comparison run. The max-lines failure also reproduces with that base compared to itself. No exception or baseline was changed.ui/src/pages/chat/components/chat-message.test.tsx,ui/src/pages/config/config-page-state.ts,ui/src/pages/sessions/sessions-page-state.tssrc/plugins/registry-runtime.ts: PluginRuntimeResolver,src/transcripts/capture.ts: TranscriptsLogger. Full-tree scan also reportsextensions/github/src/preview.test-support.ts: conditionalJson. All are unchanged by this PR.The failing guard signatures, passing type/lint checks, and full UI results are retained separately. Both remote source checkouts stayed clean.
Scope and Release Note
Runtime +133/−98, net +35 LOC. The requested exclusion filter reports +468/−179, net +289, including the committed benchmark/fixture extensions and
.test.tsxregression. Growth preserves initial-dispatch lifecycle and cached-board ordering; the superseded hydration method and moved helper definitions are deleted. No new configuration option or durable Gateway schema change.Release-note context: cached dashboards can attach while transcript validation is pending, without delaying the live handshake under the measured latency profile. The independent early-reveal/theme fix is #178740.
All restore medians, IQRs, and per-pair deltas
restore-chat
11 interleaved pairs; milliseconds; brackets are IQR. Delta = candidate − baseline.
restore-delayed
11 interleaved pairs; milliseconds; brackets are IQR. Delta = candidate − baseline.
restore-normal
11 interleaved pairs; milliseconds; brackets are IQR. Delta = candidate − baseline.
restore-receipt-fast
11 interleaved pairs; milliseconds; brackets are IQR. Delta = candidate − baseline.