Skip to content

improve(ui): load Cloud Workers copy with settings - #138490

Merged
steipete merged 2 commits into
mainfrom
codex/team-ui-startup-budget-20260904
Sep 4, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/team-ui-startup-budget-20260904

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI loads all 54 Cloud Workers settings strings on every initial page, although only the lazy Cloud Workers page uses them. This unnecessary eager copy was found while investigating an inherited startup-budget failure on base 606d9ab. Since that proof, #137342 independently deferred the model-provider catalog on main; this change defers the separate Cloud Workers subtree.

Why This Change Was Made

Move the unchanged Cloud Workers English subtree into the existing lazy Settings catalog. Register it synchronously when its page module loads, before rendering. Keep an empty anchor in the eager catalog so host generation and translation-memory composition preserve the full source ordering.

This reuses the existing loading and registration owner. No budget, threshold, dependency, configuration, translation value, foreign translation memory or boot manifest changes. Production is +68/-63 lines: 63 lines move, with five net lines for the existing lazy boundary. No permanent test growth.

User Impact

Initial pages avoid downloading and parsing settings copy they do not use. Cloud Workers rendering, field labels, validation guidance and English fallback remain unchanged.

Evidence

  • The full canonical catalog remains byte-for-byte identical: 6,314 values across 284,994 serialized bytes, including all 54 moved strings.
  • Independent P2 source review found no actionable issue. After composing the adjacent catalog additions from fix(channels): keep quiet progress and the tool log under toolProgress #137342 on main 0062f2b, full ordered catalog parity still holds; 143 tests across six owner, translation and settings-search files pass. Fresh integration P2 review found no actionable issues.
  • Linux Node 24.20.0 / pnpm 12.1.0 / Vite 8.2.2 / Pako 3.0.1: paired base 606d9ab and candidate startup artifacts measured 350,361 → 349,467 bytes gzip, with eight requests and the unchanged 350,141-byte limit. This is the paired artifact difference; build metadata includes the candidate dirty flag. It is not a measurement against newer main.
  • Normal build, 109 tests across five owner/i18n files, and the full required changed gate passed.
  • The existing production-bundle Settings layout browser case passed across its settings routes, including Cloud Workers. One case was selected; four were unselected. The browser uses a synthetic mocked Gateway, not a live provider.
  • All 19 native proof commands exited zero without timeout, supervisory signals, or surviving recorded children. The isolated lease was stopped and confirmed completed.

The original Linux Node 24.20 / Vite 8.2.2 / Pako 3.0.1 diagnostic measured the actual base at 350,321 bytes gzip against the 350,141-byte limit. Its unrelated backend merge measured 350,365 bytes (+44). That difference is consistent with build metadata and propagated asset hashes; it is not exclusively attributed. The original failing gate and successful collection/cleanup receipts are retained. The repair targets startup payload; it does not establish production request latency or attribute the original growth to one historical feature.

The synthetic Cloud Workers page remains visually unchanged (captured after the change):

Cloud Workers settings with unchanged English copy

Related contribution: Ayaan Zaidi (@obviyus) implemented and verified the same Cloud Workers lazy-catalog change in #138461; #138472 was a credited replacement. Those PRs were closed as superseded by this landed change. Thanks to @obviyus for the contribution and proof.

@steipete steipete self-assigned this Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 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 size: S maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 2:45 PM ET / 18:45 UTC.

ClawSweeper review

What this changes

The PR moves Cloud Workers English strings into the lazy Settings catalog and registers them before the Cloud Workers page renders, reducing startup copy without changing displayed text.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still keeps this English subtree eager, while the proposed synchronous registration follows the established lazy-settings contract; no blocking correctness or security finding was identified.

Priority: P3
Reviewed head: 96ea0b52c805887a1366f315e33b901910970670

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, policy-aligned loading-boundary change with existing behavioral coverage and no supported defect finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR is MEMBER-authored, so the external-contributor proof gate does not apply. Its supplied browser screenshot and mocked-Gateway page evidence are supplemental; the attachment could not be independently fetched after this read-only environment failed GitHub DNS resolution.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR is MEMBER-authored, so the external-contributor proof gate does not apply. Its supplied browser screenshot and mocked-Gateway page evidence are supplemental; the attachment could not be independently fetched after this read-only environment failed GitHub DNS resolution.
Evidence reviewed 6 items Current main still has the eager subtree: The fetched main revision defines the full Cloud Workers English object in the startup catalog, while its Settings registrar and Cloud Workers page do not contain this extraction or registration.
Lazy consumer registration is ordered before rendering: The dynamically imported Cloud Workers page imports and synchronously invokes the existing Settings English registrar before any of its translation lookups render.
Settings search retains the other required entry point: Settings search imports and invokes the same registrar before constructing translated search blocks; the sidebar itself is dynamically loaded only after entering Settings.
Findings None None.
Security None None.

How this fits together

The Control UI starts with shared translation copy and loads Settings navigation and pages on demand. Settings search and the Cloud Workers page need the same English fallback strings before they render or search.

flowchart LR
  A[Control UI startup] --> B[Shared English catalog]
  C[Settings takeover] --> D[Lazy Settings catalog]
  E[Cloud Workers route] --> F[Lazy Cloud Workers page]
  D --> G[English fallback registry]
  F --> G
  G --> H[Settings search and page text]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +5. Total +5 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 68 63 +5
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 68 63 +5

Review metrics

Metric Value Why it matters
Production versus test LOC production +5 net, with 63 translation lines relocated; tests 0 The small production increase is the import and synchronous registration needed to establish the existing lazy boundary; translation content is moved rather than expanded.

Technical review

Best possible solution:

Keep the empty eager anchor, retain registration from both Settings search and the lazy Cloud Workers page, and land the focused startup-payload reduction once normal exact-head checks complete.

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

Not applicable: the central change is a startup-payload optimization, not a reported user failure. Existing browser coverage exercises the Cloud Workers page after its English strings are registered.

Is this the best way to solve the issue?

Yes. The scoped UI policy specifically requires empty whole-subtree anchors and synchronous registration at lazy consumers; keeping the subtree eager would not reduce startup payload, while page-only registration would leave Settings search uncovered.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 26f87a37009b.

Labels

Label changes:

  • add P3: This is a focused Control UI startup-payload optimization with preserved visible behavior.
  • 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 PR is MEMBER-authored, so the external-contributor proof gate does not apply. Its supplied browser screenshot and mocked-Gateway page evidence are supplemental; the attachment could not be independently fetched after this read-only environment failed GitHub DNS resolution.

Label justifications:

  • P3: This is a focused Control UI startup-payload optimization with preserved visible behavior.
  • 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 PR is MEMBER-authored, so the external-contributor proof gate does not apply. Its supplied browser screenshot and mocked-Gateway page evidence are supplemental; the attachment could not be independently fetched after this read-only environment failed GitHub DNS resolution.

Evidence

What I checked:

  • Current main still has the eager subtree: The fetched main revision defines the full Cloud Workers English object in the startup catalog, while its Settings registrar and Cloud Workers page do not contain this extraction or registration. (ui/src/i18n/locales/en.ts:2368, 26f87a37009b)
  • Lazy consumer registration is ordered before rendering: The dynamically imported Cloud Workers page imports and synchronously invokes the existing Settings English registrar before any of its translation lookups render. (ui/src/pages/cloud-workers/cloud-workers-page.ts:41, 96ea0b52c805)
  • Settings search retains the other required entry point: Settings search imports and invokes the same registrar before constructing translated search blocks; the sidebar itself is dynamically loaded only after entering Settings. (ui/src/pages/config/settings-search.ts:23, 96ea0b52c805)
  • Build-time catalog remains complete: The host-only catalog composer reads the registrar catalog directly and merges it with the empty anchor, without mutating the runtime English map. (scripts/lib/control-ui-i18n-catalog.ts:46, 96ea0b52c805)
  • Existing browser coverage exercises the page output: The mocked-Gateway browser test navigates to the Cloud Workers Settings route and waits for the moved empty-state English string. (ui/src/e2e/cloud-workers-settings.e2e.test.ts:65, 96ea0b52c805)
  • Feature-history routing: The Cloud Workers UI originated with the merged feature commit; the current author also authored the directly relevant lazy-registration commit. Detailed older line history could not be hydrated from the partial clone after DNS resolution failed, so no line-introduction pointer is asserted. (ui/src/pages/cloud-workers/cloud-workers-page.ts, 78beccf05397)

Likely related people:

  • steipete: 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 7ab8ca3 into main Sep 4, 2026
138 checks passed
@steipete
steipete deleted the codex/team-ui-startup-budget-20260904 branch September 4, 2026 19:24
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@vincentkoc

Copy link
Copy Markdown
Member

Contributor attribution: Ayaan Zaidi (@obviyus) previously proposed the same Cloud Workers lazy-catalog repair in #138461. The credited replacement was #138472. This note records the earlier contribution; #138490 remains a parallel maintainer-authored implementation.

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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

2 participants