Repository navigation
Description
Summary
The Windows Companion onboarding wizard exposes a Back action, but it only rewinds a client-local payload history. The active Gateway wizard session is not rewound because the Companion does not send a corresponding rewind operation.
This can leave the Companion showing an earlier question while the Gateway still expects a later answer. Submitting the displayed step again can cause repeated steps, stale-session errors, connection loss, or a full wizard restart.
Steps to reproduce
- Start the Windows Companion local-gateway onboarding wizard.
- Complete at least one answer so the wizard advances to a second step.
- Press Back.
- Observe that the previous question is rendered again.
- Submit an answer for the displayed question.
Expected behaviour
Back should either:
- rewind the authoritative Gateway wizard session and restore the previous step; or
- be unavailable if the current wizard protocol cannot safely rewind.
The UI and Gateway must never disagree about the active step.
Actual behaviour
The Companion pops and re-renders a client-local payload history entry, but does not send a corresponding rewind operation to the Gateway wizard session.
This is visible in WizardPage.xaml.cs: the page pushes payloads into _stepHistory before rendering (ApplyPayloadAsync), while WizardBack_Click only pops and re-applies a previous payload. The current Core wizard RPC contract documents wizard.start, wizard.next, wizard.cancel, and wizard.status; there is no wizard.back operation.
Why this matters
The user can be shown a step that the Gateway no longer considers current. A subsequent answer can therefore be rejected as stale, repeat the flow, or force recovery to start the wizard again. This is particularly disruptive during provider or authentication setup.
Related issues
- Related to #841, which covers losing the wizard connection across a Gateway restart. This issue is narrower: it covers the client-local Back implementation and the missing authoritative rewind.
- Distinct from #688, which covered the installer having no Back button at all.
Environment
- Gateway: OpenClaw
2026.8.1 - Control UI commit observed:
9f5776e071d1 - Release channel: Dev
- Gateway mode: local WSL gateway
- Windows Companion: installed build/source commit
5924d491(local build; not claimed as an upstream release)
Evidence and proof gap
The source-level mismatch is confirmed. A runtime repro with the real Back action should additionally capture the sessionId and stepId before and after Back, plus the Gateway response when the displayed earlier step is submitted. No Tailscale cause is claimed here.
Proposed direction
Choose one authoritative design:
- add a supported Gateway-side rewind operation and use it from the Companion; or
- remove/disable Back for steps that cannot be rewound and preserve only safe recovery actions.
The Companion should not silently render stale protocol state as if it were current.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Aug 18, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 22, 2026, 5:48 AM ET / 09:48 UTC.
Summary
Keep open. Current main still contains the unsafe local Back replay, while the linked open PR is actively carrying the focused repair and should resolve this issue only after review and proof.
Reproducibility: yes. from source: advance the Gateway wizard, press Back, then submit the re-rendered older step. Current main replays local history without an authoritative Gateway rewind; a real current-head capture remains needed for the proposed repair.
Next step
An open linked PR already owns the narrow repair, so this issue should remain paired with that implementation until it is reviewed, proven, and merged.
Review details
Best possible solution:
Keep local Back unavailable unless the Gateway later provides a tested authoritative rewind, and land the linked repair with visible isolated-app proof that restart and exit recovery remain available.
Do we have a high-confidence way to reproduce the issue?
Yes, from source: advance the Gateway wizard, press Back, then submit the re-rendered older step. Current main replays local history without an authoritative Gateway rewind; a real current-head capture remains needed for the proposed repair.
Is this the best way to solve the issue?
Yes. Removing unsafe local replay while retaining restart and exit recovery is the narrowest safe repair when the Gateway protocol has no rewind operation.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68.
Label changes
Label changes:
clawsweeper:linked-pr-open: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.Label justifications:
P2: The flow can present an invalid onboarding step, but users retain restart and exit recovery rather than being fully blocked.impact:session-state: The locally rendered step can diverge from the Gateway-owned wizard session.impact:ux-friction: Provider or authentication setup can be interrupted and require recovery.Evidence reviewed
What I checked:
src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs:382, ccd64bbb7d68)src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs:769, ccd64bbb7d68)docs/ONBOARDING_WIZARD.md:39, ccd64bbb7d68)src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs:769, 4206611f2b2e)Likely related people:
src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs,src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml)src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs,src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.