Repository navigation
fix(ui): prevent automation draft loss when switching pages - #150325
vyctorbrzezowski wants to merge 2 commits into
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: blocked before merge. Reviewed October 5, 2026, 11:56 PM ET / October 6, 2026, 03:56 UTC (Revision 6). ClawSweeper reviewWhat this changesThe PR retains new automation drafts, clone definitions, and pending creation submissions across Control UI navigation, with browser coverage and documentation. Merge readiness⛔ Blocked before merge - 3 items remain Keep open: current main still lacks creation-draft retention across page navigation, and this maintainer-owned PR remains a useful implementation candidate. The previously reported P3 test-settlement concern remains unresolved. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI Automations page turns authored forms into Gateway scheduler requests. The new in-memory owner preserves creation inputs and accepted submissions while each mounted page refreshes its own inventory and request state. flowchart TD
A[New automation or clone] --> B[Scoped creation draft]
C[Page navigation] --> D[Fresh automation page]
B --> D
E[Scope change or explicit discard] --> B
D --> F[Submit creation]
F --> G[Gateway scheduler]
G --> B
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +246, Tests +524, Docs +1. Total +771 across 9 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep creation inputs and accepted submissions under one scoped in-memory owner, while preserving current-main editor and recipient-discovery lifecycles. Do we have a high-confidence way to reproduce the issue? Yes, source supports the navigation path: current main initializes creation state on each page instance, while the linked issue records real original-Gateway reproduction. This review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes, separating creation lifetime from page inventory is a focused repair that preserves clone precision and pending admission; current-main integration still needs validation. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4308a8fb8d92. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Refresh main to resolve the independent automation editor-clearance import conflict while retaining published contributor ancestry. Use the existing shared production-bundle E2E owner instead of a redundant cold Vite server; assertions and deadlines are unchanged. Co-authored-by: vyctorbrzezowski <[email protected]>
September 21 final-review preparation — still draft, no landRefreshed candidate: Actual Chromium production-UI capture with a mocked Gateway, light theme, 1280 × 900. Both images show the editor after Automations → Usage → Automations. Before — reused inspected original-base capture at After — fresh September 21 production-bundle capture of candidate Remote Blacksmith Testbox router proof: 10/10 passed, including desktop/new, desktop/clone, 390 × 844 narrow navigation, pending create/run admission, cancel/suggestion behavior and deep-link feedback. Retained-media run: https://github.com/openclaw/openclaw/actions/runs/35551168083 (test execution 23.52 seconds; no retries or extended test timeouts). This is mocked-Gateway proof, not live isolated-Gateway acceptance. Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/35551040878 — still running; QA Smoke failures are being diagnosed, so no green-CI/readiness claim. Existing live isolated-Gateway and physical-mobile coverage gaps remain explicit. Credit: @vyctorbrzezowski. Work sessions |


Fixes #150293. Related: #149361.
What Problem This Solves
Leaving Automations silently discards an unfinished creation draft, including clones, forcing users to re-enter their work.
User Impact
New automation drafts, clones, and starter suggestions survive navigation to another page and back. A creation already submitted remains busy after returning, including Create & run now.
Why This Change Was Made
A scoped in-memory owner retains authoring inputs, the clone source definition, and the accepted submission. Each route mount still creates fresh inventory and request state. Cancel/Back, successful creation, application disposal, and Gateway/account/agent/permission changes retire the appropriate draft; an old completion cannot replace a newer one. Existing-job editing keeps its existing owner.
Evidence
Chromium with a mocked Gateway on Linux, through the actual sidebar and router:
All three cases replace the page/input nodes and start one fresh list, status, and history read, with zero mutation calls during navigation. The pending cases dispatch exactly one add; Create & run now dispatches exactly one run after that add.
36dd2271932f95d924358115ba27617c7fe6b994: 6 of 8 router tests fail on draft retention or pending admission; both deep-link controls pass. Candidate: 10/10 pass, including two added regressions for run-failure feedback after job/session deep-link navigation. Both additional regressions failed before the review repair.check-changedpassed for the selected core-test, UI and docs lanes, including typechecks, lint, formatting, i18n and export guards. The E2E setup also built the UI. Fresh independent review of the final staged diff: no actionable P0–P3 findings.The issue separately records real isolated-Gateway original proof at
4ea8cf97fe96cf3c5800e299b9168178983304fb. This candidate evidence is a mock-Gateway harness, not live personal-Gateway proof or a performance benchmark.Inspected synthetic before/after screenshots
Both images in each pair show the editor after leaving and returning. Before images show placeholder text in empty fields.
New automation, desktop — before / after
Clone, desktop — before / after
New automation, narrow — before / after
Tested candidate head:
3f959ae662b543e7a7de46565292d20775cb66dd.Risk and coverage
Draft only; no readiness or completion claim. Live candidate proof against the isolated personal Gateway and physical-mobile validation remain open. The 390px run uses Chromium emulation and actual sidebar expansion controls. Retaining text does not claim cursor/focus restoration.
Drafts remain in memory only and do not survive reload or app closure. This does not add server idempotency or resolve ambiguous transport-disconnect outcomes. Ordinary edit retention is outside the reproduced scope. No persistent storage, dependency policy, deployment, or update guards change.
September 21 final-review preparation
Published candidate:
93f442b26355d5b5e9695d85b147ad2cdaa14692. Original contributor ancestry is preserved. Main was merged only because the added editor-clearance import conflicted; both owners remain intact. The E2E test now uses the shared shipped production bundle rather than cold source Vite; assertions and deadlines are unchanged.sessions_spawnor Code Mode, while the runtime advertises deferredtool_search/tool_call. No timeout or test was weakened. Owner-level QA repair remains required.Still draft and unmerged. Real isolated-Gateway candidate acceptance and physical-mobile validation remain unproven; do not treat mocked Gateway/browser emulation as those proofs.
Credit: @vyctorbrzezowski.
Work sessions