Repository navigation
fix(ui): restore absolute bundle and boot budgets - #195199
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 Summary: ✅ CompletedThis 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 changes before merge. What this changesThis PR shrinks Control UI locale metadata, shares startup artwork and styles, and removes unused CSS without raising performance limits. Example: Open translated Chat after a production build.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR makes a useful budget repair, but its unallocated test growth introduces a concrete CI blocker. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe UI build converts translation catalogs, HTML, and styles into browser assets consumed by Chat, connection screens, and startup recovery. flowchart LR
Catalogs[Translation catalogs] --> Build[UI build]
Document[Startup document and styles] --> Build
Build --> Assets[Immutable browser assets]
Assets --> Browser[Control UI browser]
Browser --> Chat[Translated Chat]
Browser --> Recovery[Connection and recovery screens]
Technical reviewBest possible solution: Keep the focused production reduction and fund its retained regression coverage with an exact, justified test-line allocation. Do we have a high-confidence way to reproduce the issue? The reported absolute-budget overages are supported by the supplied build measurements; the introduced test-budget failure is independently reproducible from tracked LF counts and the checker's failure condition. Is this the best way to solve the issue? The production change uses existing build and presentation owners, preserves parallel locale loading, and removes duplicate data without adding runtime machinery. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c0645d898354. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -152, Tests +68, Docs +9. Total -75 across 19 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 Reviewed November 8, 2026, 6:58 AM ET / 11:58 UTC. |
Compact early locale metadata without adding a request wave, share recovery artwork and mascot styles, and remove unused internal CSS. Preserve connection, translated Chat, and offline recovery behavior with unchanged budget ceilings.
Restore expectLiveObjects for its existing retention consumers after the main conflict repair. Wait for the native dialog transition before comparing footer geometry, and consolidate the budget regressions to fit the unchanged test-line ceiling.
fa01272 to
f5ca822
Compare
|
Landing note: ClawSweeper's P2 "allocate the retained regression-test growth" applied to the earlier head. At the merged head f5ca822, redundant test coverage was removed instead of adding an allocation; |
* fix(ui): restore absolute bundle and boot budgets Compact early locale metadata without adding a request wave, share recovery artwork and mascot styles, and remove unused internal CSS. Preserve connection, translated Chat, and offline recovery behavior with unchanged budget ceilings. * fix(test): restore retention checks and stabilize modal geometry Restore expectLiveObjects for its existing retention consumers after the main conflict repair. Wait for the native dialog transition before comparing footer geometry, and consolidate the budget regressions to fit the unchanged test-line ceiling.
What Problem This Solves
Fixes absolute Control UI bundle and boot budgets failing on main even when base-relative PR checks pass.
User Impact
The same connection, recovery, and translated Chat UI ships fewer document, CSS, and boot JavaScript bytes. No settings, budget ceilings, or CI policies change.
Why This Change Was Made
#194070 embedded independently hashed namespace filenames for all 22 translated locales in every document. Namespace data now shares an immutable content generation per language, keeping the same 14 parallel Chat preload requests with compact metadata. A namespace change invalidates that language's namespace set; base catalogs and config hints keep independent chunk identities. This avoids the extra network round trip observed when deferring the hints.
The runtime connection screen reuses the self-contained document's mascot styles and wordmark definitions, removing duplication introduced by #191935. Unused internal theme variables are deleted, and document compaction removes indentation while preserving visible spacing and preformatted content. Recovery retains the shared SVG host when replacing the body.
Production LOC: −152. The build-only generation and markup work adds 49 lines, offset by removing duplicate rendering/style data. Total deferred JavaScript raw size grows 193,164 bytes while gzip falls 86,130 bytes.
Recommendation for a separate change: CI should run the absolute checker alongside base-relative checks, because acceptable deltas can accumulate beyond fixed ceilings. This PR does not change CI policy.
Evidence
Baseline: main
8b16683b5982f987dea6bd2556b56bc92c66cc11. Production build and absolute checker pass with unchanged limits. Values are normalized bytes frompnpm ui:check-performance --module-attribution.Locale/build tests pass (50 + 20), fallback tests pass (32), component/theme tests pass (30), and theme browser tests pass (2). Connection, locale/offline retry, and failed-guidance E2E pass (3 + 3 + 1). The namespace generation regression fails on the parent implementation; the SVG recovery regression failed before its fix. Final built Chromium/WebKit proof has 44 pixel-identical mascot/wordmark comparisons and 32 identical computed-style permutations. Codex autoreview is clean at P0–P2.
Production-shaped synthetic UI (1,000 sessions, 500 cron jobs, 400 transcript messages), using production HTTP assets and synthetic RPC: all 90 English/German/Arabic cold-boot samples pass across localhost and 100 ms RTT, with base/candidate/base A/A controls. Readiness medians stay within 2%; renderer CPU has no meaningful increase. Separate sampled allocation medians B/H/A are English 95.04/89.74/90.11 MiB, German 92.89/90.50/94.37 MiB, Arabic 93.66/93.42/97.76 MiB. These are whole-renderer estimates, not exact allocation counts.
The focused 20-pair Arabic localhost follow-up passed all 60 samples: readiness median B/H/A 413.8 / 412.5 / 411.5 ms, p95 421 / 422.7 / 419.6 ms, CPU median 484.1 / 479.2 / 477.5 ms. The tail regression did not reproduce; no overall speedup claim is needed for this byte-budget fix.
Follow-up rebased onto main
34d5b3fd2911a25dbb97f791e3161a999b0fa130. Fresh production build and absolute budgets pass; scoped lint and Codex autoreview pass. Current focused proof: locale/fallback 82 tests, ClawHub Chromium/WebKit 8 tests, retention consumers 39 tests, and connection E2E 1 test. Production typechecks and all core test-type shards pass locally.check-prod-types34d5b3fdrestores the missing retention helpers; production typechecks now pass.check-test-types-*expectLiveObjects, used by three existing retention suites. Restored that export; all core type shards and all 39 consumer tests pass.checks-fast-baseline-ratchetschecks-ui (1/3)1adb2047bdf8).The original unmodified main WebKit case passed 20 repeated local runs; the controlled frame-crossing reproduction identifies the intermittent timing precondition rather than claiming those green replays proved a fix. The revised test retains exact geometry assertions. Test-line growth is now +37 instead of +68 (plus +3 lines in the existing retention helper's formatted export). No runtime UI code changed in this CI repair.
Focused local test wall times: locale/fallback 5.20 s; ClawHub Chromium/WebKit 6.94 s; retention suites 61.67 s including compiler setup (58.40 s Vitest, 92% transform); connection E2E 17.31 s. The failed CI UI step took 101.49 s across 73 WebKit files; only its failing owner was rerun locally. All previously red gates are now green on head
f5ca8222f4d26e37348e799b8395b4a08fb46f29: production types, aggregate test types, all five core type stripes, baseline ratchets, and all three UI shards including WebKit. Exact-head CI run. Broader E2E jobs are still finishing; no merge performed.Synthetic connection screen before:
After: