Skip to content

improve: keep large automation searches responsive - #181599

Merged
steipete merged 3 commits into
mainfrom
solid2/w-perf-interaction-3
Oct 23, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-perf-interaction-3

Conversation

@steipete

@steipete steipete commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

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.

Interaction Pairs / viewport Script median, ms Task median, ms Task p95, ms Median cron.list calls
Typing, desktop 20 87.4 → 54.6 265.5 → 179.2 293.3 → 253.7 5 → 2
Typing, mobile 20 88.3 → 57.1 258.9 → 181.7 300.5 → 248.7 5 → 2
Typing with held read, desktop 10 78.8 → 36.4 253.7 → 165.4 327.8 → 202.8 1 → 1
Typing with held read, mobile 10 73.9 → 36.3 215.9 → 146.4 228.0 → 163.3 1 → 1
Paste, desktop 20 21.2 → 19.0 67.5 → 59.0 79.0 → 77.5 1 → 1
Paste, mobile 20 21.1 → 19.0 58.3 → 57.0 69.7 → 62.6 1 → 1
Row menu, desktop 20 12.6 → 12.7 131.1 → 132.3 139.2 → 139.8 0 → 0
Row menu, mobile 20 12.3 → 12.6 121.4 → 119.2 137.2 → 134.2 0 → 0

All 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:ui and pnpm 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.
  • Targeted Oxfmt/Oxlint, controller guard, production pnpm deadcode:knip, and git diff --check: pass.
  • pnpm ui:build and strict pnpm ui:check-performance on 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.
  • Independent autoreview: no actionable P0–P2 findings. Simplification pass retains one row projection and the existing owner; no compatibility path or extra state owner.

Production LOC: view-list.tsx 492 → 495 (+3, the two dependency boundaries and their ownership comment). Test LOC: 180 → 200. Benchmark LOC: 557 → 573. Refactor census in the touched renderer: createMemo 4 → 6; createProjection 1 → 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.

Interaction Desktop task / script, ms Mobile task / script, ms Interval RPCs (desktop / mobile)
cron-search-typing 264.8 / 64.7 240.1 / 62.4 cron.list ×4 / cron.list ×3
settings-sections 117.1 / 37.1 224.9 / 49.2 last-heartbeat ×1 / last-heartbeat ×1
cron-search-typing-pending 185.9 / 39.3 162.6 / 35.6 cron.list ×1 / cron.list ×1
session-palette-filter 151.6 / 82.9 149.9 / 87.6 system.info ×1, environments.list ×1, models.list ×1, sessions.search ×1, sessions.list ×1 / system.info ×1, environments.list ×1, models.list ×1, sessions.search ×1, sessions.list ×1
settings-open 119.1 / 41.4 105.3 / 39.7 none / none
model-picker-open-search 94.9 / 48.9 93.8 / 50.4 none / none

Rerunnable comparison:

node --import ./scripts/tsx.mjs scripts/bench-control-ui-interactions.ts \
  --bundle-dir <base-dist> --compare-bundle-dir <head-dist> \
  --steps cron-search-typing-pending,cron-menu-open,cron-search,cron-search-typing \
  --pairs 10 --output <artifact-directory>

Synthetic before / after

The retained-results state has the same controls, layout, and visible rows.

Desktop before Desktop after
Desktop before Desktop after
Mobile before Mobile after
Mobile before Mobile after

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.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-23T11:44:51.388155Z bf7fc4b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: S labels Oct 23, 2026
@steipete
steipete enabled auto-merge (squash) October 23, 2026 11:30
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Unchanged retained jobs are repeatedly sorted; reported desktop median script time is 78.8 ms.
  • After: Unchanged inventory avoids repeated sorting; reported desktop median script time is 36.4 ms, with the same 500 retained rows and one request.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused owner-aligned optimization with production-browser comparisons, meaningful regression coverage, and no identified correctness or security defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The changed JobsTable renderer was exercised through production browser builds on macOS Chromium 156 with a synthetic Gateway and 500 jobs on desktop and mobile; supplied CDP results cover held-read typing, completed filtering, paste, and menu opening, while inspected screenshots confirm retained-layout parity.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Searching a large automation inventory spends unnecessary main-thread time sorting unchanged retained jobs.
Reason: The existing feature owner proposes a measured improvement that preserves immediate filtering, loading feedback, keyed rows, and action ownership.

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
Reviewed head: 0b3c6c449814bd7d07ec220dc8b0d63f4656f4cd

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Cron row dependency isolation keeps the original intent (7da1aa2: Isolate unchanged row controls from aggregate pending-filter publications while retaining current callbacks and authority.)
  • Keyed optimistic row projection keeps the original intent (60f9f3a: Separate readiness from synchronous optimistic rows while keeping admission, scope, and write settlement with plain owners.)
  • Warm interaction fixtures keeps the original intent (fdf6d47: Provide repeatable production-renderer measurements with explicit visible outcomes and request counts; the typed schema response corrects artificial fixture retries.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7da1aa2 adds ui/src/pages/cron/view-list.tsx:271 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7da1aa2fcea5; files: ui/src/pages/cron/view-list.tsx)
  • Mitchell Etzel: Raw commit c5978bf adds ui/src/pages/cron/view-list.tsx:101 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c5978bfcb57e; files: ui/src/pages/cron/view-list.tsx)

PR surface

Source +3, Tests +20, Other +16. Total +39 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 10 7 +3
Tests 1 20 0 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 19 3 +16
Total 3 49 10 +39

Review metrics

Metric Value Why it matters
Production versus test growth Renderer +3 net lines; regression tests +20 net lines. The small renderer increase establishes dependency boundaries, and the focused regression detects repeated inventory work while checking retained identity and current callback dispatch.

Labels

Label changes:

  • add P2: Measured search responsiveness improvement for large automation inventories, with limited scope and preserved behavior.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Measured search responsiveness improvement for large automation inventories, with limited scope and preserved behavior.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

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.
@steipete
steipete disabled auto-merge October 23, 2026 11:44
@steipete
steipete merged commit 0d1d261 into main Oct 23, 2026
127 of 129 checks passed
@steipete
steipete deleted the solid2/w-perf-interaction-3 branch October 23, 2026 12:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 24, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant