Skip to content

fix(ui): load System busyness only when opened - #148085

Merged
vincentkoc merged 5 commits into
mainfrom
fix/control-ui-lazy-system-busyness-20260914
Sep 15, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/control-ui-lazy-system-busyness-20260914

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Related: #147756

What Problem This Solves

System busyness loaded its implementation during New Session and Chat startup even when the panel was closed, adding code to the startup bundle. A startup-budget failure exposed this unnecessary eager load.

User Impact

The panel implementation loads when opened. Its first-load and error states remain nonmodal: the composer stays usable, and the panel can be minimized, expanded, or closed. Closing it or changing context cancels pending open intent.

No configuration, defaults, data migration, or budget thresholds change.

Why This Change Was Made

The existing lazy-element controller now owns the outer panel load. A shared, eagerly available frame preserves the current panel geometry and controls while its implementation loads. Registration and mounting precede one transfer of the current open mode; outer intent is cleared before the panel can record its own content-recovery action.

Production changes are +246/−72 lines; tests are +212/−22, excluding the generated boot manifest. The added production code owns the nonmodal loading/error frame and request-scoped mode/cancellation that eager registration previously made unnecessary. The eager implementation import is removed; shared framing replaces the duplicated loaded-panel markup.

Evidence

  • Current signed head 23e1d4991e465c52b7dd876f4fea2df7de915a58, tree 01a38020164041941ed21793ee336e47b4083e9e, makes SettingsSidebarModule local to its existing owner. The preceding host-contract deduplication removed its last external type consumer; this correction removes only the seven-byte export modifier. Independent source review accepted the exact change. A separate native run passed UI production types and canonical script, production and full-tree unused-export scans with zero entries on Linux Node 24.19.0. Source guards, all three retained capture files, final passed outcome, child streams, wrapper and lease verified. Runtime code, generated manifest and budget inputs are unchanged; no build, budget or media replay is claimed. New-head CI/Claw/native preparation are pending.
  • Previous head 41b66e39069e534938279c14dd4dfcf0f04fb544, tree 393c2b3ccb9f94acb21462919040ae6945b6728f, replaced four repeated ShellViewHost declarations with the existing settings-sidebar renderer's identical host contract. Its separate native run passed UI production types and targeted file lint. Exact-head CI run 34927409883, attempt 1, finished with 89 successful jobs, 13 skipped jobs, the unused-type-export failure and the derived failed aggregate gate; there was no additional failure. Both dependency/export reports named the same type, and unused-files passed. The tested merge retained the same alias contract while adding an unrelated upstream sidebar skeleton. The failed log remains retained. ClawSweeper Revision 7 reviewed 41b66e3 with no actionable findings or rank-up moves; that verdict stays bound to its reviewed head.
  • Previous head 7d8fac0 integrated frozen main 3fce24dfa62bcda7bcdfa0567339063bc2c6202c, including the landed canonical Docker fixture correction. Independent final-byte review and fresh P0–P2 autoreview accepted that integration. Its exact-head CI run 34925490257, attempt 1, finished with 89 successful jobs, 13 skipped jobs, one lint failure and the derived failed aggregate gate. The tested merge 4db4654b added three inherited settings-sidebar inputs, producing 703 counted lines against the unchanged 700-line limit. The current shared host contract removes four net lines without suppressing the rule. The failed log remains retained. ClawSweeper Revision 6 reviewed 7d8fac0 with no actionable findings or rank-up moves; that verdict remains labeled to its reviewed head.
  • On September 15, the same continuation passed canonical ready /new and /chat manifest generation, grouped UI build, unchanged performance enforcement, and all five generated-chunk tests. Startup JS measured 356,415 B gzip against 362,588 B, with zero violations on Linux Node 24.19.0. Startup CSS was 47,655 B: above the advisory target, below the 51,200 B hard ceiling. The 362,012 B committed baseline and existing 512 B growth plus 64 B variance allowances are inherited unchanged. All child streams, archive capture, wrapper, and lease closed successfully. The earlier failed lint receipt and its two passed type stages remain separate; no type replay or baseline edit is claimed.
  • Original head 554176f59b736a23601cb87f3f1c0ef94b7395c6 passed independent source review and scoped autoreview. Its CI passed (run 34821028725, attempt 1). The old-head review requested conflict resolution and integrated startup proof; the reconciliation below addresses those items. Historical loading/recovery results retain their source labels.
  • Historical signed head 8948737a2abbc62d5b3afc5277c0465fcfe7ee32 reconciled main 9bfbb6db and passed independent source/generated-byte review plus the exact-head ClawSweeper review, Revision 4 on September 14, with no actionable findings or rank-up moves. Its CI run 34829756736, attempt 1, finished with 86 successful jobs, 13 skipped jobs, three test failures and the derived failed aggregate gate. The inherited Docker fixture mismatch was corrected by #148129, landed as abbdd528. The two Gateway timeout causes remain unresolved; their test blobs matched the tested base and their fixtures disabled Control UI, which does not establish a cause or waive those failures. All original logs are retained.
  • The earlier 8948737a reconciliation native run passed affected-frame lint, canonical ready /new and /chat manifest generation, grouped UI build, the enforcing performance check, and all five generated-chunk tests. Startup JS measured 357,311 B gzip against the inherited current 362,588 B enforcement limit, on Node 24.19.0. Main had independently updated its committed baseline to 362,012 B and nominal cap to 354 KiB; this PR makes no budget edit. Startup CSS was 48,616 B, above the advisory target but below the 51,200 B hard ceiling. The native wrapper, all child streams and lease closed successfully.
  • Before reconciliation, the UI source passed both type lanes, lint on the three extracted production files, and 31 lazy-shell/controller tests. Its canonical manifest/grouped build and previous unchanged-budget check passed at 361,885 B gzip against 361,938 B. The reconciliation preserves that lifecycle implementation; these prior results do not claim a rerun on the new tree. Earlier fixture and file-length failures remain retained.
  • A separate browser continuation passed paired /new and /chat expanded/minimized geometry, editable-composer and nonmodal checks. Explicit tooltip dismissal followed by frame-focused Escape passed on both revisions and routes. Five generated-chunk contract tests also passed.
  • That browser run separately passed seven selected recovery tests and failed two outer-load cases, with 13 unselected. Both failures came from the scenario fixture omitting the canonical diagnostics.lanes response; the expanded diagnostics renderer received {}. The fixture now supplies the existing idle-lane response, with every assertion retained. The corrected continuation passed exactly those two cases, with 19 unselected, on carrier 1190da24 / tree 6fee777f using the retained generated manifest. Its native wrapper and owned cleanup completed with exit 0; the preceding failed run remains retained separately.
  • Before captures bind frozen main 39f2a58a; comparison after captures bind candidate carrier 8ed100bd / tree 149a2ad4. Expanded comparison images establish loading geometry, not fully loaded diagnostics. Browser proof uses a mocked Gateway and does not establish live-provider or full-release behavior.

The standalone UI change must land before the P08 branch consumes it and qualifies the resulting combined source.

Paired captures below bind baseline 39f2a58a and candidate 8ed100bd / tree 149a2ad4. Each pair was captured separately and is byte-identical; it therefore shares one uploaded image. Expanded images show loading/skeleton geometry. Interaction assertions separately covered the editable composer and tooltip/frame Escape ownership. All four uploaded images were read back publicly with HTTP 200 and exact inspected PNG hashes after publication.

State Before — 39f2a58a After — 8ed100bd
/new · expanded/loading Before /new · expanded/loading geometry After /new · expanded/loading geometry
/new · minimized Before /new · minimized geometry After /new · minimized geometry
/chat · expanded/loading Before /chat · expanded/loading geometry After /chat · expanded/loading geometry
/chat · minimized Before /chat · minimized geometry After /chat · minimized geometry

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 08:06
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 12:31 AM ET / 04:31 UTC (Revision 8).

ClawSweeper review

What this changes

Loads the System busyness diagnostics panel on demand while preserving its nonmodal loading frame, minimize controls, dismissal, and retry recovery.

Merge readiness

✅ Ready for maintainer review

This remains a useful startup optimization: current main still eagerly imports the panel implementation. No actionable introduced defect was found, and the latest type-only correction preserves the previously reviewed runtime behavior.

Priority: P2
Reviewed head: 23e1d4991e465c52b7dd876f4fea2df7de915a58

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused optimization with appropriate lifecycle coverage, inspected visual evidence, and no actionable correctness finding.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Inspected source-labeled screenshots establish panel geometry on /new and /chat; the supplied browser continuation reports composer, mode-transfer, Escape, and recovery success through the production UI with a mocked Gateway. The latest change is type-only; screenshots alone are not treated as proof of module recovery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Inspected source-labeled screenshots establish panel geometry on /new and /chat; the supplied browser continuation reports composer, mode-transfer, Escape, and recovery success through the production UI with a mocked Gateway. The latest change is type-only; screenshots alone are not treated as proof of module recovery.
Evidence reviewed 8 items Current main still loads the implementation eagerly: The fetched main imports debug-overlay.ts from the shell and includes it in the shared boot manifest; the central optimization remains absent.
Request ownership and handoff: The shell reuses the existing lazy-element controller, checks current intent before opening, and clears outer intent before the loaded panel records its separate recovery action. Closing and context replacement retire pending requests.
Re-review continuity: Compared with the previous reviewed head, the only change removes the unused export modifier from SettingsSidebarModule. The current tree has no external consumer of that type; the prior review projection contains no outstanding findings.
Findings None None.
Security None None.

How this fits together

System busyness displays Gateway diagnostics inside the Control UI. The shell handles opening the panel, loads its implementation, and passes control to the diagnostics view without blocking the surrounding workspace.

flowchart TD
  A[Menu or keyboard request] --> B[Shell load controller]
  B --> C[Nonmodal loading frame]
  B --> D[Load panel implementation]
  C --> E[Minimize or cancel intent]
  E --> B
  D --> F[Mounted diagnostics panel]
  G[Gateway diagnostics] --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +209, Tests +190. Total +399 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 8 297 88 +209
Tests 3 212 22 +190
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 509 110 +399

Review metrics

Metric Value Why it matters
Production and test growth Production +174 net lines; tests +190; generated manifest excluded The PR explains production growth as ownership of the nonmodal pending frame and cancellation lifecycle previously avoided by eager registration.
Reported startup budget 356,415 B gzip; 6,173 B below the unchanged enforcement limit The supplied September 15 build result supports the optimization without relaxing the startup budget.

Technical review

Best possible solution:

Keep one shared panel frame and the existing load controller, with diagnostics code deferred until requested and recovery preserving current user intent.

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

Yes, source establishes the unnecessary eager load: current main imports the panel implementation during shell startup. No local runtime reproduction was executed.

Is this the best way to solve the issue?

Yes. Reusing the existing load controller and extracting the shared frame removes the eager implementation dependency while retaining the documented nonmodal experience.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 52b49bb95dfa.

Labels

Label changes:

  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is linked_artifact.

Label justifications:

  • P2: This is a bounded Control UI startup improvement that preserves existing panel behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Inspected source-labeled screenshots establish panel geometry on /new and /chat; the supplied browser continuation reports composer, mode-transfer, Escape, and recovery success through the production UI with a mocked Gateway. The latest change is type-only; screenshots alone are not treated as proof of module recovery.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected source-labeled screenshots establish panel geometry on /new and /chat; the supplied browser continuation reports composer, mode-transfer, Escape, and recovery success through the production UI with a mocked Gateway. The latest change is type-only; screenshots alone are not treated as proof of module recovery.

Evidence

What I checked:

  • Current main still loads the implementation eagerly: The fetched main imports debug-overlay.ts from the shell and includes it in the shared boot manifest; the central optimization remains absent. (ui/src/app/app-host.ts:7, 52b49bb95dfa)
  • Request ownership and handoff: The shell reuses the existing lazy-element controller, checks current intent before opening, and clears outer intent before the loaded panel records its separate recovery action. Closing and context replacement retire pending requests. (ui/src/app/app-shell-chrome.ts:502, 23e1d4991e46)
  • Re-review continuity: Compared with the previous reviewed head, the only change removes the unused export modifier from SettingsSidebarModule. The current tree has no external consumer of that type; the prior review projection contains no outstanding findings. (ui/src/components/settings-sidebar-lazy.ts:7, 23e1d4991e46)
  • Browser boundary coverage: The retained tests exercise real browser module loading on /new and /chat, assert zero initial panel requests, preserve composer input and geometry through mode transfer, and cover dismissal plus manual and automatic stale-chunk recovery. These tests were inspected, not executed during this read-only review. (ui/src/e2e/lazy-custom-element-recovery.e2e.test.ts:515, 23e1d4991e46)
  • Inspected visual and reported runtime evidence: All four prepared PNGs were inspected: expanded loading and minimized states on /new and /chat. The captured PR body labels their baseline as 39f2a58 and candidate as 8ed100bd, reports separate successful browser interaction/recovery continuations, and explicitly limits the environment to a mocked Gateway. Images establish geometry, not network recovery by themselves.
  • Existing product contract: The documentation requires working panel headers, in-place Retry, and a usable surrounding page while Home and System busyness load. The extracted frame preserves that contract. Public docs: docs/web/control-ui.md. (docs/web/control-ui.md:26, 23e1d4991e46)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-09-14T08:26:12.859Z sha 554176f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T09:01:00.749Z sha 554176f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T09:29:16.210Z sha 554176f :: blocked before merge. :: none
  • reviewed 2026-09-14T09:58:20.073Z sha 8948737 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T10:45:34.279Z sha 8948737 :: blocked before merge. :: none
  • reviewed 2026-09-15T03:40:11.569Z sha 7d8fac0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-15T04:10:58.555Z sha 41b66e3 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 14, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 15, 2026
@vincentkoc
vincentkoc merged commit 8618ee3 into main Sep 15, 2026
236 of 239 checks passed
@vincentkoc
vincentkoc deleted the fix/control-ui-lazy-system-busyness-20260914 branch September 15, 2026 09:20
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
* fix(ui): load System busyness only when opened

* fix(ui): share the settings sidebar host contract

* fix(ui): keep the settings sidebar module type local
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant