Repository navigation
fix(ui): preserve automation creation across navigation - #169698
Conversation
Keep a pending create scoped to its submitted editor while preserving the accepted Create & run now intent. A replacement automation editor keeps its form, error state, and selected history when the earlier create settles.
|
🦞👀 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 changesPreserves the selected automation editor when an earlier creation settles and retains its requested Create & run now action. Example: Submit Garden A with Create & run now, then use browser Back to select Garden B before creation finishes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current automation creation bug with focused changes and convincing browser evidence; no actionable introduced defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI automation controller submits form data through cron RPCs and publishes completion feedback into the currently owned editor and history view. flowchart TD
A[Automation form] --> B[Cron page controller]
B --> C[Cron mutation owner]
C --> D[Gateway cron RPCs]
D --> C
C --> E[Submitted form ownership check]
E --> F[Current editor and history]
B --> D
Technical reviewBest possible solution: Retain this focused ownership repair and the rendered regressions without expanding it into cross-page draft persistence. Do we have a high-confidence way to reproduce the issue? Current-main source exposes both failure paths directly, and the supplied before screenshot corroborates the cleared replacement editor; no target code was executed during this review. Is this the best way to solve the issue? The repair applies the existing edit-save ownership pattern to creation, keeps accepted run intent separate from later selection, and moves the payload builder without changing its executable behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d9e7692ad11d. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +20, Tests +49, Docs 0. Total +69 across 5 files. Added test files: 0. View PR surface stats
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 12, 2026, 3:21 AM ET / 07:21 UTC. |
|
Merged via squash.
|
What Problem This Solves
Fixes an automation editor being cleared, and Create & run now silently losing its run, when browser navigation selects another automation before creation finishes. A failed creation could also show its error in the newly selected editor.
User Impact
Users can navigate while an automation is being created: the newly selected automation keeps its form and history, and an accepted Create & run now still starts the automation that was submitted. No configuration or migration is required.
Why This Change Was Made
Create completion now checks ownership of the submitted form before resetting it or reporting an error. The page keeps the original create-and-run intent separate from the editor selected later. The existing payload builder moves unchanged into the payload module to keep the cron state module within its line-count budget.
Evidence
The rendered regression fails against the original implementation in both replacement-editor cases (accepted and rejected creation), then passes with the fix. An isolated Playwright browser reproduced browser Back selecting Garden B while Garden A's create was pending; the fixed flow preserves Garden B and sends exactly one forced run for Garden A.
--maxWorkers=1. The three added table cases cost 239 ms combined on Node and 153 ms on Bun; CI run 38215867322 passed: the changed file took 10.285 seconds of test execution, and the three added cases took 959 ms combined (366/331/262 ms).Before: Garden B is selected, but its form is cleared and Garden A is never run.
After: Garden B retains its form and Garden A's requested run is queued.