Repository navigation
fix(ui): load Home and System busyness inside their panels - #147574
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. |
|
Codex review: blocked before merge. Reviewed September 13, 2026, 9:38 PM ET / September 14, 2026, 01:38 UTC (Revision 6). ClawSweeper reviewWhat this changesHome and System busyness open lightweight panel frames immediately, load their contents and retry errors in place, and preserve layout and dismissal behavior. Merge readiness⛔ Blocked before merge - 1 item remains Keep open as useful, distinct work with no blocking findings. The compatibility clarification resolves the previous checklist item: existing storage formats remain intact, and the earlier automatic-recovery defect is repaired. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI presents conversations and Gateway diagnostics in auxiliary panels. The shell handles opening those panels, while deferred content loads conversation data or diagnostic results. flowchart TD
A[Open panel action] --> B[Immediate panel frame]
C[Saved layout and visibility] --> B
B --> D[Deferred content loading]
D --> E[Conversation or diagnostics]
D --> F[In-panel error and Retry]
B --> G[Close preserves dismissal]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +483, Tests +290, Docs 0, Other 0. Total +773 across 52 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep visibility and geometry owned by the panel frames, with deferred content using the existing loading, recovery, and persistence contracts. Do we have a high-confidence way to reproduce the issue? Not applicable as a new defect claim: this improves the documented modal-loading experience, which current-main source and the before screenshots establish. Is this the best way to solve the issue? Yes. Splitting lightweight frames from deferred content removes the page-wide interruption while reusing existing state and recovery owners; no persisted-format migration is needed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a7344f3d0355. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review The automatic recovery finding is fixed in 93ff0b6. System busyness records intent before its content import, preserves it through automatic reload, and consumes it only after successful loading or deliberate dismissal. The new successful-first-HEAD-probe regression failed before the repair; all 16 recovery E2E cases and 39 debug/lazy-action unit tests now pass. A second ordinary reload confirms there is no stale reopening. The maintainer explicitly approved the 353 KiB JavaScript cap and 1.5 KiB CSS growth allowance. The production build passes those limits. The PR body includes the approval, measurements, and updated evidence. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review The final CI repairs are in 84aa340. Automatic Ask OpenClaw restoration now yields to Settings while explicit opens remain usable; Home's existing page-context behavior is preserved. All five update-triage cases verify no reopened panel/body, no new chat request, and no repeated update after reload. All 12 native embed cases and 18 assistant unit tests pass. The unsafe indexed fixture lookup is removed, and both affected test-type graphs pass. The build still passes the approved startup limits. The PR body includes the additional inspected Settings before/after screenshots. The earlier automatic System busyness recovery fix remains covered by all 16 loading/recovery cases. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review The only change after the Settings repair is the measured startup baseline: e4a6359 records CI's 361362 B integration build (job 103826823422) under the already-approved 353 KiB cap. The 512 B growth, 64 B variance, and 1.5 KiB CSS allowances are unchanged. Runtime code and the passing regression tests are unchanged from 84aa340. The PR body records the integration measurement. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Compatibility evidence for the remaining checklist item: this PR changes no persisted schema, database model, storage key, or serialized layout/recovery shape. Existing saved-state/remount tests pass, including Home destination/geometry restoration, suppression and explicit reopening, plus automatic/manual stale-chunk recovery and consumed-intent reload cases. No migration is required for these presentation/lifecycle changes. The approved startup-budget JSON is repository tooling metadata, not user data. The PR changes no Gateway data model or protocol. |
|
Merged via squash.
|
…147574) * fix(ui): load Home and System busyness inside their panels * chore(ui): record approved immediate-panel startup budgets * fix(ui): retain System busyness through automatic chunk recovery * fix(ui): keep automatic diagnostic restores out of Settings * chore(ui): refresh approved startup baseline against current main
AI-assisted. ## What Problem This Solves Main fails its own structural checks, so every open PR is red: `check-lint-core-2` (the sidebar session-ownership test helper is over the 700-line rule since #147610), the chat transcript controller test (over the 1,000-line rule since #147612), and `control-ui-performance` (startup JS gzip 362,012 B exceeds the 361,938 B limit after #147845, #147773 and #147883). ## Why This Change Was Made These repairs belong on main, in one PR. - Lint: the avatar cases move from `session-ownership.ts` into a sibling case file in the directory's existing pattern (610 lines remain). Assertions and registration are unchanged. - Chat lint: the four deferred-message-reveal cases move into a sibling test file. Their assertions, names and shared setup/cleanup remain unchanged, and the canonical test list preserves their isolated runner. - Budget: the smallest whole-KiB cap step, 353 → 354 KiB, with the baseline refreshed to the measured 362,012 B. Deferring the new workspace labels saved only 64 B and still failed at 361,952 B, so a reduction was not available; the immediate Home and diagnostic frames stay intact. Follows #147574 and #146526. ## User Impact None. No product behavior or asset changes. ## Evidence - Lint: the max-lines check fails on main and passes here; 426 sidebar tests pass. - Chat lint: pinned main fails at 1,010 counted lines; the candidate merge passes the same lint rule. All 146 affected chat tests pass, including the four moved cases in the isolated runner. The local preflight and test-root partition checks pass. - Budget: same-toolchain comparison, last passing source 361,718 B, main 362,016 B (+298 B), fresh main and this candidate both 362,012 B (0 B asset delta). `pnpm ui:check-performance:base <main>` fails before the policy refresh and passes afterward. 552 focused tests pass. ## Compatibility Cap 353 → 354 KiB; baseline 362,012 B; the 512 B growth and 64 B variance allowances are unchanged. ## Consumers The performance check and the build size report read the same policy; the sidebar test suite registers the moved cases from the new file, and both UI test runners retain isolated chat-test registration. Co-authored-by: Ayaan Zaidi <[email protected]>
AI-assisted. ## What Problem This Solves Main fails its own structural checks, so every open PR is red: `check-lint-core-2` (the sidebar session-ownership test helper is over the 700-line rule since openclaw#147610), the chat transcript controller test (over the 1,000-line rule since openclaw#147612), and `control-ui-performance` (startup JS gzip 362,012 B exceeds the 361,938 B limit after openclaw#147845, openclaw#147773 and openclaw#147883). ## Why This Change Was Made These repairs belong on main, in one PR. - Lint: the avatar cases move from `session-ownership.ts` into a sibling case file in the directory's existing pattern (610 lines remain). Assertions and registration are unchanged. - Chat lint: the four deferred-message-reveal cases move into a sibling test file. Their assertions, names and shared setup/cleanup remain unchanged, and the canonical test list preserves their isolated runner. - Budget: the smallest whole-KiB cap step, 353 → 354 KiB, with the baseline refreshed to the measured 362,012 B. Deferring the new workspace labels saved only 64 B and still failed at 361,952 B, so a reduction was not available; the immediate Home and diagnostic frames stay intact. Follows openclaw#147574 and openclaw#146526. ## User Impact None. No product behavior or asset changes. ## Evidence - Lint: the max-lines check fails on main and passes here; 426 sidebar tests pass. - Chat lint: pinned main fails at 1,010 counted lines; the candidate merge passes the same lint rule. All 146 affected chat tests pass, including the four moved cases in the isolated runner. The local preflight and test-root partition checks pass. - Budget: same-toolchain comparison, last passing source 361,718 B, main 362,016 B (+298 B), fresh main and this candidate both 362,012 B (0 B asset delta). `pnpm ui:check-performance:base <main>` fails before the policy refresh and passes afterward. 552 focused tests pass. ## Compatibility Cap 353 → 354 KiB; baseline 362,012 B; the 512 B growth and 64 B variance allowances are unchanged. ## Consumers The performance check and the build size report read the same policy; the sidebar test suite registers the moved cases from the new file, and both UI test runners retain isolated chat-test registration. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #147434
What Problem This Solves
Opening Home or System busyness interrupts the whole page with a generic loading dialog before the destination panel appears.
User Impact
Both panels now open immediately in their actual positions, with working controls and placeholders shaped like the content that will arrive. The rest of the page remains usable. Home retains its saved dock position and size; closing during a slow load stays authoritative, and failed imports offer Retry inside the panel. Settings keeps automatic Ask OpenClaw restores closed while explicit opens still work; Home continues following the visible page context.
Why This Change Was Made
The shell previously deferred the whole panel, so it had no destination layout to show during loading. Lightweight frames now own visibility and layout, while conversation runtimes and diagnostic requests remain lazy. Shared dock state captures saved intent once per attachment instead of rereading storage on every render.
The immediate frames add 5,903 B (5.8 KiB) of compressed startup JavaScript and 1,366 B (1.3 KiB) of startup CSS against the base built with the same toolchain and metadata. The controlled candidate measured 360,575 B JS and 48,029 B CSS; the final production build including automatic-recovery repair measures 360,699 B JS, with seven JS requests and one stylesheet. The maintainer approved a 353 KiB JavaScript cap, the measured 361,362 B integration-build baseline, and a 1.5 KiB CSS growth allowance. Existing JavaScript growth/variance allowances and CSS hard ceilings remain unchanged. CI measured 361,362 B JavaScript and 48,071 B CSS after merging the PR with current main. The baseline now records that integration measurement; the 353 KiB cap and 1.5 KiB CSS growth allowance are unchanged.
Evidence
119 focused unit tests and 36 bundled browser tests passed, covering delayed imports, both Home dock placements, dismissal before registration, reopen, background draft editing, and in-panel errors/retry. The three destination-loading regressions fail on the original code because it creates a modal.
Live-tested in signed-in Chrome against an isolated real Gateway using the candidate build: held and failed module delivery, closed before completion, reopened both panels, moved Home to the bottom, loaded the real transcript and all four diagnostic sections, and recovered through Retry/reload. The main draft survived both recovery reloads. All seven served startup JavaScript assets matched the built files. Live testing used only a task-owned Gateway.
The final recovery suite passed all 16 cases, including a cold New Chat route with both body JavaScript and Chat CSS held and a successful first document probe triggering automatic stale-chunk reload. The automatic recovery case failed before the repair because System busyness vanished; afterward the panel and draft return, and a second ordinary reload does not replay consumed intent. All 39 debug/lazy-action unit tests and three existing stacked-panel geometry tests passed. All 53 performance-policy tests pass, including the adjusted CSS boundary. Independent reviews of the UI and budget changes found no actionable P0–P2 defects. Core/UI typechecks, lint, dead-code checks, keyless i18n verification, formatting, and diff sanity passed. Local captures below use entirely synthetic Gateway fixtures; all four images were verified rendered in the PR.
The broader CI pass also caught an unsafe indexed test-fixture lookup and exposed automatic diagnostic restoration into Settings. The fixture now targets Home directly; the assistant frame suppresses only automatic Ask OpenClaw restoration in Settings. All 18 assistant unit tests, all five update-triage browser cases, and all 12 native-embed cases pass. The triage cases verify no visible panel, no loaded body, no new chat request, and no repeated update after reload. The exact UI E2E and component test-type graphs pass.
Settings reload regression (synthetic fixtures):
Compatibility: persisted layout and recovery formats are unchanged. The same v1 keys, destination value, and open/dock/height/width fields use the unchanged parsers and writers; saved-state, remount, and recovery tests pass. No Gateway schema/protocol or user-data migration is required.
Final validation: required CI passed on the reviewed head
e4a6359d21dd8493e367b551db22187a54c125cb(run). Landed through the native maintainer workflow asc809640db1fbc4b7f9ff7b7115a8edbef8933275.