Repository navigation
perf(ui): reclaim Chat boot bytes and lower budgets - #194135
Conversation
Remove retired English copy, obsolete browser fallbacks, and unused emitted initialization. Preserve layout and behavior while reducing normalized Chat boot by 1,741 B and total CSS by 158 B; ratchet measured caps with 64 B headroom.
|
🦞👀 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 removes unused English copy, retired styles, obsolete browser fallbacks, and unused initialization, then lowers Control UI size budgets. Example: Open Chat from a production build.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a measured byte reduction with no identified code defect; its current-head CI gate remains failed. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI build bundles browser code, English catalogs, and styles into assets served by the Gateway; the performance checker measures those assets against committed ceilings. flowchart LR
A[English catalogs] --> D[Production UI build]
B[Browser utilities] --> D
C[Shared styles] --> D
D --> E[Gateway served assets]
E --> F[Chat browser]
D --> G[Performance checker]
Technical reviewBest possible solution: Land the deletion-based paydown and lower budgets after the current-head CI failure is classified and the required gate is satisfied. Do we have a high-confidence way to reproduce the issue? This is a measured size paydown rather than a functional bug report; the PR supplies paired production-build measurements, and no target code was executed during this review. Is this the best way to solve the issue? The invariant is unchanged supported-browser behavior with fewer emitted bytes; deleting unused paths through existing owners and ratcheting their budgets is the smallest complete approach. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e5253a3b0563. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -188, Tests -33, Other -2. Total -223 across 30 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 6, 2026, 8:41 AM ET / 13:41 UTC. |
Retire a pending timer or idle capture when snapshot invalidation removes a session. Otherwise a cross-tab deletion can be followed by a stale live projection that writes the deleted row back into storage before the local roster catches up. Keep the two-tab write budget unchanged. Add a persisted-row regression that fails before the fix; all 34 owner tests and both deletion E2E cases pass. The repair adds 3 B normalized gzip and retains a 1,829 B Chat boot saving; ratchet caps to the final measurements plus 64 B.
WebKit CI observed the menu's 0.95 entry scale, turning the correct 6px gap into a transient 5.7px rectangle gap. Finish finite menu animations with the existing helper before measuring static geometry; retain the exact spacing, clickability, and modal assertions. All nine transient surface cases pass in Chromium and WebKit. UI types, focused lint/format, and independent review pass. Production bundles are unchanged.
Merge current main and retain the byte-paydown changes. Matched native-plugin inventory builds against 59b8a11 measure Chat 1289681 -> 1288034 B, New Session 798642 -> 797475 B, and CSS 324666 -> 324620 B normalized gzip. Ratchet those caps to measured head plus 64 B, below main's caps. Keep the largest-JS cap unchanged: its inherited overage shrinks by 473 B. The paired strict check passes. Current-base Chromium/WebKit proof covers 16 states and 1206707 computed properties with no differences. Types, production Knip, the WebKit transient suite and fresh independent review pass.
Record the 11 net test lines for the persisted-row resurrection regression and native-menu geometry settlement after removing redundant base64 fallback coverage. Keep the shared test-line scalar unchanged. The exact test-line ratchet and independent review pass. This is metadata only; production assets and prior behavior proof are unchanged.
Track observed catalog invalidations until the corresponding read starts, then retain the existing reply and no-new-request assertions. This covers the publication coalescing window without arbitrary sleeps or product changes. The scoped test allocation now covers 27 net regression-test lines, including 16 lines for publication settlement.
|
Merged via squash.
|
* perf(ui): reclaim Chat boot bytes and lower budgets Remove retired English copy, obsolete browser fallbacks, and unused emitted initialization. Preserve layout and behavior while reducing normalized Chat boot by 1,741 B and total CSS by 158 B; ratchet measured caps with 64 B headroom. * fix(ui): preserve Communications tab spacing * test(ui): scope catalog idle checks to the current socket * perf(ui): ratchet caps against complete plugin builds * fix(ui): cancel scheduled sidebar captures on deletion Retire a pending timer or idle capture when snapshot invalidation removes a session. Otherwise a cross-tab deletion can be followed by a stale live projection that writes the deleted row back into storage before the local roster catches up. Keep the two-tab write budget unchanged. Add a persisted-row regression that fails before the fix; all 34 owner tests and both deletion E2E cases pass. The repair adds 3 B normalized gzip and retains a 1,829 B Chat boot saving; ratchet caps to the final measurements plus 64 B. * test(ui): settle menu entry animation before spacing checks WebKit CI observed the menu's 0.95 entry scale, turning the correct 6px gap into a transient 5.7px rectangle gap. Finish finite menu animations with the existing helper before measuring static geometry; retain the exact spacing, clickability, and modal assertions. All nine transient surface cases pass in Chromium and WebKit. UI types, focused lint/format, and independent review pass. Production bundles are unchanged. * test(ui): allocate sidebar regression coverage Record the 11 net test lines for the persisted-row resurrection regression and native-menu geometry settlement after removing redundant base64 fallback coverage. Keep the shared test-line scalar unchanged. The exact test-line ratchet and independent review pass. This is metadata only; production assets and prior behavior proof are unchanged. * test(ui): await queued catalog publications before picker checks Track observed catalog invalidations until the corresponding read starts, then retain the existing reply and no-new-request assertions. This covers the publication coalescing window without arbitrary sleeps or product changes. The scoped test allocation now covers 27 net regression-test lines, including 16 lines for publication settlement.
What Problem This Solves
Chat boot had accumulated small, justified byte increases. This pays back 1,647 B normalized gzip without moving a lazy boundary or changing the UI, and brings total CSS below its ceiling with lower caps.
User Impact
Chat loads fewer bytes with the same requests, controls and layout. Remove 94 unused English keys, 13 aliases, obsolete base64 fallbacks below the supported browser floor, unused emitted redaction/queue initialization, and retired CSS selectors/browser fallbacks. Live redaction, persisted queue normalization and reduced-transparency preferences retain their behavior.
The closure audit ranked modules, function spans and strings. Required Markdown/entity tables, runtime code and plugin-addressable icons remain. No dependency or runtime abstraction was added.
Evidence
Final matched-inventory production builds against current main
59b8a114bf6dede71999976ddc87fd3edf382c85, on the same machine with Node 26.12.1. Both builds use 37 byte-identical native-plugin artifact inputs. Generated names are normalized by the checker from #193843. These numbers supersede the earlier base and unmatched-inventory measurements.Fixed caps are measured head + 64 B and below main's caps; initial JS retains the existing growth/variance policy. Requests are unchanged: Chat 20 JS/3 CSS, New 15/3, initial 3/1. The paired strict check passes. Main's largest-JS overage also shrinks, 560,877→560,404 B; its 560,350 B cap remains unchanged.
Touched production LOC 24,311→24,125; tests 1,751→1,778; budgets 838→837. Total 26,900→26,740 (−160), 35 files, +92/−252. Reports and build artifacts are not committed.
Inspected synthetic before/after frames from the final matched builds:
CI repairs
The first full run caught a 16px Communications spacing regression: HubTabs generated a live class missed by the initial audit. Both rules are restored and current-base visual proof preserves 24px gaps. A later real-Gateway catalog failure reproduced an unanswered old-page request surviving reload in test tracking; request/reply tracking now resets at the replacement WebSocket, while acquisition counters remain cumulative.
Run 42228358362 exposed a pending sidebar capture that could write a deleted row back before the local roster caught up. Twenty baseline replays passed, so no inherited waiver is claimed. A deterministic persisted-row regression is red before the two-line cancellation fix and green afterward; surviving rows and later live captures remain intact. Run 42231765596 passed those repairs and both real-Gateway shards. Its only failure was WebKit reading the menu's 0.95 entry scale as a 5.70px gap. The test now finishes finite animations before checking the unchanged 6px spacing and click/modal behavior. Production assets are unchanged by that test repair.
Current main was merged to resolve shared cap-line conflicts, and the final production measurements and visual comparisons were refreshed. Final candidate:
62eaf3dade84b94ab3ad337c9b8a799a1a5750c7. Full CI passes in run 42241605609.Run 42235412032 passed the test jobs; its test-line ratchet found the net 11 regression-test lines one line above the remaining shared allowance. A unique 27-line allocation records the justified persisted-row, geometry and publication-settlement coverage after redundant fallback-test removal; the shared scalar is unchanged. The exact ratchet now passes. This metadata-only final commit leaves production assets and prior proofs unchanged.
Run 42237346426 passed all jobs except the catalog real-Gateway case. Its trace showed a passive publication read arriving during the no-new-request assertion after a forced Refresh. The idle check now accounts for queued catalog invalidations until a read starts, then waits for outstanding replies. The strict request and provider-acquisition assertions remain unchanged; no sleep or product change was added. All three catalog tests pass locally (31.06 s test time; 298.32 s wall including cold prerequisite builds), using Node 26.12.1 for Playwright. UI types, lint, formatting, the exact 27-line allocation and independent review pass. The same test passed on scheduled main run 42233981965, so no inherited exception is claimed. Full CI passes for the replacement head in run 42241605609, with no inherited-failure waiver.