Repository navigation
perf(ui): reduce warm model and automation interaction work - #180889
Conversation
Measure desktop and mobile warm interactions with production bundles, synthetic fixtures, explicit trace intervals, and interleaved comparisons. Stop unchanged model search facts at row memos and defer hidden automation menu items through the existing lazy contract. Preserve report-only E2E probes and startup budgets.
|
🦞👀 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 changes before merge. What this changesThis PR memoizes model-picker presentation values, defers automation menu items until first open, and adds a repeatable interaction benchmark. Example: Open Automations with 500 loaded jobs.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR provides measured renderer improvements worth retaining, but its lazy-menu change breaks an existing Cron page test and needs a focused test repair. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe Control UI renders model catalogs and automation inventories supplied by existing owners; these changes reduce presentation work while preserving selection and action callbacks. flowchart LR
A[Catalog and automation owners] --> B[Control UI projections]
B --> C[Model row memos]
B --> D[Lazy job menus]
C --> E[Browser interactions]
D --> E
F[Production bundle benchmark] --> E
Technical reviewBest possible solution: Keep the existing presentation optimizations and update the Cron page test to open the menu before asserting that Remove is enabled. Do we have a high-confidence way to reproduce the issue? The supplied CI failure and source establish the failing test path: Remove is queried before lazy menu construction; no target code was executed during this review. Is this the best way to solve the issue? The runtime changes use the existing search and menu owners without adding competing state; the smallest complete repair is to adapt the remaining test consumer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ce9941f4db62. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +6, Tests +151, Docs +34, Other +1195. Total +1386 across 10 files. Added test files: 1. View PR surface stats
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 October 22, 2026, 2:53 PM ET / 18:53 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
|
Fixed by #181034, merged as ec3e103. The recap owner could discard its watched run when a delayed active-session row had no run ID after local completion. Later terminal metadata then could not publish the recap. The fix preserves the watched run through anonymous activity while still resetting for a genuine new input or identified replacement run. Matched Linux real-Gateway loops reproduced the exact timeout on base (1/50 failures) and passed with the fix (0/50); a mounted-pane regression is red before and green after. No test deadline was increased. The repair is on main for your next rebase. |
…#180889) * perf(ui): reduce warm model and automation interaction work Measure desktop and mobile warm interactions with production bundles, synthetic fixtures, explicit trace intervals, and interleaved comparisons. Stop unchanged model search facts at row memos and defer hidden automation menu items through the existing lazy contract. Preserve report-only E2E probes and startup budgets. * test(ui): open lazy cron menu before querying actions
What Problem This Solves
Large model catalogs and expanded automation inventories do unnecessary work during warm interactions. A production-renderer audit identifies the costs and removes two measured sources of waste.
User Impact
The 1,000-model picker uses about one-third less script time. Filtering 500 loaded automation jobs uses 42–44% less script time for a single pasted query. Existing routes, selectors, keyboard behavior, action authority, and visible layout stay intact. No configuration or migration is required.
Why This Change Was Made
Model search invalidated every option binding even when its scalar presentation facts were unchanged. Scoped Solid memos now stop those unchanged values at the row. Automation rows mounted three hidden menu items apiece; the existing
Menu lazycontract removes 1,500 hidden items and 3,000 DOM nodes until a menu is opened. First-open menu behavior is covered separately.The first typing comparison exposed variable request coalescing: desktop median intermediate
cron.listcalls rose from 13.5 to 16.5; mobile 15 to 15.5. That burst comparison was rejected as unequal work. The accepted filter comparison uses one pasted query, asserts exactly one request, and preservescron-search-typingas a separate diagnostic. No request/admission policy changed. This is a synthetic renderer measurement, not a live-Gateway or provider claim.Evidence
Acceptance recorded in the benchmark manifest before sampling: ten serial interleaved AB pairs per fixed step and viewport; inspect median, p95, min and max of script/task/layout/style/automation wall time; any >20% regression stops acceptance. Compare boot surfaces on the same machine with at most 64 B variance. No timing gates were added.
Ranked baseline census
Fixture correction (follow-up audit): the initial catch-all
sessions.listfixture returned all 1,000 ordinary chats tohasBoard: truedashboard requests. This created 1,000 bogus Pages links and inflated the route-opening rows below. Those Sessions/Cron opening figures are superseded and are not production optimization claims. A corrected diagnostic reusescreateTeamScaleSidebarListOwner, honors filtering/pagination, and loads the sidebar roster through its real Load more control. Sessions/Cron opening then shows no long tasks. The accepted model-picker and single-query Cron comparisons remain valid paired measurements; the corrected full census will accompany the next interaction PR.Host: macOS arm64, 32 logical CPUs; Chromium 156.0.8078.4; desktop 1440 × 1000 and mobile 390 × 844. The two untraced AB runs began at 1-minute system load 24.2 and 28.0; this shared machine was not idle. Samples ran serially and interleaved to limit drift.
One traced sample per cell, ranked by renderer busy time. Trace and 1 ms CPU-profiler overhead is included; nested script/layout/style intervals overlap and must not be added together. All 28 cells passed their visible outcomes. Sessions sorts/searches a 1,000-row result through the supported 100-row page. The sidebar has no text input, so the command palette supplies the session text-search scenario. Mobile uses the native drawer.
Accepted paired results
Each cell has ten base and ten head samples. Values are median / p95 / min–max, in milliseconds. All 120 time-statistic comparisons satisfy the 20% rule. Model/menu steps make no interval RPCs; every accepted Cron filter sample makes exactly one
cron.listrequest.All remaining timing distributions
taskMs
layoutMs
styleMs
wallMs
Twelve final before/after diagnostic captures passed, with source-mapped traces, CPU profiles, screenshots, status, errors, and request counts; all eligible application frames mapped (zero unmapped). Native clocks/animations are retained. Automation-to-assertion wall time is not INP. The rejected burst samples and failed setup attempts remain separate from accepted samples.
Boot budgets
Seven startup JS requests and one startup CSS request on both builds; strict performance check passed on both. Base is
0e89b35a8a6. Saved immutable bundles were compared on the same host.Reproduce
Existing model-controls and Cron-search E2E files gain report-only measurements; their behavior and structural assertions remain. Full UI coverage is selected with
ci:full; no local E2E suite was run.Validation and scope
UI, script, and tooling-test typechecks pass. Focused unit coverage: 11 model-picker tests, five Cron row/action tests, and two trace interval/profile tests. Format and diff checks pass. Independent review found no actionable P0–P2 issues. Targeted lint, production Knip, and the Solid controller guard pass. Initial lint found missing braces and Promise executor expression bodies; the mechanical fixes pass the targeted rerun. Native PR preparation follows on the committed head.
Production changes total 416 → 422 LOC (+6): model options 270 → 275; Cron controls 146 → 147. The added tooling is the bounded 14-scenario workload, interval/source-map integration, and report generation; it adds no runtime import. The three benchmark/tooling files total 1,195 new LOC, and their interval/profile test adds 106 LOC; the existing E2E probes add 43 net LOC. No new controller, effect, listener, cleanup, owner API, or synchronized state copy was added. Existing owners and lazy boundaries stay in place. The simplification pass retained only the two demonstrated fixes, their report-only probes, and the requested rerunnable census; further catalog preparation and sidebar geometry work is deferred pending its own paired evidence.
CI follow-through
Initial run
39832936432found a Cron test that queried the newly lazy menu before opening it. The repair opens the menu first without changing assertions; all 28cron-page.test.tstests pass, and independent review is clean. Initial catalog and delegated-task failures pass in the replacement run after intervening main fixes.Replacement run
39836547701at6a9c9150986completed with 47 successful jobs. Its sole test failure ischat-managed-media-order.real-gateway.e2e.test.ts > keeps headings, managed images and trailing prose ordered live and after reload without duplicates, at line 583 waiting for the terminal recap. The preceding image-order, history, and decode assertions pass. The exact CI baselinedf27c0c72d6passes this test on macOS (Node 26 and Node 24.22.1 withCI=1) and isolated Linux arm64 (Node 24.22.1 withCI=1). The exact CI-tested merge7c6d56dcfe6also passes in the same Linux container after rebuilding its runtime and UI. These passing reproductions do not establish a fix. Scheduled main run 39840622841, job 120040628480 passes the identical named test atdfe0396d257; the test file is byte-identical to the CI baseline. The failure is not attributed as inherited. After the exact baseline, exact tested merge, and scheduled-main passes above, the coordinator authorized one rerun of only the failed job. Run39836547701attempt 2, replacement job120053465496, is still in progress as of 20:15 UTC on October 22. No second rerun has been requested. Auto-merge was explicitly cancelled before the repair push; no inherited-failure override or renewed auto-merge request has been submitted. Native recovery will use the reviewed replacement head once current CI permits it.Screenshots
Synthetic data only; inspected locally. Each pair preserves visible layout and actions.
Authorized retry and infrastructure exception
Run 39836547701 attempt 2, job 120053465496: the previously failing managed-media test passed (28.6 s), and all 20 executed real-Gateway shard tests passed (17 files; 3 intentional skips). The job remains red solely because its preceding desktop-resize provisioning step hit the 300 s apt-install timeout before desktop assertions ran. The job log pins checkout 7c6d56dcfe6d13672c9acded892a176c6a1f7318, whose main parent is df27c0c. The provisioning script and CI workflow are unchanged between those revisions.
Native admin recovery is requested for this identified infrastructure failure; the failed job and aggregate 120066802156 are retained as failed, not reported green. No second retry is requested, and no source/test change was needed for the recap path. All other selected CI jobs and security-fast succeeded.