Skip to content

fix: restore Control UI startup headroom and enforce budget limits - #179227

Merged
steipete merged 8 commits into
mainfrom
solid2/hf-startup-budget
Oct 21, 2026
Merged

steipete merged 8 commits into
mainfrom
solid2/hf-startup-budget

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Control UI performance CI accepting absolute budget violations and allowing further growth whenever the comparison base already exceeds a cap.

Related: #178054, #179084. Builds on the Composer extraction in #179169.

User Impact

Startup JavaScript drops from 331,062 B to 323,557 B gzip on the same machine, restoring 1,443 B of margin below the requested 325,000 B hotfix ceiling. The integrated main changes leave it 557 B above the preferred 323,000 B target; no budget or baseline was raised. English text, routes, markup, styles, and selectors are unchanged. No configuration or migration is required. The shared English chunk costs New Session 1,458 B against this base while staying within its existing cap; it saves startup bytes and keeps feature code lazy.

Why This Change Was Made

Session English now follows its lazy translating consumers through the existing catalog owner. Each independently imported leaf or helper registers the catalog it reads; retained shared labels and namespace objects remain eager. This adopts main's Composer extraction and groups Composer and Session English in one lazy, data-only chunk so either route can load shared copy without pulling in the other route’s code. The canonical boot manifest was regenerated; the final config produces byte-identical manifest output. Source maps confirm the shared English chunk contains exactly the two dictionaries and no renderer. The internal Chat partition size preserves a shared compression dictionary after extraction; every enforced gzip/request cap and the startup baseline remain unchanged.

An already-over-budget base may hold or shrink each byte surface, with at most 64 B of build variance. More growth fails with a clear diagnostic. Request counts allow no growth. This applies to startup, route, and locale caps; locales compare by identity so one shrinking language cannot mask another growing. Absolute violations now exit 1 in GitHub Actions as well as locally. --report-only remains advisory.

Full CI also exposed the refresh-recovery card losing its pending/error state on an unrelated shell update. Its recovery-scope memo now compares refreshRequired by value, retaining retry state until recovery actually ends and re-enters. The existing regression fails before the repair when connected changes during a pending refresh; all 22 sidebar-card tests pass afterward. No new lifecycle or state owner was added.

Evidence

Paired canonical builds use the same machine, Node 26.12.0, Vite 8.3.4, and Solid rc.16. Both use release mode (hidden source maps) and the fixed measurement timestamp 2026-09-01T00:00:00.000Z. Base: 4700321df3dcb14910c90852545f7453013c58ad; head: 4776432d9065834e6a6a8232c5ac3ee10cf0bd7d. All 58,691 tracked files in the baseline snapshot were verified, then all 1,256 changed paths were copied and verified against this merge parent. Both sides use the fixed comparison build ID and the same explicit branch metadata; Git discovery is disabled for the measurement. Git identities differ; source, build mode, and toolchain are bound to each measured side.

Proof / surface Base Head
Startup JS gzip 331,062 B 323,557 B
Startup JS requests 8 8
Startup CSS gzip / requests 40,439 B / 1 40,439 B / 1
Chat boot JS gzip / requests 1,499,880 B / 25 1,497,096 B / 25
New Session boot JS gzip / requests 1,017,524 B / 20 1,018,982 B / 21
Strict absolute performance Fails startup cap Pass; no violations or warnings
Strict base comparison — Pass; no violations or warnings
Budget checker regressions — 35 passed
English catalog tests — 3 passed
Full English composition 11,233 keys Identical values and ordering
UI typecheck, scoped type-aware lint, i18n verification — Pass; typecheck/lint refreshed after main integration
Sidebar recovery regression Fails after unrelated connection update 22 tests passed; original recovery re-entry assertions retained
Production Knip — Pass on final source
Independent Codex review — No actionable P0–P2 findings, including fresh review of the integrated candidate
Performance CI — Pass: 323,551 B startup; zero budget-violation warnings
Full CI (ci:full) — Green: 50 successful jobs, 22 intentionally skipped; both real-Gateway shards and CI gate pass

The real CLI reproduces both enforcement holes on the original base: +65 B over an already-over-budget startup and an absolute startup violation in Actions both exit 0. Both exit 1 with this fix. Regression coverage exercises shrink/hold/+64/+65 for startup, both routes, and locale pairs, independent locale identity, request counts, and strict absolute checks.

Canonical pnpm ui:boot-manifest:gen captured synthetic cold and credential-authorized warm /new and /chat paths, followed by pnpm ui:build and strict checks. This is a loading-boundary change: no rendered content/style change, so no before/after visual delta. Full UI CI is requested with ci:full.

The checker, catalog, and sidebar regression results are reused across this merge because those source/test inputs are unchanged. The typecheck, scoped lint, full English comparison, 101-consumer AST comparison, boot manifest, production Knip, and paired builds were refreshed for this integrated source.

Growth attribution and change size

A same-toolchain rebuild of #178054 (2e602936e5f24ffc39554ba7a15e2e4bc70f939c) measured 324,405 B, versus its published 324,590 B. The original task base 5f86587ce75c245ebea7839c5901d49da9bbbcd4 measured 331,657 B: +7,252 B across startup chunk families.

Startup family Historical Original task base Growth
Application core 243,712 B 247,263 B +3,551 B
Shared UI runtime 71,350 B 74,427 B +3,077 B
Gateway runtime 7,520 B 7,566 B +46 B
Solid action chunk 0 B 526 B +526 B
Session snapshot database 1,284 B 1,336 B +52 B
Rolldown runtime + entry 539 B 539 B 0 B

Core contributors include eager English growth in #176378, #176490, #176398, #176349, and #177941; locale wiring in #178110; web-push access in #178164; session descriptions in #178064; viewport work in #176356; and icon data in #176321. The runtime graph adds Solid action/lanes and session-key parsing. #179084's own paired proof records +2,628 B from first action/optimism use. Snapshot growth maps to #178642; gateway changes include #178658 and #178106. These identify source contributors; individual PR byte allocations are not additive because bundling and compression are shared.

The final comparison above is against the newer merge parent, which already includes #179169. This PR claims only its incremental savings. It offsets startup growth through lazy copy while retaining those features. Simplification reuses the existing catalog/registration owners and adds no manager, cache, lifecycle, or state machinery. Touched physical LOC: 44,374 → 44,976 (+602), comprising production 39,917 → 40,370 (+453), tests +140, docs +5, and generated manifest +4. Diff: +1,493/−891 across 112 files. Most file changes register Session copy at 101 independently loadable translating consumers; all 101 renderer/helper bodies remain AST-equivalent after removing imports and registration calls. The Solid census is unchanged: 2 effects, 6 untrack calls, 2 flush calls, and zero controllers, render effects, native listeners, DOM queries, or owner APIs in the touched consumers.

Current CI: this head integrates origin/main to resolve five import conflicts and include #179385's Telegram ownership repair. The previously failing test configured owners and admin chat manage a Telegram-created job while a non-owner cannot passes in 27,893 ms on newer scheduled main 39592709539 / job 119197769096. The older inherited-failure evidence was not submitted for landing. Current-head full CI 39600190268 is green: 50 successful jobs and 22 intentionally skipped jobs, including successful real-Gateway shards and openclaw/ci-gate. The exact automation case passes on this PR head in 30,753 ms. No inherited-failure exception is needed.

The five conflict resolutions preserve main's renderer changes and retain this PR's catalog registration. All 101 renderer/helper bodies remain AST-equivalent to the new merge parent after imports and catalog registration are excluded. Independent review of the integrated candidate reports no actionable P0–P2 findings.

Local setup note: the retained sidebar regression proof uses the default pinned Bun fork with BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 after an observed external-SSD cache rename stall. No test timeout or assertion was weakened. External-disk builds and checks use NODE_DISABLE_COMPILE_CACHE=1.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 21, 2026
@clawsweeper

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

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-21T12:53:29.450281Z 4776432 New commits
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: XL labels Oct 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. label Oct 21, 2026
# Conflicts:
#	ui/config/control-ui-boot-modules.json
@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR defers session English copy, enforces Control UI asset budgets, and preserves refresh retry state across unrelated shell updates.

Example: Control UI refresh recovery is pending when the connection status changes.

  • Before: The card can lose its pending or failure state.
  • After: The card retains its pending state and subsequent Retry now action until recovery ends.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused changes with production-entry evidence and no actionable findings; the reported merge conflict is a workflow blocker rather than a patch-quality defect.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Recorded production-checker runs change both enforcement-hole scenarios from exit 0 to exit 1; matched release builds reduce startup gzip from 330,965 B to 323,446 B, and exact-head performance and browser E2E jobs corroborate the resulting build and recovery behavior.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Control UI startup downloads exceed the intended budget, CI accepts budget violations, and refresh recovery can lose its retry state.
Reason: The maintainer-authored direction has clear value, preserves visible copy and existing settings, and explicitly accepts the small New Session asset increase in exchange for startup savings.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This PR remains useful and has no actionable code findings; GitHub reports a merge conflict that must be resolved before landing.

Priority: P2
Reviewed head: b2a98dfd9879a8702251acbec0a23049fce03874

Before merge

  • Complete next step - Resolve GitHub's reported merge conflict while preserving both branches' behavior, then run checks affected by the resolution.

Findings

None.

Agent review details

How this fits together

Control UI build tooling groups browser assets and checks their compressed sizes; runtime catalog registration supplies lazy English copy, while the sidebar presents update recovery.

flowchart TD
  A[English catalogs] --> B[Consumer registration]
  B --> C[Control UI routes]
  A --> D[Vite chunk grouping]
  D --> E[Built browser assets]
  E --> F[Performance budget checker]
  G[Recovery scope] --> H[Sidebar retry state]
Loading

Technical review

Best possible solution:

Retain the existing catalog, chunking, budget, and recovery owners while deferring session copy and enforcing the documented limits.

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

Current-main source shows advisory Actions exits and the refresh memo's unstable object identity; the PR records failing CLI and recovery scenarios before repair, without a new run during this read-only review.

Is this the best way to solve the issue?

The patch uses the existing owners, preserves shared English labels and namespace identity, compares locale sizes independently, and repairs recovery equality without adding lifecycle machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7050f5b04d42.

Provenance checked

  • Actions budget enforcement changes intended behavior with a stated reason (9ed5a04: Size and performance limits became advisory in Actions so ordinary growth would not block otherwise valid changes; this PR explicitly restores strict enforcement for Control UI assets.)
  • Lazy English composition and registration keeps the original intent (perf: defer page-only English copy from UI startup #178054: Page-only copy follows its consumers while shared labels remain eager; the later composer extraction uses the same registration and composition owners.)
  • Route chunk separation keeps the original intent (unknown: Current grouping preserves route-exclusive renderers and compressed-size limits; history was followed through earlier chunking paths, but the precise introduction of the changed partition size was not established.)
  • Refresh recovery scope keeps the original intent (dbb656b: The scope object replaced manual attempt bookkeeping to reject obsolete results and reset state on recovery re-entry; value equality preserves that lifecycle across unrelated prop updates.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Avant: Raw commit 4fa2da5 adds ui/src/i18n/locales/en-chat-composer.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4fa2da58c127; files: ui/src/i18n/locales/en-chat-composer.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Restores startup download headroom, makes asset-budget enforcement effective, and repairs a bounded refresh-recovery defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-21T10:40:04.309Z sha 97081d9 :: needs changes before merge. :: none

Reviewed October 21, 2026, 7:51 AM ET / 11:51 UTC (Revision 2).

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Head b2a98dfd9879a8702251acbec0a23049fce03874 repairs the refresh-card scope reset; both phone recovery variants now pass. The exact folding case also passes without folding-test changes. Completed full CI run 39589377474 has one remaining failed root: configured owners and admin chat manage a Telegram-created job while a non-owner cannot, with the same full test name and 60-second first-create timeout on scheduled main 39585413125. The body now records the exact comparison and the native inherited-failure landing route. Performance CI passes at 323,468 B startup with zero budget-violation warnings; matched local release builds save 7,519 B. No remaining code findings were identified in independent review.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Oct 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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 21, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The reported conflicts are resolved on 4776432d9065834e6a6a8232c5ac3ee10cf0bd7d. All 101 translating consumer bodies remain AST-equivalent to the new main parent after imports/catalog registration are excluded; all 11,233 English values and their order match. Fresh independent review, UI typecheck, scoped lint, canonical manifest generation, paired performance checks, and production Knip pass.

Full CI 39600190268 is green: 50 successful jobs, 22 intentionally skipped, both real-Gateway shards and the CI gate pass. Performance CI measures 323,551 B startup with zero budget-violation warnings. The exact former Telegram automation failure passes in 30,753 ms after incorporating #179385. The PR body records the current proof; native landing preparation is in progress.

@clawsweeper

clawsweeper Bot commented Oct 21, 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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@steipete
steipete merged commit e42e9b5 into main Oct 21, 2026
134 of 135 checks passed
@steipete
steipete deleted the solid2/hf-startup-budget branch October 21, 2026 13:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

jalehman added a commit to enki/openclaw-public that referenced this pull request Oct 21, 2026
Picks up openclaw#179227 so the Control UI startup budget passes.
roboclaw-bot added a commit that referenced this pull request Oct 21, 2026
Move Session English into its canonical lazy catalog and register it at
all translating consumers without changing copy or primary behavior.
Keep pending widget presentation lazy and use the canonical shared
plugin-actions grouping; regenerate the branch-specific boot manifest.

Adapt the source repair by Peter Steinberger from #179227 and #179367,
retaining the existing Details geometry and dashboard menu lifecycle.
Preserve startup and route budgets without changing their policies.

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…penclaw#179227)

* fix(ui): restore startup headroom and enforce asset budgets

* fix(ui): register deferred English at translating consumers

* fix: keep lazy English within Control UI route budgets

* fix(ui): retain refresh recovery across shell updates
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 ci:full Keep ordinary native-locale CI selection on the next PR run. 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. docs Improvements or additions to documentation 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. scripts Repository scripts size: XL 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