Repository navigation
fix(ui): keep automation history on the selected task - #147399
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. Reviewed September 13, 2026, 4:53 PM ET / 20:53 UTC. ClawSweeper reviewWhat this changesThe PR makes automation history refresh from the currently selected task, updates all callers, adds delayed-run regression coverage, and documents the behavior. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix for a selection race present on current main. The browser evidence supports the intended result, and no introduced correctness or security defects were found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI’s Automations page sends run requests and reads history from the Gateway. Its history controller combines the current task selection and filters, then publishes only responses that still match that view. flowchart TD
A[Task selection and filters] --> C[History controller]
B[Run acknowledgement or refresh event] --> C
C --> D[Gateway history request]
D --> E{Still the current request?}
E -->|Yes| F[Selected task history]
E -->|No| G[Discard stale response]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -4, Tests +114, Docs 0. Total +110 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep task selection authoritative for every history refresh while preserving the existing stale-response and pagination guards. Do we have a high-confidence way to reproduce the issue? Yes: run Alpha, select Beta before Alpha’s acknowledgement arrives, and delay Beta’s first history response. Current-main source establishes the stale-target request replacing the active read; supplied browser captures corroborate the visible failure, but this review did not execute it. Is this the best way to solve the issue? Yes. Removing the redundant caller-supplied identity repairs the existing history owner directly and prevents mutation completions from competing with current selection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dab1f08376ca. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Running one automation and selecting another before the run request finishes can replace the selected task’s history with the earlier task’s history.
User Impact
Run history stays attached to the selected task while earlier run requests finish. Normal run acknowledgements, filters, pagination, overview history and active refreshes retain their behavior.
Why This Change Was Made
The run-history owner accepted a second job identity from callers in addition to the current selection. A delayed mutation could therefore start a request for an obsolete target and invalidate the correct pending read. Remove that redundant argument and derive history identity from the current view state. All callers use the same owner; production changes by +16/−20, net −4 lines. No Gateway, scheduler, stored-data, configuration or protocol contract changes.
Evidence
All 279 focused tests pass. Paired Chromium scenarios reproduced both delayed queued-run and invalid-spec failures on the baseline; the candidate passed those cases and both settled-read controls. The built Control UI used the existing mock Gateway with synthetic data. Screenshots and finalized recordings were inspected; this is browser boundary proof, not a live Gateway or provider run.
The normal changed gate passed 18 stages, then lint found two missing test braces. Only those braces changed. The final mounted suite passed 33/33; formatting, targeted lint and the remaining UI styles check passed. Passed types and guards were reused as a documented composite. Fresh final-byte P0–P2 review found no actionable findings. No full core build was needed or run.
Validation was performed on
ec049f94608c606780b845e83b3838d74cc5aa3bplus this patch. All cron owner, view, test and feature-reference files remain byte-identical on comparison maind534c3153d3460ebb1d7e2f2d7876617643db7de. Exact-head CI and the required gate passed. An additional independent review of the complete owners and callers found no actionable P0–P2 issues.