Repository navigation
perf(ui): reduce Plugin and Advanced settings first-visit work - #189355
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. What this changesThis PR replaces decorative plugin chevron SVG subtrees with existing CSS masks and defers five unused config-field derivations. Example: Open Plugin Settings with 1,000 installed plugins.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a focused, maintainer-directed optimization with distinct value, and source review found no introduced correctness defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI receives plugin inventories and configuration schemas from existing owners, then renders searchable plugin rows and editable configuration fields. flowchart LR
A[Gateway inventory and config] --> B[Existing UI state owners]
B --> C[Plugin Settings inventory]
B --> D[Shared config renderer]
C --> E[Shared CSS icon masks]
D --> F[Lazy field derivations]
F --> G[Existing edit callbacks]
Technical reviewBest possible solution: Retain this small optimization using the existing icon and config-rendering owners, with its declared performance acceptance demonstrated before readiness. Do we have a high-confidence way to reproduce the issue? Current-main source shows eager derivations for inactive branches and per-row SVG construction; supplied diagnostics corroborate avoidable work, but no target code was executed during this read-only review. Is this the best way to solve the issue? The patch directly removes unnecessary rendering work while preserving existing mutation, draft, search, and sensitive-value owners; the simplification review found no unnecessary machinery or test scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 298b86c81fa0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +16. Total +16 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 31, 2026, 8:26 AM ET / 12:26 UTC. |
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. |
|
Merged via squash auto-merge.
|
What Problem This Solves
Plugin Settings and Advanced spend first-visit main-thread time constructing unused config projections and a reactive SVG subtree for each decorative inventory chevron.
User Impact
The complete inventory and config controls render with less work. Native Find, filtering, keyboard navigation, lazy routes, and editing behavior remain available. There are no new dependencies or state owners.
Why This Change Was Made
Use the existing CSS mask for the inventory's 14 px chevrons, removing 1,000 DOM nodes while retaining all 1,000 rows. Make five existing pure config-field memos lazy so inactive branches do not resolve metadata or sensitive-value presentation. The installed Solid contract recomputes these projections when next observed.
Evidence
240/240 qualification observations passed: 20 interleaved base/head/unchanged-base-control triplets for each page and viewport, Chromium 1×. Frozen base
447e14d02460342af4fe2c98dbd5475b15b938d2, exact headd674f799b9e21449bbfeb6d256738d231fd57b4e. Fixtures use 1,000 installed plugins and the full synthetic config schema. Local fixture transport measures renderer work, not production Gateway latency. Acceptance recorded before measurement: ≥5% owning CPU/latency win, no attributable regression beyond the timing band, and explicit remaining target gap. All timing cells below are median / p95, ms.Reproduction command (point the three bundle arguments at built base/head/base):
Plugin Settings total CPU improves 6.17% desktop / 5.60% mobile; Advanced script CPU improves 7.08% / 7.42%. Corresponding p95s improve. Host 1-minute load ranged 16.5–28.1; the unchanged third bundle records the A/A control under the same load.
Advanced desktop readiness p95 increases 9.37%, wall p95 4.37%. The readiness measurement includes two animation-frame probes. Its highest candidate sample takes 71.7 ms more wall time than its paired baseline while consuming 4.2 ms less renderer CPU; owning CPU, script and longest-task p95s improve. This is an elapsed scheduling tail under host load. No overall latency-win claim for this cell.
pnpm tsgo:uiconfig-form.browser.test.ts,plugins/settings-editor.browser.test.tsx,config-form-map-integrity.browser.test.tsgit diff --checkpnpm deadcode:knipRemaining target gap: both pages still exceed the 50 ms longest-task goal. The final mobile traced task is
BlinkScheduler_PerformMicrotaskCheckpoint: Advanced 112.93 ms, including 48.16 ms of config creation; Plugin Settings 90.55 ms, including 30.18 ms of inventory construction and 11.95 ms of artwork rendering (inclusive timings). Closed config details already defer their children; 303 rows / 437 controls are mounted, with only three controls beneath closed details. Further substantial slicing needs a deliberate initial-presentation/Find/focus contract rather than another speculative scheduler. Apps' measured task belongs to the excluded shared chat width-edge owner; no Apps code or performance claim is included.Mobile visit CLS is 0 in all qualification observations. Desktop ~0.01 remains the shared settings-sidebar width transition seen on base, head and control; no CLS repair is claimed here.
Qualification min–max ranges (ms)
Solid refactor audit: no new signals, effects, controllers, listeners, DOM queries, owner APIs, or cleanup. Pure lazy memos increase from 1 to 6. Reports and raw measurements remain artifact-only.
The four attached before/after mobile screenshots use synthetic fixtures, were inspected, and are byte-identical within each page pair. Plugin chevrons preserve size, color and layout; Advanced preserves presentation.