Repository navigation
fix: reduce Control UI startup download for device controls - #164735
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 11:26 PM ET / October 4, 2026, 03:26 UTC. ClawSweeper reviewWhat this changesThe PR moves device-control English text into the existing lazy Devices catalog and registers it before its consumers render, reducing the Control UI startup download. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused performance fix absent from current main. No actionable introduced defect was found, and the member-authored PR is protected from automatic closure. Likely related people: Peter Steinberger and Nehanth Narendrula, both unverified routing candidates. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI loads shared English text at startup and additional catalogs when optional pages open. Devices views use those catalogs to label inventory, bindings, approval controls, and dialogs. flowchart TD
A[Control UI startup] --> B[Shared English catalog]
B --> C[Pairing trigger and loading messages]
D[Open Devices page] --> E[Load Devices catalog]
E --> F[Register English fallback text]
F --> G[Render device controls]
B --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +29. Total +29 across 10 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep device-only copy behind the existing lazy loading boundary while preserving eager pairing feedback and the complete ordered translation catalog. Do we have a high-confidence way to reproduce the issue? No independent runtime reproduction was performed. The PR records a concrete matched-build performance failure and improvement, and source inspection confirms the eager-copy loading path. Is this the best way to solve the issue? Yes: extending the existing lazy Devices catalog is a focused solution that preserves shared fallback lookup, pairing startup feedback, and catalog composition. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47206579b8e2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Improved: Control UI startup downloads less device-only English copy while preserving Devices and pairing behavior. |
Load device-only English copy with the existing lazy Devices views while preserving pairing messages and translation fallback behavior. Refs openclaw#121497.
Load device-only English copy with the existing lazy Devices views while preserving pairing messages and translation fallback behavior. Backport to 2026.10.1 to repair the unchanged startup gzip ceiling: 374776 B before, 372781 B after, 373454 B limit; 8 requests unchanged. The complete ordered English catalog retains all 10315 key/text entries. 113 existing Devices and i18n tests pass; fresh P0-P2 review is clean. (cherry picked from commit 8bae5df)
Related: #121497
What Problem This Solves
The Control UI initial JavaScript payload exceeds its startup budget while including device inventory, binding and execution-policy copy needed only by lazy Devices views.
User Impact
The initial download is 1,993 gzip bytes smaller in matched builds, bringing it below the existing limit. Devices controls, translated fallback text and pairing error messages keep their existing behavior. No user action is required.
Why This Change Was Made
Move device-only English copy into the existing lazy Devices catalog and register it synchronously in its consumers. Keep the four pairing-trigger and load-failure strings eager, preserve the shared catalog objects and leave anchors in the original key positions. This uses the existing loading boundary without changing budgets, preload hints or translation text.
The resulting startup margin is 857 bytes. Total gzip JavaScript across all routes grows by 390 bytes because of the different compression boundary; the improvement is in when bytes load. This is a focused reduction related to #121497, not a resolution of that issue's broader budget-policy question.
Evidence
Matched builds with fixed identity measured initial JS at 374,590 → 372,597 bytes against a 373,454-byte limit. Ready
/newand/chatpayloads also decreased, with unchanged request counts and CSS. The standalone performance check changed from failing to passing.The fully composed English catalog is byte-identical. All 133 existing tests across nine Devices and pairing files passed on the Cloud Mac in 6.97 seconds. The i18n verifier passed; a focused fallback check covered all 161 moved strings, eager pairing text, selected-locale preservation and idempotent registration. Cold and authorized warm route captures produced identical before/after module manifests.
This changes download composition rather than visible UI behavior; byte accounting, route captures and rendering tests provide the relevant before/after evidence.
Focused Cloud Mac validation also passed formatting, changed-source lint, style checks and the UI type graph (30.2 seconds). Hosted CI passed all three UI unit shards, both real-Gateway UI suites, the mocked UI suite, performance, lint, types, dependency and architecture checks.
The exact PR head also passed hosted performance validation at 372,600 startup gzip bytes. A fresh production build of this patch composed with main
b72a95e3passed the strict checker at 372,594 bytes (860 bytes below the limit), preserving 8 initial requests and 25/30 ready New/Chat requests.CI also exposed two inherited failures: the suppression inventory omitted two existing assertions, and the mock-export baseline reader hit
ENOBUFS. Both were reproduced on unmodified main. The inventory repair is already on main and passes its eight relevant tests with this patch; the buffer repair is tracked separately in #164743. The CI aggregate and its mirrored status reflect those failures. Landing uses the documented inherited-failure exception, preserving the failed results.