Skip to content

fix(ui): defer Apps-only English text at startup - #147164

Merged
steipete merged 1 commit into
mainfrom
codex/ui-defer-apps-copy
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ui-defer-apps-copy

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #147105

What Problem This Solves

The Control UI loads Apps-page English text on startup even when that view is never opened, contributing to the current startup JavaScript size-gate failure on main.

User Impact

Apps-only text loads with the existing lazy Apps, catalog-search, and device-settings entry points. Startup JavaScript is smaller, while all displayed copy and translated-language fallback remain unchanged.

Why This Change Was Made

The existing English registrar owns deferred copy. This change moves one complete subtree through that owner and updates all three consumers and the tooling catalog composition together. It leaves the existing size budgets and variance allowance unchanged.

Evidence

  • Same-checkout comparison with fixed build identity: startup gzip decreases from 355,703 B to 355,168 B (535 B), with 551 B of headroom below the existing limit. Startup requests remain eight.
  • The complete ordered source-catalog SHA-256 is unchanged; keyless i18n verification passes.
  • All 35 focused tests pass, including cold loading and partially translated locale fallback. The cold-loading regression fails before the change.
  • Final independent P2 review and the complete changed gate passed.
  • Current main's unrelated size-gate failure is recorded here. This production startup repair unblocks the Code Mode PRs without changing the gate.

The synthetic Apps view is visually unchanged. Before/after captures are byte-identical; runtime inspection confirms the copy is absent on initial navigation after the change and present when Apps opens.

Before After
Apps view before deferring English copy Apps view after deferring English copy

Move unchanged Apps strings into the existing lazy English catalog and register them synchronously in Apps, command palette search, and device settings. Preserve the complete ordered source catalog and startup labels.

Startup gzip drops from 355703 to 355168 bytes with eight startup requests and unchanged budgets. Verify cold fallback loading, 35 focused tests, keyless i18n checks, full changed checks, and independent review.
@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 15:57
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 12:04 PM ET / 16:04 UTC.

ClawSweeper review

What this changes

Defer Apps English text until Apps, command-palette search, or device settings loads, while preserving translation fallback and the complete tooling catalog.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, focused startup optimization, and no introduced correctness defect was found. Current main still includes the Apps text eagerly; the maintainer-authored, protected PR is not a cleanup candidate.

Priority: P2
Reviewed head: 2ed943192f94df0bed77c573be641688b80f6689

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation follows the existing ownership pattern and includes relevant regression coverage, with no blocking defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; supplied startup measurements address the changed loading boundary, and cold-consumer tests supplement fallback coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; supplied startup measurements address the changed loading boundary, and cold-consumer tests supplement fallback coverage.
Evidence reviewed 7 items Current main still loads Apps text eagerly: The fetched main revision retains the complete appsPage subtree in the eager English catalog, so the proposed extraction remains useful.
Existing ownership contract: The UI guide explicitly requires synchronous registration at lazy consumers, preservation of the shared English object, empty ordering anchors, and host-only complete catalog composition. Root, UI, and scripts policies were read fully; no maintainer-notes directory was present.
Consumer coverage and fallback: Production appsPage lookups occur in Apps view, command-palette catalog search, and device settings; all three register the extracted catalog. The translation manager retains the shared English object and falls back to it for missing selected-language keys.
Findings None None.
Security None None.

How this fits together

The Control UI combines an eager English catalog with text registered by lazy-loaded screens. The translation manager uses that catalog as fallback, while build tooling composes all text for translation generation and verification.

flowchart TD
  A[Control UI startup] --> B[Shared English catalog]
  C[Apps, search, or device settings opens] --> D[Register deferred Apps text]
  D --> B
  E[Selected language] --> F[Translation lookup]
  B --> F
  F --> G[Displayed labels]
  D --> H[Complete tooling catalog]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +21, Tests +57, Other +3. Total +81 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 5 84 63 +21
Tests 1 57 0 +57
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 0 +3
Total 7 144 63 +81

Review metrics

Metric Value Why it matters
Reported startup reduction 535 gzip bytes saved; eight requests unchanged The supplied comparison ties this extraction to reduced startup payload without increasing request count or relaxing budgets.

Technical review

Best possible solution:

Keep Apps fallback text with its lazy consumers and preserve the existing shared catalog, ordering, locale preferences, and startup budgets.

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

Yes for the eager-loading mechanism: current main places the complete Apps subtree in the startup English catalog. The exact size-gate failure and byte savings were supplied by the PR and were not independently rerun.

Is this the best way to solve the issue?

Yes: the patch follows the established lazy-catalog pattern, updates every identified consumer, and preserves complete tooling composition without changing settings or budgets.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded Control UI startup-performance improvement with unchanged user-facing text.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; supplied startup measurements address the changed loading boundary, and cold-consumer tests supplement fallback coverage.

Label justifications:

  • P2: This is a bounded Control UI startup-performance improvement with unchanged user-facing text.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; supplied startup measurements address the changed loading boundary, and cold-consumer tests supplement fallback coverage.

Evidence

What I checked:

  • Current main still loads Apps text eagerly: The fetched main revision retains the complete appsPage subtree in the eager English catalog, so the proposed extraction remains useful. (ui/src/i18n/locales/en.ts:3157, ca0746ad8c56)
  • Existing ownership contract: The UI guide explicitly requires synchronous registration at lazy consumers, preservation of the shared English object, empty ordering anchors, and host-only complete catalog composition. Root, UI, and scripts policies were read fully; no maintainer-notes directory was present. (ui/AGENTS.md:28, 2ed943192f94)
  • Consumer coverage and fallback: Production appsPage lookups occur in Apps view, command-palette catalog search, and device settings; all three register the extracted catalog. The translation manager retains the shared English object and falls back to it for missing selected-language keys. (ui/src/i18n/lib/translate.ts:46, 2ed943192f94)
  • Cold-loading regression coverage: The new table tests each consumer with Apps fallback initially absent and a partially translated German catalog, checking complete English fallback and preservation of translated sibling text. This complements the existing browser and transcript loading tests without adding a production test seam. (ui/src/i18n/apps-loading.test.ts:33, 2ed943192f94)
  • Supplied validation and discussion: The captured PR body reports startup gzip decreasing from 355,703 to 355,168 bytes, eight unchanged startup requests, unchanged ordered catalog hash, and 35 passing focused tests. Supplied checks include successful control-ui-performance and control-ui-i18n results. These are supplied results, not reviewer executions. The related Code Mode issue describes separate agent-tool work; it does not establish a Codex dependency for this UI-only extraction. (2ed943192f94)
  • Area history for routing: Current-main history lists Peter Steinberger on several catalog changes, including b023df8 and 1ccb3e1. Apps-view history also lists Patrick Erichsen at cfbbbb0. Deeper blame and pickaxe inspection could not complete because historical objects were unavailable; no source-line introduction attribution is claimed. (scripts/lib/control-ui-i18n-catalog.ts, ca0746ad8c56)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick Erichsen: 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.

@steipete
steipete merged commit f7c9b9a into main Sep 13, 2026
200 checks passed
@steipete
steipete deleted the codex/ui-defer-apps-copy branch September 13, 2026 16:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Move unchanged Apps strings into the existing lazy English catalog and register them synchronously in Apps, command palette search, and device settings. Preserve the complete ordered source catalog and startup labels.

Startup gzip drops from 355703 to 355168 bytes with eight startup requests and unchanged budgets. Verify cold fallback loading, 35 focused tests, keyless i18n checks, full changed checks, and independent review.
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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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