Repository navigation
perf(control-ui): remove extra cold-load placeholder stages - #170358
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 renders the cached grouped sidebar eagerly, removes an intermediate inline-widget shimmer, and preserves focus already chosen inside the filter panel. Example: Reload a dashboard with a cached grouped sidebar and 12 inline widgets.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR makes a focused, visually demonstrated improvement that current main lacks, with no actionable correctness or security findings; CI remains in progress. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI combines cached sidebar projections and asynchronous Gateway document responses into navigation rows and sandboxed inline widgets. flowchart TD
A[Dashboard reload] --> B[Sidebar snapshot owner]
B --> C[Sidebar and roster renderer]
A --> D[Reserved widget space]
E[Gateway document response] --> F[Canvas widget view]
D --> F
F --> G[Sandboxed widget content]
Technical reviewBest possible solution: Land the focused presentation simplification after the normal repository gates pass. Do we have a high-confidence way to reproduce the issue? Current-main source exposes both intermediate stages, and the inspected baseline filmstrip illustrates them; no target code was executed during this review. Is this the best way to solve the issue? Removing the deferred renderer at its existing owner and preserving widget geometry directly addresses the extra stages with less production code and no parallel implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6315f8adc18a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -7, Tests +73. Total +66 across 6 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed October 12, 2026, 7:23 PM ET / 23:23 UTC (Revision 2). |
Paint cached agent rosters with the sidebar module and keep reserved inline widget space unchanged until its document arrives. Remove the deferred roster loader and transient widget shimmer.
576c8f4 to
640e401
Compare
…#170358) Team-scale fixture: median visual change groups 5->3, CLS unchanged, boot JS requests 47->45, production -7 LOC. The agent roster renderer ships with the sidebar instead of an idle import (no empty-sidebar stage), canvas widget placeholders keep their reserved box without the shimmer skeleton, and the session filter popover no longer steals focus on late repositioning. Admin-merged over an inherited UI e2e failure: new-session-page.cloud-startup-failure.e2e.test.ts reproduces on main's UI source (evidence in the PR body). Full UI suite waived while remote capacity is blocked; 20 affected e2e tests pass locally.
What Problem This Solves
A signed-in dashboard deep-link reload can have cached sidebar data ready while its roster renderer is still loading. Inline widgets also add a late shimmer after their space has already been reserved. Both add avoidable presentation stages. Earlier campaign evidence recorded 14 states over about 15 seconds for a signed-in reload of a dashboard deep link.
User Impact
Reloads paint the cached grouped sidebar with the shell, and inline widgets fill their reserved space directly. Slow or failed document loads retain their existing notices.
Why This Change Was Made
The roster renderer now loads with its sidebar owner. Its nullable renderer, deferred import controller, restore-time load, empty-render guards and follow-up repaint are deleted. Inline widgets keep their reserved empty space and accessible loading status until their document arrives; delayed connection and error notices remain. The boot manifest is regenerated.
The first CI run exposed a focus ordering issue after eager roster paint: the filter popover's late initial-focus callback could close an already-open Sort submenu. The popover now preserves focus already inside its panel. Its focused regression fails against the old handler and passes after the fix.
Production delta, including the generated manifest and excluding tests/docs: +19 / −26 = −7 lines. No config option, server schema, or browser storage shape changes.
Evidence
Final comparison rebased onto main
0d1e09b79132; candidate640e401ece0f3da51dd903b665485b24324ac0d7. The refreshed comparison includes the overlay work merged during this lane.Synthetic Team-scale fixture: 300 sessions, 30 off-page pins, 120 people, six agents/plugins, 240 messages, 12 inline widgets; 35 ms RPC latency, 4 ms frame spacing, 1719×1179 viewport. Production UI builds ran sequentially.
The analyzer is unchanged: ≥32 RGB change on ≥0.4% of 344×236 sampled pixels, with a new group after a 100 ms gap. Counts include clearing the old document. Host contention makes timings and grouping noisy; no wall-clock speedup or CLS reduction is claimed. The earlier pre-rebase comparison was 4→3 median groups with the same median CLS.
Representative visual groups and attribution
After: document clear at 299 ms; cached shell, sidebar and metadata at 1,131–1,215 ms; real inline content at 1,515 ms. Small avatar/facepile changes and the later board frame can remain below the aggregate threshold. The group count does not claim that every first-paint pixel is settled.
Validation
Focused tests and affected e2e files run individually with
--maxWorkers=1. The sidebar regression fails on the original renderer code. The popover regression fails on the original focus handler.640e401ece0f3da51dd903b665485b24324ac0d7. All selected checks pass exceptchecks-ui-e2e (2/9)and its aggregate gate. The initial PR-context template issue was corrected.Inherited e2e failure: independently reproduced on main UI
Failing job: three cases in
new-session-page.cloud-startup-failure.e2e.test.ts. Two disconnected-startup cases expect the unresolved-message notice but see the ordinary outbox count. The cold-scope case expects a recovery notice but receives null. The shard otherwise passes 88 files / 384 tests.A local replay with all four lane production changes removed reproduces exactly those same three failures, with the other five cases passing: 78.59 s wrapper wall, 72.19 s Vitest duration. The tested UI source matches current main
6315f8adc18ab275a4c933c497113a65bc3f783b; no UI files changed between the PR base and that main revision. The lane source was restored afterward. No CI rerun was requested. These recovery failures are outside the visual-load change.Commands use
node scripts/run-vitest.mjs <file> --maxWorkers=1, equivalent to the focusedpnpm test <file> --maxWorkers=1invocation; e2e usestest/vitest/vitest.ui-e2e.config.ts.No Testbox lease/ID: remote capacity is blocked. The full UI suite is waived by campaign policy; selected CI shards and focused local files provide the landing proof. No Gateway or real account was used. Captures below are inspected synthetic fixtures only.
Remaining work for the lead: combine with L20 and measure smaller metadata/avatar and embedded-document stages separately.