Skip to content

perf(ui): keep config render helpers out of startup - #126754

Merged
steipete merged 1 commit into
mainfrom
fix/control-ui-linux-startup-budget
Aug 20, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/control-ui-linux-startup-budget

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a current-main Linux Node 24.15 Control UI build failure: the compressed startup bundle reached 348,350 bytes, exceeding the unchanged 348,079-byte startup limit by 271 bytes and breaking the full production build.

Why This Change Was Made

The startup config-draft and settings-search graphs imported generic schema/path/search helpers from the rendering-owned config shared module, which also imports sensitive-path classification and translation runtime. Move those generic helpers into the already-startup config-form utility owner and keep sensitive rendering helpers lazy; preserve existing imports and caller APIs through the rendering module's re-exports. This removes three net production lines (+112/-115) without changing startup budgets, baselines, tolerances, dependencies, generated locales, or configuration behavior.

User Impact

Control UI production builds pass their existing startup budget on Linux and ship a smaller initial bundle. Settings search, schema coercion, config editing, redaction, localization, and UI appearance are unchanged.

Evidence

  • Linux Node 24.15 startup gzip: 348,350 -> 347,674 bytes (-676); before: FAIL, 271 bytes over the unchanged 348,079-byte limit; after: PASS, 405 bytes below it.
  • macOS Node 24 startup gzip: 347,701 -> 347,090 bytes (-611).
  • Linux Node 24.15 full pnpm build: passed after the owner-boundary repair.
  • Local pnpm ui:build: passed.
  • Focused schema, config-draft, search, tier, and utility suites: 108 tests passed across six test files.
  • Real-Chromium config-form and config-page coverage: 154 browser tests passed across ten test files.
  • Complete changed-file format, lint, UI/core typecheck, dependency/security guards, dead-export, and i18n checks: passed.
  • Fresh P1 autoreview: clean; git diff --check: clean.
  • Production LOC: +112/-115, net -3; test LOC: +0/-0. No UI appearance or behavior changes, so screenshots are not applicable.

Restore the cross-platform Control UI startup gzip budget by keeping render-only sensitive-path helpers outside the startup config-draft graph. Preserve existing behavior and caller APIs while moving generic schema, search, and path helpers to their existing startup owner.
@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 20, 2026
@steipete
steipete marked this pull request as ready for review August 20, 2026 17:12
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head c57120995c37775ede420f9a148980e7fcb47727.

Root cause: startup config-draft and settings-search code imported generic schema/path/search helpers through the rendering-owned shared module, eagerly retaining its sensitive-path classifier and rendering-only runtime in the startup closure. The repair moves those generic helpers into their already-startup config-form-utils owner, keeps rendering-sensitive logic lazy, and preserves existing caller exports and behavior.

Linux Node 24.15 production build, unchanged startup ceiling 348,079 bytes:

before: 348,350 bytes  FAIL (+271 over limit)
after:  347,674 bytes  PASS (-405 under limit)
delta:     -676 bytes
pnpm ui:build  PASS
pnpm build     PASS

macOS Node 24 startup gzip: 347,701 -> 347,090 bytes (-611).

Exact focused proof:

node scripts/run-vitest.mjs ui/src/lib/config/config-draft-model.test.ts ui/src/lib/config-form-utils.node.test.ts ui/src/components/config-form.constraints.test.ts ui/src/components/config-form.search.node.test.ts ui/src/components/config-form.tiers.test.ts ui/src/pages/config/settings-search.test.ts
Test Files  6 passed (6)
Tests      108 passed (108)

cd ui
node ../scripts/run-vitest.mjs run --config vitest.config.ts src/components/config-form.browser.test.ts src/components/config-form-integrity.browser.test.ts src/components/config-form-scalar-integrity.browser.test.ts src/components/config-form-array-integrity.browser.test.ts src/components/config-form-composition-integrity.browser.test.ts src/components/config-form-nested-array-integrity.browser.test.ts src/components/config-form-map-integrity.browser.test.ts src/components/config-form-rejection-integrity.browser.test.ts src/components/config-form-collection-defaults.browser.test.ts src/pages/config/view.browser.test.ts
Test Files  10 passed (10)
Tests      154 passed (154)

node scripts/check-changed.mjs -- ui/src/components/config-form.array-items.ts ui/src/components/config-form.search.ts ui/src/components/config-form.shared.ts ui/src/components/config-form.tiers.ts ui/src/lib/config-form-utils.ts ui/src/lib/config/config-draft-model.ts ui/src/pages/config/settings-search.ts
PASS: format, lint, UI/core typechecks, dependency/security guards, dead exports, i18n

git diff --check
PASS

Fresh P1 structured autoreview: clean. Production LOC: +112/-115 (net -3); tests: +0/-0. No startup baselines, budgets, tolerances, dependencies, generated locales, config behavior, or UI appearance changed.

Exact-head pull-request CI: GREEN, workflow run 32396337933, event pull_request, head c57120995c37775ede420f9a148980e7fcb47727; node scripts/watch-pr-ci.mjs 126754 c57120995c37775ede420f9a148980e7fcb47727 finished with STATUS state=SUCCESS pending=0 and GREEN.

ClawSweeper: its latest exact-head review comment currently reports review started and contains no published findings or Rank-up moves. No actionable move exists to apply or skip; per repository policy, a queued/late review publisher does not block exact-head-green native landing.

@steipete
steipete merged commit 9dc391c into main Aug 20, 2026
195 checks passed
@steipete
steipete deleted the fix/control-ui-linux-startup-budget branch August 20, 2026 17:22
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
Restore the cross-platform Control UI startup gzip budget by keeping render-only sensitive-path helpers outside the startup config-draft graph. Preserve existing behavior and caller APIs while moving generic schema, search, and path helpers to their existing startup owner.
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 size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant