Repository navigation
improve: keep large automation searches responsive - #181599
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR prevents unchanged automation inventories from being sorted again during search updates and corrects the interaction benchmark’s Settings schema fixture. Example: Type “Warm automation 0499” with 500 jobs loaded while the first search request is held.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR removes measured rendering waste while preserving existing automation behavior, and no actionable defect was found; exact-head CI is still running. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Automations renderer consumes Gateway-owned job snapshots and optimistic presentation rows, renders keyed controls, and dispatches actions through the existing page owner. flowchart TD
A[Search input] --> B[Cron page owner]
B --> C[Gateway list requests]
C --> D[Accepted job inventory]
D --> E[Scoped presentation rows]
E --> F[Memoized keyed table]
F --> B
Technical reviewBest possible solution: Retain the narrow dependency boundaries and current-handler dispatch around the existing keyed projection and authoritative page owner. Do we have a high-confidence way to reproduce the issue? Current-main source exposes aggregate-prop invalidation inside the sort, and supplied browser comparisons isolate the unnecessary work with one held request; this review did not run a reproduction. Is this the best way to solve the issue? The patch is a small complete fix: equality boundaries stop unrelated publications, reactive row contents remain observable, and callbacks resolve current handlers without adding another state or request owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5be3a1b006e9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests +20, Other +16. Total +39 across 3 files. Added test files: 0. 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 23, 2026, 7:38 AM ET / 11:38 UTC. |
Wait for the admitted transcript bubble and remaining queue before checking their combined result. Empty composer state can publish before transcript presentation, as seen in the full UI E2E run.
|
Merged via squash.
|
* perf(ui): isolate automation rows from filter updates * test(ui): retain a valid schema in warm interaction fixtures * test(ui): await the admitted held-Enter turn Wait for the admitted transcript bubble and remaining queue before checking their combined result. Empty composer state can publish before transcript presentation, as seen in the full UI E2E run.
What Problem This Solves
Typing in Automations repeatedly sorts an unchanged retained inventory, including while its only list request is held. With 500 jobs, that work cost about 32 ms of the 75 ms of script time in the original desktop trace.
User Impact
Large automation searches use less main-thread time. The input, retained rows, loading state, row identity, current action handlers, and immediate live filtering keep their existing behavior.
Why This Change Was Made
Narrow the table's row source through two property memos and dispatch actions through current callbacks. A query or readiness publication no longer invalidates the 500-row projection. Cron's plain owner still admits requests and coalesces overlapping reads; no debounce delay or new cache is introduced. The faster typing burst also lets that existing coalescer absorb more edits.
The interaction runner now supplies a valid minimal config schema. Its previous generic empty response caused artificial schema retries on warm Settings navigation. Both Settings scenarios assert that the accepted schema is reused.
Evidence
Base:
f0f122ecfbb; head:bf7fc4b4e1b. Production builds, same Mac / Chromium 156, native clocks, synthetic Gateway with 1,000 sessions, 400-message transcripts, 1,000 models, and 500 jobs. Discovery traces include profiling overhead; the paired comparisons below are untraced CDP deltas. Task time includes browser automation work and wall time is automation-to-assertion, not INP.Acceptance: at least ten serial AB pairs per viewport; inspect script, task, wall, layout, style and request counts. Extend noisy cells by ten pairs; no real latency regression and no >20% regression. The second final-head build emitted the same JS/CSS asset names as the first candidate, so the initial and additional samples exercise the same renderer.
cron.listcallsAll 280 paired executions passed. Typing task p95 and script p95 improve on both viewports. The extra pairs resolve the initial >20% tail movements. Small upward tails remain: desktop typing layout +1.1 ms and style +1.7 ms, and desktop menu task +0.6 ms / wall +13.4 ms; their medians and overall typing latency support a net improvement, not a claim that every sample decreased.
pnpm tsgo:uiandpnpm tsgo:scripts: pass.view-reactivity.test.tsx: 7/7 pass, 2.09 s Vitest / 4.17 s wrapper wall. The new two-row work-count test fails on the base with three retained-state reads and passes with zero; existing tests retain current callbacks, access changes and row replacement.pnpm deadcode:knip, andgit diff --check: pass.pnpm ui:buildand strictpnpm ui:check-performanceon base and head: pass. Startup 294,946 → 294,955 B gzip (+9 B, below the 64 B build-variance allowance), 7 JS requests; CSS stays 41,623 B gzip / 1 request. No lazy boundary changes.Production LOC:
view-list.tsx492 → 495 (+3, the two dependency boundaries and their ownership comment). Test LOC: 180 → 200. Benchmark LOC: 557 → 573. Refactor census in the touched renderer:createMemo4 → 6;createProjection1 → 1; effects, cleanup hooks, untrack, direct listeners, DOM queries, manual imports and owner escape APIs stay at zero.Updated discovery ranking
Single profiled sample per viewport on the final renderer; these task times rank follow-up inspection, not statistical latency claims. All 12 scenarios passed. Settings now makes zero warm schema reads.
Rerunnable comparison:
Synthetic before / after
The retained-results state has the same controls, layout, and visible rows.
Full-CI repair
Run 39945773956 found one failing test:
Control UI chat attachment read lifecycle > admits 1 turn(s) from held Enter during terminal history (attachment=true). The follow-up send was admitted, but the test sampled an empty transcript/queue after only waiting for the cleared composer. Draft retirement can render before the admitted transcript bubble.The test now crosses a committed render boundary with that bubble's exact message ID/content and expected remaining queue count present, then retains every existing payload, count, visibility, unique-ID and duplicate-send assertion. No chat production behavior changed. The untouched merge-base test passed once locally, so this failure is not claimed as inherited. All four held/repressed Enter cases pass with the correction (7.42 s test execution, 74.95 s including the isolated production build), as do UI typecheck, targeted formatting/lint and independent patch review. Replacement-head full CI 39948239887 passed: 48 jobs succeeded and 24 were skipped; the measured production renderer is unchanged from
0b3c6c44981.The affected E2E file is 1,020 → 1,029 lines (+9). Total scoped test LOC is 1,200 → 1,229; production renderer LOC remains 492 → 495 and benchmark LOC 557 → 573.