Repository navigation
perf(ui): keep JSON5 out of chat boot - #174728
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83455acd28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs changes before merge. What this changesThis PR separates JSON5 from eagerly needed validation code and tightens the Control UI startup JavaScript budget. Example: A browser opens Chat without visiting configuration settings.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored PR provides a useful loading improvement, but its generated boot manifest must be refreshed before merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherVite chunk rules turn UI imports and measured boot-module membership into browser assets; Chat needs Zod for snapshots, while configuration consumers warm JSON5 separately. flowchart TD
A[UI source imports] --> B[Vite chunk rules]
C[Generated boot manifest] --> B
B --> D[Chat and New Session assets]
B --> E[Deferred JSON5 asset]
D --> F[Snapshot validation with Zod]
G[Configuration consumer] --> E
Technical reviewBest possible solution: Keep the focused dependency split and approved budget reduction, with the generated boot capture refreshed to match. Do we have a high-confidence way to reproduce the issue? Current main groups JSON5 with eagerly needed Zod despite the parser's dynamic import, establishing the unwanted loading path without executing target code. Is this the best way to solve the issue? Separating the dependencies at the existing build owner addresses the loading cause without changing parser ownership or introducing another runtime path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a8a543761f60. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource -4, Tests -3, Docs +2, Other 0. Total -5 across 6 files. Added test files: 0. View PR surface stats
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 October 16, 2026, 6:41 PM ET / 22:41 UTC. |
|
@clawsweeper re-review Addressed the boot-manifest finding in f3c5571. Ran the canonical generator's cold/warm synthetic New Session and Chat captures, committed its generated output, rebuilt, and reran the strict base comparison plus the six chunking tests. The generator updates the two sidebar owner paths and removes the retired controller host; no manifest entries were hand-edited. The generator retains JSON5 in its conservative cold/warm union; that generated membership was left intact. The explicit stable chunk preserves the lazy loading boundary independently of membership in the generic boot groups. The final measurements remain 340,058 B startup JS gzip, 1,645,110 B chat boot JS gzip, and 1,339,554 B new-session boot JS gzip, with 7/30/27 JS requests and one startup CSS request. Both local review passes are clean. Final-head ci:full run 38978074694 passed. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* perf(ui): keep JSON5 out of chat boot and tighten startup budget * build(ui): refresh measured boot module manifest
What Problem This Solves
Chat and new-session boot downloaded the JSON5 parser even though configuration parsing already has a lazy boundary. The build grouped JSON5 with Zod, which these routes need for snapshot validation.
User Impact
The measured chat boot preload graph shrinks by 7,294 B gzip and the new-session graph by 7,290 B, with the same request counts and CSS. JSON5 loads when a configuration consumer warms it, rather than through snapshot validation. Initial startup stays at 7 JavaScript requests and one CSS request. The startup ceiling is tightened from 374,285 B to 342,000 B, about 2 KB above the measured result.
Why This Change Was Made
Give JSON5 its own chunk so only consumers that warm the parser load it. Remove the obsolete Lit decorator chunk rule and replace its retired fixture with an emitted-import regression test. Regenerate the measured cold/warm boot manifest to pick up the two renamed sidebar owners and remove the retired controller host. Route ownership, parsing, and rendering behavior stay with their existing owners.
Evidence
Both production builds used the same machine, installed toolchain, fixed build identity, and the strict performance checker. Base:
9fa4e5618912d5f866670108214b5a5ca5e1fa3b.pnpm ui:build: base and final generated-manifest head pass.pnpm ui:boot-manifest:gen: cold/warm synthetic/newand/chatcaptures pass; generated manifest changes two owner paths and removes one retired host entry.ui:check-performancewith the base distribution: passes, zero violations.pnpm tsgo:ui: passes.No rendering or stylesheet changes; screenshots are not applicable. Final-head
ci:fullrun 38978074694 passed onf3c5571f81e7f81ad79b718bd40e4f75904ae5cd, including the full UI selection. The preceding head had the same optional-hover-runtime test failure as scheduled main; final-head CI is green, so no inherited-failure exception is needed.createEffect/createRenderEffectuntrackflush