Repository navigation
improve(ui): defer native plugin rendering until activation - #138447
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 September 4, 2026, 2:45 PM ET / 18:45 UTC. ClawSweeper reviewWhat this changesThis PR defers native plugin contribution rendering until plugin activation while retaining the eager recovery control and adding browser and fixture coverage. Merge readiness✅ Ready for maintainer review Keep open. The active maintainer-owned PR cleanly relocates native contribution rendering to the existing activation boundary; current main still defines it eagerly, and the reviewed browser regression covers deferred definition, preserved layout, and post-activation navigation. Priority: P3 Review scores
Verification
How this fits togetherControl UI starts with recovery controls and contribution host elements, then its plugin runtime fetches the Gateway catalog and activates native plugin modules. Activated plugins register navigation, actions, and accessory content that the contribution elements render. flowchart LR
A[Control UI startup] --> B[Recovery controls]
A --> C[Contribution hosts]
D[Gateway plugin catalog] --> E[Plugin activation]
E --> F[Native UI runtime]
F --> G[Plugin navigation and actions]
C --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +15. Total +22 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the eager recovery manager and the CSS layout invariant, while loading the unchanged contribution renderer only through native plugin activation. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a loading-boundary optimization rather than a report of broken existing behavior. The supplied browser regression directly exercises the relevant pre- and post-activation states. Is this the best way to solve the issue? Yes. The existing activation loader is the owner of native renderer registration; keeping the contribution element eager would defeat the stated startup-size objective, while the recovery manager remains eager. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 26f87a37009b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…#138447) * perf(ui): defer native plugin contribution rendering * test(ui): load the active plugin renderer in sidebar fixtures
Native plugin contribution rendering was bundled into startup alongside the Customize UI recovery control, even when no native plugins were loaded. Load that unchanged renderer through the existing plugin activation runtime, while keeping recovery available for catalog, authentication, and asset-loading failures. Preserve empty contribution hosts as
display: contentsbefore their custom element upgrades.This reduces measured startup JavaScript from 350,378 to 348,491 bytes gzip, with the same eight startup requests and no budget increase. The current ceiling is 350,141 bytes. Regenerate the boot manifest through its ready
/newand/chatbrowser captures, including the source moves those captures now observe.Validation: the original budget check fails on the clean base and passes with this change. All seven bundled Chromium plugin lifecycle/recovery cases and 24 owner tests pass. The held-catalog regression proves contribution rendering stays deferred while recovery remains defined, and that navigation appears after activation; it also checks the host layout before definition. Existing coverage exercises failed initialization, reload recovery, hung peers, retained actions, session scoping, and chat admission. The full changed-file gate passes (core/UI types, i18n, lint, styles, dead exports, and policy checks), and independent review found no actionable P0–P2 findings. The renderer class body is unchanged. Production delta is +3 lines after moving the class, including the five-line eager layout rule; tests add 14 lines plus one test-support import, and generated manifest changes are separate.
Before and after use synthetic fixtures and show the same ready plugin page:
The pinned-navigation sidebar fixture injects active registrations directly, so it now explicitly loads the real view runtime. Its assertions are unchanged. All 333 sidebar tests pass under both CI configurations; the first hosted attempt exposed this missing fixture dependency in two jobs. Production and the browser captures remain unchanged. The final changed-file gate and independent P0–P2 review pass.