Skip to content

improve(ui): load optional shell surfaces on demand - #106243

Merged
steipete merged 2 commits into
mainfrom
codex/control-ui-lazy-shell
Jul 13, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/control-ui-lazy-shell

Conversation

@steipete

@steipete steipete commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #106233

What Problem This Solves

The Control UI initial JavaScript eagerly included the command palette, terminal panel, and browser panel even when users never opened those optional shell surfaces.

Why This Change Was Made

Load each optional custom element through one retryable, deduplicated loader. Thin static event contracts preserve first-use shortcuts and panel actions; capability preloading and the embedded terminal route retain existing behavior.

User Impact

The Control UI downloads and parses less JavaScript during startup. The command palette, terminal, and browser still open on the first click or shortcut, without requiring a second action.

Evidence

  • Exact tested head: d2253b62715c659543cf419b3df772eed3f4794f
  • Testbox: tbx_01kxden1sdyaj4ytpx1g52apw0
  • Focused unit tests: 6 files, 67 tests passed, including mounted-tag lazy-upgrade persistence
  • Targeted oxlint, UI tsgo, and dead-export checks passed
  • Chromium embedded-terminal E2E: 1 test passed
  • Production UI build passed
  • Current initial entry: 726.93 kB raw / 193.62 kB gzip
  • New on-demand chunks: command palette 10.73/3.69 kB, terminal 24.93/7.20 kB, browser 38.20/9.72 kB raw/gzip
  • Reference baseline captured earlier in this optimization sequence: 795.46 kB raw / 211.08 kB gzip
  • Fresh branch autoreview: clean, no actionable findings (0.94)

No changelog entry: internal loading performance only; user behavior unchanged.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Jul 13, 2026
@steipete
steipete force-pushed the codex/control-ui-lazy-shell branch from 34f8939 to d2253b6 Compare July 13, 2026 10:05
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L and removed size: M labels Jul 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for d2253b62715c659543cf419b3df772eed3f4794f:

  • Testbox tbx_01kxden1sdyaj4ytpx1g52apw0
  • node scripts/run-oxlint.mjs ui/src/components/command-palette.ts ui/src/components/browser/browser-panel.test.ts ui/src/components/terminal/terminal-panel.test.ts: passed
  • pnpm tsgo:ui: passed
  • pnpm deadcode:exports: passed
  • Focused UI suite: 6 files, 67 tests passed
  • Embedded-terminal Chromium E2E: 1 test passed
  • Production UI build: passed
  • Initial entry: 726.93 kB raw / 193.62 kB gzip
  • On-demand chunks: command palette 10.73/3.69 kB, terminal 24.93/7.20 kB, browser 38.20/9.72 kB raw/gzip
  • Fresh autoreview: clean, 0.94
  • Exact-head CI: 45 jobs passed — https://github.com/openclaw/openclaw/actions/runs/29241481636
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 106243: passed

No visual proof attached: this changes module loading only; rendered behavior is unchanged and covered by first-action, lazy-upgrade persistence, and embedded-terminal tests.

@steipete
steipete merged commit b395dfc into main Jul 13, 2026
109 of 112 checks passed
@steipete
steipete deleted the codex/control-ui-lazy-shell branch July 13, 2026 10:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
* perf(ui): lazy-load optional shell surfaces

* fix(ui): align lazy shell static contracts
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 scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: lazy-load optional shell surfaces

1 participant