Repository navigation
Fix startup setup check for per-gateway node tokens - #375
Merged
Merged
Conversation
Node-mode startup was still checking only the legacy root identity file for node device tokens. Modern local setup can persist the node token under gateways/<gateway-id>/device-key-ed25519.json, so startup kept reopening onboarding after Keep my setup. Reuse the per-gateway identity scan for all token roles and add regression coverage for per-gateway node tokens in both the startup gate and existing-config guard. Co-authored-by: Copilot <[email protected]>
23 tasks
indierawk2k2
pushed a commit
to indierawk2k2/openclaw-windows-node
that referenced
this pull request
May 14, 2026
…+ wire V2 dismiss Our V2 branch was cut at a03c454 (before PR openclaw#340 landed in master). PR openclaw#340 fixed two real bugs in the legacy onboarding flow: "Keep my setup" didn't actually dismiss the wizard, and ExistingConfigGuard only scanned the legacy root identity dir for operator tokens (per-gateway tokens under gateways/<id>/device-key-ed25519.json were missed). PR openclaw#375 (Scott's, still open) extends the per-gateway scan symmetrically to the node-token role, fixing a startup-relaunch-reopens-onboarding bug for local node-mode profiles whose node token lives only per-gateway. This commit: 1. Merges origin/master to absorb PR openclaw#340's three commits (Dismissed event/method on OnboardingState, OnboardingWindow.OnOnboardingDismissed handler, SetupWarningPage CancelReplace -> Props.Dismiss, removed default-to-Advanced in returning-user path, HasAnyOperatorDeviceToken per-gateway scan, StartupSetupState rewrite). Auto-resolved a single conflict in OnboardingWindow.cs via the ORT strategy. 2. Applies PR openclaw#375's symmetric per-gateway scan locally: - Refactored OnboardingExistingConfigGuard.HasAnyOperatorDeviceToken to delegate to a new HasAnyDeviceTokenForRole(dataPath, role). - GetSummary now uses HasAnyDeviceTokenForRole for the node side too, not just operator (the asymmetric defect that PR openclaw#375 catches). - StartupSetupState.HasStoredNodeDeviceToken now delegates to the guard's per-gateway-aware helper so the startup auto-launch decision and the in-wizard guard agree. 3. Wires V2 equivalents of PR openclaw#340's Dismiss machinery so the V2 redesigned UI gets the same fix, not just the legacy UI: - OnboardingV2State adds Dismissed event + idempotent Dismiss() method (matches legacy OnboardingState.Dismiss semantics: log, fire once). - V2 WelcomePage's "Keep my setup" handler now calls Props.Dismiss() instead of just toggling setConfirmingReplace(false). Mirrors legacy SetupWarningPage CancelReplace post-PR-openclaw#340. - OnboardingV2Bridge surfaces a Dismissed event (subscribes to V2 state, forwards to host). - OnboardingWindow's V2 mount now subscribes to bridge.Dismissed and reuses the existing _dismissedWithoutCompletion flag + Close pattern from PR openclaw#340's OnOnboardingDismissed so OnClosed skips TryCompleteOnboarding the same way for both legacy and V2 dismiss paths. Validation: build.ps1 -> all 4 projects green Shared.Tests -> 1548 passed / 28 skipped / 0 failed Tray.Tests -> 1178 passed / 0 failed (was 1164 -- +14 from PR openclaw#340's OnboardingExistingConfigGuardTests + OnboardingStateTests + StartupSetupStateTests new coverage we just absorbed) Co-authored-by: Copilot <[email protected]>
indierawk2k2
pushed a commit
to indierawk2k2/openclaw-windows-node
that referenced
this pull request
May 15, 2026
…+ wire V2 dismiss Our V2 branch was cut at a03c454 (before PR openclaw#340 landed in master). PR didn't actually dismiss the wizard, and ExistingConfigGuard only scanned the legacy root identity dir for operator tokens (per-gateway tokens under gateways/<id>/device-key-ed25519.json were missed). PR openclaw#375 (Scott's, still open) extends the per-gateway scan symmetrically to the node-token role, fixing a startup-relaunch-reopens-onboarding bug for local node-mode profiles whose node token lives only per-gateway. This commit: 1. Merges origin/master to absorb PR openclaw#340's three commits (Dismissed event/method on OnboardingState, OnboardingWindow.OnOnboardingDismissed handler, SetupWarningPage CancelReplace -> Props.Dismiss, removed default-to-Advanced in returning-user path, HasAnyOperatorDeviceToken per-gateway scan, StartupSetupState rewrite). Auto-resolved a single conflict in OnboardingWindow.cs via the ORT strategy. 2. Applies PR openclaw#375's symmetric per-gateway scan locally: - Refactored OnboardingExistingConfigGuard.HasAnyOperatorDeviceToken to delegate to a new HasAnyDeviceTokenForRole(dataPath, role). - GetSummary now uses HasAnyDeviceTokenForRole for the node side too, not just operator (the asymmetric defect that PR openclaw#375 catches). - StartupSetupState.HasStoredNodeDeviceToken now delegates to the guard's per-gateway-aware helper so the startup auto-launch decision and the in-wizard guard agree. 3. Wires V2 equivalents of PR openclaw#340's Dismiss machinery so the V2 redesigned UI gets the same fix, not just the legacy UI: - OnboardingV2State adds Dismissed event + idempotent Dismiss() method (matches legacy OnboardingState.Dismiss semantics: log, fire once). - V2 WelcomePage's "Keep my setup" handler now calls Props.Dismiss() instead of just toggling setConfirmingReplace(false). Mirrors legacy SetupWarningPage CancelReplace post-PR-openclaw#340. - OnboardingV2Bridge surfaces a Dismissed event (subscribes to V2 state, forwards to host). - OnboardingWindow's V2 mount now subscribes to bridge.Dismissed and reuses the existing _dismissedWithoutCompletion flag + Close pattern from PR openclaw#340's OnOnboardingDismissed so OnClosed skips TryCompleteOnboarding the same way for both legacy and V2 dismiss paths. Validation: build.ps1 -> all 4 projects green Shared.Tests -> 1548 passed / 28 skipped / 0 failed Tray.Tests -> 1178 passed / 0 failed (was 1164 -- +14 from PR openclaw#340's OnboardingExistingConfigGuardTests + OnboardingStateTests + StartupSetupStateTests new coverage we just absorbed) Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gateways/<gateway-id>/device-key-ed25519.jsonRepro evidence
After #340, clicking Keep my setup closed the onboarding window, but a full exit + relaunch still reopened setup for a local node-mode profile with:
EnableNodeMode=trueNodeDeviceTokenNodeDeviceTokenSanitized log evidence from the broken run:
After this fix and x64 rebuild, relaunch no longer opens onboarding; the post-launch log only shows normal gateway/node connection:
Validation
./build.ps1dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore— 1548 passed, 28 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore— 1180 passed