Skip to content

fix(control-ui): keep loading skeletons continuous on reload - #175212

Merged
steipete merged 1 commit into
mainfrom
steipete/coldload-boot-skeleton-continuity
Oct 17, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/coldload-boot-skeleton-continuity

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A signed-in reload of a dashboard deep link can show a boot skeleton, a blank shell, a second skeleton, then content. The cold-load campaign measured the blank interval between about 274–278 ms and 344–379 ms in two samples.

User Impact

The route outlet now shows its loading panel as soon as the shell takes over. Existing pages remain visible during cold navigation; retained chat/loading panels from #174392 are unchanged.

Why This Change Was Made

The shell becomes available before the route module does, but the outlet deliberately withheld its initial loading panel for one second. Remove the timer, pending flag, and render argument rather than adding a second handoff owner. Production LOC: −33 across the two outlet modules (4 added, 37 removed). No configuration or stored-shape changes.

Evidence

Quiet AWS c7a.4xlarge, lease cbx_3c8ca2ee6589 (16 CPUs, 30 GiB RAM), repository Playwright Chromium, canonical Team-scale bench/default session view, persisted warm reloads. Seven interleaved pairs; order alternates. Both bundles use the same final base and build identity; baseline restores only the two production files. Timings below exclude the separate traced filmstrip runs.

Metric Baseline median [IQR] Candidate median [IQR]
Blank interval between loading skeletons 31.8 ms [25.8, 32.6] 0 ms [0, 0]
FCP 432 ms [424, 448] 416 ms [416, 448]
CLS 0.037805 [0.037771, 0.038923] 0.037805 [0.037737, 0.041270]
LoAF blocking 300 ms [279, 334.5] 302 ms [288.5, 327.5]
Boot RPCs 101 [101, 101] 101 [101, 101]

Blank-gap paired deltas (candidate − baseline, ms): −31.8, −25.1, −26.4, −33.3, −22.0, −31.9, −65.5. All seven improve; median paired delta −31.8 ms. FCP deltas: −48, 0, +32, −128, 0, −16, 0. CLS deltas: +0.003533, +0.001229, −0.000068, −0.009295, 0, +0.003464, 0. Blocking deltas: +15, +60, −67, −142, +45, +40, −24. Secondary metrics meet the campaign's no-regression definition; this is a visual continuity fix, not a CPU-speedup claim.

50 ms sampling plus mutation transitions reproduce the live DOM sequence on the baseline: 17 skeleton elements → 0 for 32.2 ms → 9. Candidate: 17 → 9 directly. The separate traced screenshots below show the boot, handoff, pane loading, and content stages; traced timestamps are not the timing comparison.

Before: synthetic reload with a blank shell between loading skeletons

After: synthetic reload with a continuous loading handoff

The immediate-skeleton regression fails on the original code and passes with the fix. Focused local proof: router-outlet (8 tests; wrapper wall time 2.98 s), router-outlet-presentation (13 tests; 2.51 s), shell-module-loading browser E2E (5 tests; Vitest 15.49 s). Independent review is clean through P2.

Exact-head GitHub CI passed at 9fcfaa6086ca4614c0286efbe08b87993d2916d5.

Remote validation ran on the same AWS lease cbx_3c8ca2ee6589:

  • node scripts/check-changed.mjs: formatting, lint, all ten affected test type graphs, UI typecheck, and the other guards passed except the max-lines ratchet and dead-export scan. The dead-export scan reports the identical 13 distinct findings with the PR changes removed. The max-lines ratchet reports existing suppressions in chat-message.test.tsx, config-page-state.ts, and sessions-page-state.ts; the same three findings reproduce with this PR removed, and none is modified here.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts: full suite completed in 5384.62 s: 815 files passed, 4 failed, 1 skipped; 3540 tests passed, 2 failed, 5 skipped. The original failure result is retained; focused rechecks are listed separately below.
Full-suite failure Classification / focused recheck
ui/src/e2e/tooltip-first-activation.e2e.test.ts WebKit executable missing during setup. Installed WebKit with dependencies; both browser cases passed.
ui/src/pages/workboard/workboard-native-bundle.e2e.test.ts Same missing-WebKit setup failure; both browser cases passed after installation. Combined recheck: 2 files / 4 tests passed, 31.82 s.
extensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts The configured-owner/admin-chat case fails with “Private mutation boundary is writable by another POSIX principal.” Reproduced on main-base source with the same Crabline private-file → artifact-generation → readiness → crabline-transport.ts:661 stack.
ui/src/e2e/browser-dictation-status.e2e.test.ts “keeps dictation activity and the insert/discard actions visible”: the dictation phase's bounding box was null after screenshots (:562). All 13 tests pass in isolated whole-file runs on both candidate and main-base source. A bounded main-base replay with neighboring chat-outbox-payloads and skills-library files at two workers also passed (3 files / 28 tests, 68.04 s). Unclassified full-run failure, not a proven fix or inherited failure.

The skipped file is ui/src/e2e/desktop-resize.real-gateway.e2e.test.ts. Baseline classification used main-base source 7068125f174f901300e1ececd4abbbaa8f7014a5 by removing this PR's five-file diff, then restored the candidate and verified a clean diff. It does not claim coverage of later main commits. No unrelated fixes, retry policy, or assertions were changed.

Reproduction: node --import tsx scripts/bench-control-ui-cold-load.ts --warm-reload --probe-dir <rig-probes> --init-script <50ms-continuity-probe> --bundle-dir <baseline-or-candidate> --runs 1 --untraced. The optional Online-view setup stalled at the sidebar-cache prerequisite, so it is excluded from the results. An initial relative build-output-path mistake was corrected before collecting these pairs.

@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@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: 🦐 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 Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR immediately shows the existing route skeleton during initial module loading by removing the one-second presentation delay.

Example: A signed-in user reloads /chat/main while its route module is still downloading.

  • Before: The shell can appear without route content until the module arrives or the one-second loading timer expires.
  • After: The route outlet shows its loading skeleton immediately, then replaces it with Chat.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with meaningful harness coverage; the changed visual transition remains experimentally unconfirmed.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; the body reports focused outlet and browser-harness tests, while its explicitly pending visual experiment has no supplied capture of the changed boot transition.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Signed-in reloads can briefly show an empty shell between the boot skeleton and route content.
Reason: The maintainer-authored experiment targets a measured visual discontinuity with a smaller implementation and no new option or state owner.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open as a maintainer-owned experiment: current main retains the blank loading interval, and no actionable patch defect was found; the explicit do-not-merge hold remains.

Priority: P3
Reviewed head: 9fcfaa6086ca4614c0286efbe08b87993d2916d5

Before merge

  • Complete next step - Remove the explicit do-not-merge hold and mark the PR ready when the experiment is concluded.

Findings

None.

Tests

  • Missing end-to-end proof: The planned before/after boot-transition captures and production-browser comparison are not supplied yet; existing images show only the earlier PR's settled layout.
Agent review details

How this fits together

The Control UI outlet consumes synchronous router matches and renders loading, error, active, or retained page content through its existing Solid presentation owner.

flowchart LR
  A[Signed-in reload] --> B[Application shell]
  B --> C[Router outlet]
  D[Router matches] --> C
  C --> E[Existing loading skeleton]
  C --> F[Loaded route content]
Loading

Technical review

Best possible solution:

Use the existing loading owner immediately if the completed experiment confirms a smoother boot transition without disturbing retained navigation.

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

Current-main source withholds initial loading presentation for one second when a route module is pending, and the PR reports an immediate-skeleton regression failing before the change; no target code was executed during this review.

Is this the best way to solve the issue?

Removing the presentation delay addresses the blank interval at its existing owner, deletes obsolete state, and preserves active-page selection, errors, retries, and lazy imports.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9d7402370dcc.

Provenance checked

  • Initial loading delay changes intended behavior with a stated reason (refactor(ui): render the app shell and retained routes with Solid #168612: The Solid shell migration explicitly preserved the preexisting one-second cold fallback; this establishes preservation intent rather than its original introduction.)
  • Solid presentation ownership keeps the original intent (6678810: Move subscription, timing, and cleanup into the outlet's Solid owner while retaining synchronous routing and page-local state.)
  • Route rendering and retained presentation keeps the original intent (refactor(ui): retire bridge template adapters #173912: Remove legacy route rendering adapters while preserving lazy imports, renderer identity, live props, and error presentation.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit deb7faf adds ui/src/app/router-outlet-controller.ts:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: deb7faf7b066; files: ui/src/app/router-outlet-controller.ts)

PR surface

Source -33, Tests +13. Total -20 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 4 37 -33
Tests 3 26 13 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 30 50 -20

Labels

Label changes:

  • add P3: This is transient loading-presentation polish with a focused implementation and no demonstrated blocked workflow.
  • 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:

  • P3: This is transient loading-presentation polish with a focused implementation and no demonstrated blocked workflow.
  • 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.

Rank-up moves

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

  • Supply the planned before/after boot-transition captures and comparison results using synthetic content and redacted endpoints.

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 October 17, 2026, 2:18 AM ET / 06:18 UTC.

@steipete steipete changed the title experiment(control-ui): continuous boot skeleton [do not merge] fix(control-ui): keep loading skeletons continuous on reload Oct 17, 2026
@steipete
steipete marked this pull request as ready for review October 17, 2026 06:23
@chatgpt-codex-connector

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-10-17T06:25:55.763028Z 9fcfaa6 Draft marked ready
ℹ️ 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

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The experiment is complete and this PR is ready for review. The body now includes seven interleaved pairs, inspected synthetic before/after loading-transition filmstrips, green exact-head CI, and the completed full UI E2E results with failure classifications. The remaining dictation full-run failure is explicitly recorded as unclassified; passing focused replays are not claimed as a fix. No source changes followed the reviewed head.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. labels Oct 17, 2026
@steipete
steipete merged commit a00202e into main Oct 17, 2026
184 of 185 checks passed
@steipete
steipete deleted the steipete/coldload-boot-skeleton-continuity branch October 17, 2026 08:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…art (openclaw#175212)

On a cold reload the boot shell's skeleton was replaced by an empty outlet, then a second, different skeleton, then content: live 50 ms sampling on Team r149 showed skeleton at ~167 ms, a blank frame at ~274 ms, a new skeleton at ~379 ms. The router outlet delayed its loading panel by one second while a route's code chunk was still loading with no active route, rendering an empty region in between.

The cold-pending delay is removed: while a route module loads on a cold start, the outlet shows its loading panel immediately, so the hand-off from the boot skeleton is continuous. In-app navigation is unchanged (the active route keeps rendering while the next one loads), and loading-panel retention from openclaw#174392 stays intact.

Seven interleaved AWS c7a.4xlarge pairs: blank hand-off 31.8 -> 0 ms (all pairs); FCP 432 -> 416 ms; median CLS unchanged (0.0378). Runtime -33 LOC. 26 focused tests pass; exact-head CI green; full-UI failures reproduce on main apart from one dictation assertion that passes in isolated and neighbouring-file replays.
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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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