Skip to content

Bug: onboarding Back rewinds Companion UI but not Gateway wizard session #1172

Closed

Description

@TheAngryPit

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

  1. Start the Windows Companion local-gateway onboarding wizard.
  2. Complete at least one answer so the wizard advances to a second step.
  3. Press Back.
  4. Observe that the previous question is rendered again.
  5. 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:

  1. add a supported Gateway-side rewind operation and use it from the Companion; or
  2. 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.

Activity

  1. added
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    clawsweeper:source-repro
    impact:session-state
    impact:ux-friction
    issue-rating: 🦞 diamond lobster
    no-stale
    P2
    on Aug 18, 2026
  2. clawsweeper commented on Aug 18, 2026

    @clawsweeper

    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:

    • The linked draft PR reports blocked build, test, and real UI proof, so its source-level repair should not close this issue until the current head is validated.

    Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68.

    Label changes

    Label changes:

    • add clawsweeper:linked-pr-open: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • remove clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.
    • remove 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:

    Likely related people:

    • Scott Hanselman: Blame attributes the local history and Back handler retained in the released baseline to this source lineage. (role: current implementation-lineage contributor; confidence: medium; commits: 4206611f2b2e; files: src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs, src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml)
    • karkarl: The timeline records active ownership and links this collaborator's focused repair PR for the affected onboarding flow. (role: active repair contributor; confidence: high; commits: 4bbadb0b14bb; files: src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs, src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. added
    status: 🚢 actively landing
    on Aug 22, 2026
  4. added
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    and removed
    clawsweeper:queueable-fix
    clawsweeper:fix-shape-clear
    no-stale
    on Aug 22, 2026
  5. locked as resolved and limited conversation to collaborators on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:session-stateimpact:ux-frictionissue-rating: 🦞 diamond lobsterstatus: 🚢 actively landing

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions