Skip to content

fix(ui): reduce oversized startup JavaScript - #179169

Merged
joshavant merged 1 commit into
mainfrom
fix/residual-runtime-notices
Oct 21, 2026
Merged

joshavant merged 1 commit into
mainfrom
fix/residual-runtime-notices

Conversation

@joshavant

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Control UI startup JavaScript exceeds its size budget; composer and approval-page copy loads before those surfaces are needed.

User Impact

The initial download contains less JavaScript. Visible wording, controls, approval behavior, active-language selection, and English fallback stay the same. There is no configuration or migration step. The current upstream size-budget overage is reduced but not fully eliminated; see the measurements below.

Why This Change Was Made

Move six composer namespaces into an existing-style lazy catalog and move approval-page copy into the existing approvals catalog. Register each catalog synchronously at its consumers, including plain helpers and Settings search before chat opens. Retain empty namespace objects and host-side catalog composition so translation lookup and ordering remain stable. Regenerate the boot manifest and correct stale budget documentation through their existing owners.

This reuses existing registration and invalidation owners. Most of the diff moves 358 existing catalog lines; production changes are +506/−379 across 34 files, plus the generated manifest and two documentation corrections (37 files, +520/−387 total). The added lines register existing catalogs at their consumers. No new manager, test scaffold, dependency, budget exception, or runtime lifecycle change is introduced.

Evidence

The branch was rebased onto f0c671ec92a5370b43e610c8501681202e34805c only after a local merge check found two import conflicts. Both resolutions preserve upstream attachment-error and mention-lifecycle behavior and add only catalog registration.

Matched local builds of that upstream base and head ffc7841315bb7b0125facb0fbc4da952b81a04dd, using Node 24.21.0 / pnpm 12.12.1, the same installed toolchain, checkout path, package build command, and fixed build identity:

JavaScript surface Upstream gzip PR gzip Delta Requests before → after
Initial entry 331,809 B 327,238 B −4,571 B 8 → 8
Complete Chat boot 1,493,406 B 1,494,797 B +1,391 B 26 → 25
Complete New Session boot 1,013,004 B 1,012,676 B −328 B 20 → 20

The strict size check remains red on both revisions. The current enforcement limit is 325,476 B; this PR reduces the inherited startup overage from 6,333 B to 1,762 B. It does not fully clear the current budget. Chat and New Session remain below their unchanged 1,500,000 B / 1,035,000 B caps. Startup CSS is unchanged at one request / 40,439 B gzip.

Both package builds succeed. These are static shipped-asset sizes, not load-time or agent-latency measurements. The regenerated boot manifest also incorporates three upstream modules, so the full-route differences include regrouping. The native archive-based comparison separately reported the same candidate startup size but slightly different base route totals; the table consistently uses the matched normal builds above.

  • Refreshed focused tests: eight files / 114 tests pass (8.50 s Vitest; 10.61 s shard wall), covering attachment failures, human mentions in Chat and New Session, approval pages/cards, composer status, Settings targets, and translation/fallback owners. No tests were added or changed.
  • UI type checking and ui:i18n:verify pass. All 292 moved strings compare equal to this upstream base, with namespace identity preserved across repeat registration. Earlier full-catalog proof compared 11,235 ordered key/value pairs exactly; those unchanged-input results remain prior-base evidence.
  • Boot manifest regenerated with installed Chromium through the supported executable-path override. Formatting and git diff --check pass.
  • Independent AutoReview found no actionable P0–P2 issues. A separate bounded rebase audit confirmed all 62 composer-family and four approval-page consumers remain covered and both conflict resolutions preserve upstream behavior. Refreshed typed lint passes for the changed catalogs and overlapping consumers; the two inherited diagnostics below remain separately qualified.

Known limitations: typed UI lint previously reproduced an inherited no-misused-promises diagnostic in chat-async-question-summary.tsx and a Solid reactivity warning in chat-composer-emoji.tsx. Both upstream files are unchanged at this new base. Neither diagnostic is suppressed by this PR. This is not a warning-free or all-checks-green claim; CI results will attach to the published head.

@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 in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@joshavant
joshavant marked this pull request as ready for review October 21, 2026 06:53
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: L 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
@joshavant
joshavant merged commit 4fa2da5 into main Oct 21, 2026
186 of 189 checks passed
@joshavant
joshavant deleted the fix/residual-runtime-notices branch October 21, 2026 07:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant