Skip to content

Setup UI cannot safely back out of the Gateway installed handoff #1246

Closed as not planned

Description

@joelagnel

Bug

Setup navigation around the Gateway installed handoff is asymmetric and can leave Gateway wizard state active after the user backs out.

On current main:

  • Gateway installed (Step 4 of 6) offers Start OpenClaw onboard, but no Back action.
  • Pressing Back on the first server-defined OpenClaw onboard question returns to Set up OpenClaw (Step 2 of 6), skipping the installed-gateway handoff and Capabilities page.
  • That route does not cancel the active Gateway wizard session before leaving.
  • A connection completing after navigation can still become the active client, and step history is not cleared on every fresh wizard start.

This affects both initial local WSL setup and the direct Settings > OpenClaw Onboard > Open onboarding entry point.

@jacobtomlinson, tagging you for setup and Local AI UX context.

Reproduction

  1. Use an app-managed local WSL gateway.
  2. Complete local setup, or open Settings > OpenClaw Onboard > Open onboarding.
  3. Reach the Gateway installed screen.
  4. Observe that the screen has Start OpenClaw onboard, but no Back button.
  5. Start OpenClaw onboard and wait for its first question.
  6. Press Back.
  7. Observe that setup returns to Set up OpenClaw rather than Gateway installed, without first cancelling the active Gateway wizard session.

Expected behavior

  • Gateway installed > Back should return to the Capabilities flow with the current setup configuration retained.
  • Back on the first OpenClaw onboard question should invalidate pending client work, cancel the active Gateway wizard session, and return to Gateway installed.
  • A client connection that completes after navigation should be disconnected instead of becoming active.
  • Starting a fresh wizard should clear local step history.

This boundary behavior does not imply support for rewinding later Gateway-owned wizard questions.

Actual behavior

  • The Gateway installed handoff is forward-only.
  • Back on the first onboarding question navigates directly to Welcome.
  • The active wizard session is not cancelled on that route.
  • Pending connection and stale-history state can survive navigation.

Environment

  • Version or commit: current main at 911f36860b2d
  • OS or platform: Windows setup UI with an app-managed local WSL gateway
  • Relevant configuration: first-run local setup or direct installed-gateway onboarding from Settings

Evidence

Current main renders only the onboarding button on the Gateway installed milestone:

<Grid Grid.Row="2" ColumnDefinitions="*,Auto" Margin="0,12,0,16">
<StackPanel x:Name="DotsPanel" Grid.ColumnSpan="2" Orientation="Horizontal" Spacing="8"
HorizontalAlignment="Center" VerticalAlignment="Center"
IsTabStop="False" AutomationProperties.Name="Step 4 of 6">
<Border Width="8" Height="8" CornerRadius="4" VerticalAlignment="Center" Background="{ThemeResource SetupInactiveDotBrush}" />
<Border Width="8" Height="8" CornerRadius="4" VerticalAlignment="Center" Background="{ThemeResource SetupInactiveDotBrush}" />
<Border Width="8" Height="8" CornerRadius="4" VerticalAlignment="Center" Background="{ThemeResource SetupInactiveDotBrush}" />
<Border Width="20" Height="8" CornerRadius="4" VerticalAlignment="Center" Background="{ThemeResource SetupIndicatorAccentBrush}" />
<Border Width="8" Height="8" CornerRadius="4" VerticalAlignment="Center" Background="{ThemeResource SetupInactiveDotBrush}" />
<Border Width="8" Height="8" CornerRadius="4" VerticalAlignment="Center" Background="{ThemeResource SetupInactiveDotBrush}" />
</StackPanel>
<Button x:Name="OnboardButton" Grid.Column="1" Content="Start OpenClaw onboard"
Visibility="Collapsed" MinWidth="100" HorizontalAlignment="Right"
Margin="48,0" Style="{StaticResource AccentButtonStyle}"
Click="Onboard_Click" />

Current main assigns the connected client before checking whether navigation invalidated the operation:

private async Task StartWizardAsync(bool clearTranscript = true)
{
var generation = AdvanceOperationGeneration();
try
{
_errorState = false;
_finalizationErrorState = false;
_expectedTerminalRestart = false;
HideRecoveryActions();
// Cancel any in-progress server-side wizard session before starting a
// fresh one, so the gateway doesn't reject wizard.start with "wizard
// already running" when recovering from a previous error.
await CancelCurrentSessionAsync();
ClearConsoleBanner();
_sessionId = "";
_wizardStepCount = 0;
_progressPolls = 0;
_totalProgressPolls = 0;
_lastProgressStepId = "";
_stepVisits.Clear();
SetBusy("Connecting to gateway...");
_client = await ConnectClientAsync();
_client.StatusChanged += OnWizardClientStatusChanged;
SetBusy("Starting wizard...");
StartConsoleTail();
var payload = await _client.SendWizardRequestAsync("wizard.start", timeoutMs: 30_000);
if (generation != _operationGeneration)
return;
if (clearTranscript)
TranscriptPanel.Children.Clear();
await ApplyPayloadAsync(payload);

The first-question Back path navigates directly to Welcome:

private void WizardBack_Click(object sender, RoutedEventArgs e)
{
// Pop the current step (that's showing now), then re-render the previous one
if (_stepHistory.Count > 1)
{
_stepHistory.Pop(); // discard current
var previousPayload = _stepHistory.Pop(); // will be re-pushed by ApplyPayloadAsync
_ = ApplyPayloadAsync(previousPayload);
}
else
{
SetupWindow.Active?.NavigateToWelcome(back: true);
}

Candidate fix branch:

https://github.com/joelagnel/openclaw-windows-node/tree/fix/setup-ui-reversible-onboarding-navigation

No pull request has been opened so the behavior can be tested first.

Additional context

Activity

  1. added
    clawsweeper:bulk-filed
    clawsweeper:fix-shape-clear
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:session-state
    impact:ux-friction
    issue-rating: 🦞 diamond lobster
    P2
    and removed
    clawsweeper:fix-shape-clear
    on Aug 27, 2026
  2. clawsweeper commented on Aug 27, 2026

    @clawsweeper

    Codex review: this still needs some work. Reviewed September 22, 2026, 6:27 PM ET / 22:27 UTC.

    Summary
    Keep open for the remaining navigation decision. The reported stale-client and history hazards are addressed, but returning from Gateway installed to Capabilities remains unsupported and explicitly deferred in the discussion.

    Reproducibility: not applicable. to the remaining navigation feature: source confirms the missing return action. The original first-question Back reproduction no longer applies because that control and its local history were removed.

    Maintainer decision needed

    Question Recommendation
    Should the deferred Back navigation at the installed-gateway handoff now be approved? Retain the deferral: Keep the current recovery actions and leave this scoped navigation request pending explicit sponsorship.

    Why: Current docs deliberately specify forward-only onboarding, the author asked to defer this change, and subsequent priority changes do not settle its intended behavior.

    Next step
    Resolve the explicit navigation deferral with the setup owners; the bulk-filed signal and product choice exclude automated repair dispatch.

    Review details

    Best possible solution:

    Preserve the existing lifecycle protections and define a configuration-preserving handoff return path separately from Gateway-question rewind.

    Do we have a high-confidence way to reproduce the issue?

    Not applicable to the remaining navigation feature: source confirms the missing return action. The original first-question Back reproduction no longer applies because that control and its local history were removed.

    Is this the best way to solve the issue?

    Unclear until the boundary navigation is approved; any implementation should preserve current cancellation safeguards and avoid restoring local replay of Gateway questions.

    AGENTS.md: found and applied where relevant.

    Codex review notes: model internal, reasoning medium; reviewed against c7063081a2a5.

    Label changes

    Label changes:

    • add P2: The remaining request improves setup navigation; current source provides restart and skip recovery, so a blocked first-use path warranting P0 is not established.
    • remove P0: Current review triage priority is P2, so this older priority label is no longer current.

    Label justifications:

    • P2: The remaining request improves setup navigation; current source provides restart and skip recovery, so a blocked first-use path warranting P0 is not established.
    • impact:ux-friction: Users cannot directly return from the installed-gateway handoff to revise earlier capability choices.
    Evidence reviewed

    What I checked:

    • Requested return path remains absent: The installed-gateway footer contains Start OpenClaw onboard and no Back control. The milestone handler exposes that forward action. (src/OpenClaw.SetupEngine.UI/Pages/ProgressPage.xaml:125, c7063081a2a5)
    • Current lifecycle protection: StartWizardAsync cancels the previous session, checks operation generation, and disposes a superseded connection before assigning _client. Local payload history and its Back handler are absent; restart and skip cancel the current session. (src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs:130, c7063081a2a5)
    • Established forward-only contract: Documentation intentionally excludes Gateway-question Back navigation and provides Restart onboard or Skip & exit through More options. Contract tests assert removal of local history replay and stale-client cleanup ordering. (docs/ONBOARDING_WIZARD.md:55, c7063081a2a5)
    • Regression coverage inspected: WizardBack_IsUnavailableWithoutDedicatedGatewayBackRpc and WizardStartup_KeepsRecoveryVisibleAndRejectsStaleConnections protect the current navigation and lifecycle contract. Tests were inspected, not executed, under the read-only review restriction. (tests/OpenClaw.Tray.Tests/AppRefactorContractTests.cs:1558, c7063081a2a5)
    • Merged partial resolution: GitHub verifies Fix onboarding wizard Back desynchronization #1205 (Fix onboarding wizard Back desynchronization) merged on August 28. Its documented scope removes unsafe local replay and protects stale continuations; it does not add the requested handoff return path. (865182712edc)
    • Partial fix is released: The merged wizard correction is an ancestor of v2026.9.4; GitHub confirms that release was published September 15. This establishes release inclusion for the safety correction, not completion of the remaining navigation request. (865182712edc)

    Likely related people:

    • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • samanthamsong: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    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 2 commits that reference this issue on Aug 28, 2026
    dd51485
    577e364
  4. joelagnel commented on Sep 1, 2026

    @joelagnel
    CollaboratorAuthor

    To reduce risk and only merge critical fixes, we are keeping the current forward-only flow for now. Can revisit after. Will keep this issue open though. Don't merge this yet.

  5. 14 remaining items

  6. added
    clawsweeper:needs-maintainer-review
    on Sep 14, 2026
  7. added
    P0
    and removed
    P2
    on Sep 15, 2026
  8. added
    P2
    and removed
    P0
    on Sep 15, 2026
  9. added
    P0
    and removed
    P2
    on Sep 22, 2026
  10. added
    P2
    and removed
    P0
    on Sep 22, 2026
  11. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  12. github-actions commented on Oct 15, 2026

    @github-actions
    Contributor

    Closing due to inactivity.
    If this still affects OpenClaw Windows, open a new issue with the current version, logs, and fresh reproduction details.

  13. locked as resolved and limited conversation to collaborators on Oct 18, 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:bulk-filedclawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-primpact:ux-frictionissue-rating: 🌊 off-meta tidepoolstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions