Repository navigation
perf(ui): defer optional root English copy - #181868
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR defers 84 English strings until their routes or command consumers load and tightens the corresponding performance budgets. Example: Open Control UI, then search Settings for Appearance.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR delivers a measured startup reduction using existing translation owners, with no actionable code findings; the earlier conflict and evidence requests are resolved. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI translation layer combines eager English with synchronously registered feature fragments, supplying fallback text to pages, command execution, and Settings search; separate tooling composes the complete ordered source catalog. flowchart TD
A[Control UI startup] --> B[Eager English catalog]
C[Feature consumer loads] --> D[Existing English registrars]
D --> B
B --> E[Translation lookup]
E --> F[Pages and commands]
D --> G[Source catalog tooling]
Technical reviewBest possible solution: Retain this focused extraction and existing synchronous registration contracts, then complete normal CI admission using the independently documented failure evidence. Do we have a high-confidence way to reproduce the issue? This is a performance improvement rather than a reported functional bug; source inspection confirms the eager strings, and the supplied matched-build and real-Gateway measurements establish the optimization scenario. Is this the best way to solve the issue? The change uses the established lazy-English mechanism, preserves first-use fallback and catalog ordering, and avoids introducing another loader or state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4c7b43d17b08. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +76, Tests +106, Other +13. Total +195 across 30 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 23, 2026, 5:23 PM ET / 21:23 UTC (Revision 2). |
|
Resolved the performance-budget conflict on @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed diagnostics-only follow-up #181989 in 951d373. The next failure of this case will attach bounded, redacted Gateway PR/RPC events, subscription WebSocket frames, and parent/descendant UI state to the existing CI-uploaded failure report. Verified with a forced failure; product behavior and timeouts are unchanged. The prior investigation remains 0/160 reproductions. |
|
Merged via squash.
|
What Problem This Solves
Control UI startup loads route subtitles, automation validation/outcome copy, and command responses before the corresponding features use them.
User Impact
The same English copy remains available on first use while startup, Chat, and New Session transfer less JavaScript. Requests and CSS are unchanged; no new loading state, configuration, permission, or migration is introduced.
Why This Change Was Made
Move 84 strings into the existing cold English registrars: 50 route subtitles, 31 automation labels/errors/outcomes, and three command responses. Each consumer registers fallback copy synchronously before translating. The canonical catalog preserves all 11,350 ordered entries and namespace object identity. No domain owner or duplicate catalog is added.
Evidence
Prior measured head:
d457b771b0334522305577ab1dfb0d7135e60665; measured base:bf93c438e2fc20a5e97f4502a3b2c1220e0c1ba3. Main was merged without replaying commits; the sole conflict was the performance budget, resolved by preserving main's tighter caps and then ratcheting from the newly measured savings.Two production builds on the same machine use Node 24.22.1, identical fixed build metadata, and the same 29 hash-pinned plugin inputs. These are shipped sidecar bytes, not summed module diagnostics.
CSS is identical: startup 40,195 B/1 request; Chat 137,169 B/3; New Session 100,662 B/3. The strict performance check has no warnings or violations. Startup baseline is officially ratcheted to 281,233 B; Chat/New caps preserve the previous relative headroom at 1,357,842/797,395 B. No cap is loosened.
Cold-load proof
The predeclared rule is ten strictly alternating baseline/candidate cold-cache pairs using the committed real-Gateway workload, gzip, 240 synthetic messages, and no profiling. Both readiness medians must be ≤1.05× baseline and neither p95 may worsen. All 20 observations are retained; no extra batch was needed.
Run 40021790056, measured source
777c86071a17004888c710112e3fdca7eb865b6cagainst808d7141c71e3145de26d329fd1386a2d6e38243, passed:All 1,080 transport receipts match the immutable raw/gzip asset manifest; all samples have the same 54 application-script responses (plus seven unchanged synthetic plugin responses). Runtime gzip is 1,365,567 → 1,364,053 B. There are no harness warnings, excluded observations, overlapping remote workloads, or active leases. The source extraction is unchanged by integration; these are prior-head timing receipts, not a claim of new integrated-head CI or a repeated timing run.
The complete module attribution and owning-feature first-paint analysis are in #181052; this change shrinks the existing root English module without adding boot modules. Synthetic before/after images below were fully inspected and contain no real conversations or account data.
Integrated-head CI follow-up
Run 40023828684 completed with one failing Real-Gateway test:
Delegated task PRs through a real Gateway > shows three persisted descendant PRs while keeping the parent branch unpublished(ui/src/e2e/task-pull-requests.real-gateway.e2e.test.ts:451). The other 39 tests in that shard and all other jobs passed. The hovercard and foreground subscription are ready, but the observed snapshot retains three receipt-only PR rows without nestedpullRequestmetadata.The exact test passed on the initially inspected scheduled main run 40020064421. The coordinator subsequently identified the known intermittent failure and authorized one rerun:
The coordinator reran the failed job by REST. Attempt 2 failed the same test at the same assertion in job
120666221787; the other 39 cases in that shard passed. CI tested merge1846fa40ea3932e8e4d3c34094d5b54af9867ff0combines main4e26493aafd06079dc94195f03b871bba6c3c618with PR headd457b771b0334522305577ab1dfb0d7135e60665.The requested local comparison ran only this case, serially in H/B/H/B order, with isolated state and Chromium. The repository wrapper prepared matching private-QA runtime/UI assets. Pair 1 used the ordinary local E2E configuration; pair 2 reused each checkout's validated prebuilt assets. Both used the pinned default test runtime and one worker. No assertions or source files were changed.
The newer completed scheduled main run 40027253564, at
04a964b26d6560bf5945ebb6ae90dd31c09eaacf, also passed this exact case in job120666860595(42,051 ms). The diagnostic change #181989 has now merged as951d37328031e5b1fc6681eb5d0c810e7594b74d. It captures Gateway hydration stages, subscription frames, and failure-only UI records; it is observability, not a root-cause fix.These are reproduction outcomes, not cold-load benchmark samples or a flake fix. With no matching main failure, the inherited/admin route is not selected. The coordinator revised the diagnosis after the second failure:
Per that instruction, the accepted auto request was natively cancelled and its retirement confirmed before replacing the head. Current head
d6d047d9aea7c6ade725957dbbce380d02594b7amerges main2a7d1994c2a1477483661bc4af5cc90e4d76e8dfwithout conflicts or replaying commits, and includes #181989. The same 30-file extraction remains. Fresh full CI passed on the replacement head; no diagnostic failure recurred. Fresh UI typecheck and production Knip passed. Full CI 40040129611 passed on this head. Both Real-Gateway shards passed; the exact descendant-PR case passed in job120709407478in 37,521 ms, and all 40 cases in that shard passed.openclaw/ci-gateand all applicable security checks are green. Native review/preparation is refreshed for replacement landing. No renewed auto request is claimed.Matched fixed-input production builds on the same host verify this integration:
2a7d199d6d047dBoth sides pass their strict performance checks. Candidate startup, route JS, CSS and locale comparisons pass with no warnings or violations. Existing tighter caps are preserved. CSS is unchanged at 40,195/137,074/100,662 B for startup/Chat/New Session. Earlier timing and detailed module attribution remain explicitly pinned to their measured commits.
LOC across the 30 changed files: 10,556 → 10,751 (+306/−111). Production growth is the existing catalog registration/composition wiring; tests protect cold first-use and object-identity contracts.
Final integrated feature-group attribution (all 95 active groups)
Measured at
d457b771b0334522305577ab1dfb0d7135e60665: 1,761 unique emitted module identities. Source maps cover 98.27% of Chat raw bytes; the remaining 71,067 raw bytes are generated/bundler glue. Standalone module gzip is a non-additive diagnostic, not transferred bytes or marginal savings. Both route graphs include startup.Highlight.js/Shiki language modules, Zag machines, KaTeX/MathJax/Mermaid, and xterm modules are absent from the measured static Chat graph. Their absence does not prove that a specific message never loads them dynamically.
The remaining groups are not all first-paint-only. They include required initial-render code and conditional behavior whose further deferral has not demonstrated a safe gain. Rejected timing/retained-content experiments are not counted in the savings. The measured Chat graph remains 41,614 B above the original 15% target.