Skip to content

fix(ui): preserve automation creation across navigation - #169698

Merged
steipete merged 1 commit into
mainfrom
codex/qa1057-cron-create-route
Oct 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa1057-cron-create-route

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Focused create/edit/lifecycle/conflict proof: 74 tests passed across four files (20.242 seconds wall).
  • Changed rendered-page file: 28 tests passed with Node (18.715 seconds wall) and pinned CI Bun (7.719 seconds wall), using the repository test wrapper and --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).
  • UI production and owning test types, changed-file lint/format/style checks, line-count and assertion/lifecycle ratchets passed. Fresh independent P2 review found no actionable findings.
  • Browser before/after runs took 19.569/21.611 seconds. These are synthetic mocked-Gateway captures, not live-provider proof. An initial capture failed only because the screenshot viewport clipped its title; capture geometry was corrected before taking these images.

Before: Garden B is selected, but its form is cleared and Garden A is never run.

Before: pending creation clears the replacement automation editor

After: Garden B retains its form and Garden A's requested run is queued.

After: replacement editor survives and the submitted automation runs

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.
@clawsweeper

clawsweeper Bot commented Oct 12, 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.

@steipete
steipete marked this pull request as ready for review October 12, 2026 07:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

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

  • Before: Garden B's form is cleared and Garden A's requested run is skipped.
  • After: Garden B retains its form and history selection, while Garden A receives its forced run.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused repair with inspected browser evidence, meaningful rendered regressions, unchanged serialization and persistence contracts, and a successful CI gate for the reviewed head.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chromium screenshots through the actual Control UI with a mocked Gateway show Garden B's editor preserved and Garden A's requested run acknowledged; this proves the changed UI lifecycle, without claiming live-provider execution.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Navigating to another automation during creation clears its editor, leaks creation errors into it, or silently skips the submitted immediate run.
Reason: Restores documented mutation ownership and accepted execution intent through existing owners, with demonstrated user-visible benefit and no new product surface.

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
Reviewed head: fa6750fee88d6ca765f48a71977505ebc81bfaab

Before merge

None.

Findings

None.

Agent review details

How this fits together

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

Technical review

Best 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

  • Submitted editor ownership keeps the original intent (fix(ui): preserve automation selection when an earlier save finishes #150129: An earlier edit completion must not replace a newer editor or publish errors into it.)
  • Accepted create-and-run lifecycle keeps the original intent (407a8f4: Page replacement retires refresh work without cancelling an already accepted create-and-run action.)
  • Payload serialization relocation keeps the original intent (318dd50: Preserve public clone payload options while updates leave existing Gateway authority intact; the moved builder retains these semantics.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +20, Tests +49, Docs 0. Total +69 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 79 59 +20
Tests 1 102 53 +49
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 182 113 +69

Labels

Label changes:

  • add P2: Repairs editor corruption and a skipped requested run when navigation occurs during automation creation, with a limited workflow-specific blast radius.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • 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: Repairs editor corruption and a skipped requested run when navigation occurs during automation creation, with a limited workflow-specific blast radius.
  • 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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 12, 2026, 3:21 AM ET / 07:21 UTC.

@steipete
steipete merged commit 9c54108 into main Oct 12, 2026
159 of 162 checks passed
@steipete
steipete deleted the codex/qa1057-cron-create-route branch October 12, 2026 07:25
@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 13, 2026
)

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.
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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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