fix(wizard): surface upstream console output, unwrap nested notes, auto-launch OAuth URLs
Fixes #640.
Problem
Upstream openclaw plugins emit user-critical content (OAuth URLs, install fallbacks, error reasons) via console.log to gateway stdout rather than as wizard.payload WS frames. The tray UI only renders wizard.payload, so during several model-provider onboarding paths the user saw a blank/stuck step and the wizard either silently looped or bounced back to the provider list.
All wizard copy and step content is owned by upstream openclaw; this PR does not modify any of that text. It adds tray-side backstops so the missing content reaches the user.
Changes
Three layered, narrowly-scoped fixes plus one already-committed gateway fix on this branch (32a2c7a — enables the bundled device-pair plugin so OAuth providers can actually pair after install).
1. WizardConsoleTail — src/OpenClaw.SetupEngine.UI/WizardConsoleTail.cs
Spawns wsl.exe -d OpenClawGateway -- bash -c "tail -F /tmp/openclaw/openclaw-*.log" and surfaces root-logger console.log lines into a new ConsoleBanner panel on the active wizard step. Filters out structured subsystem noise. Silently no-ops when wsl/distro is unavailable (remote/Tailscale case).
2. WizardPayloadHelpers.ExtractStepMessage — src/OpenClaw.SetupEngine.UI/WizardPayloadHelpers.cs
Reads step.message and tolerates the case where a plugin nests a {type:note, title, message} object instead of sending a string. Returns the string as-is, "Title\n\nMessage" for a nested note, or empty (never raw JSON). Shape-based, not provider-keyed.
3. WizardUrlLauncher — same file
Auto-opens OAuth/device-code URLs via Windows.System.Launcher.LaunchUriAsync. Conservative host allowlist (auth.openai.com, auth.x.ai, accounts.google.com, login.anthropic.com, console.anthropic.com, claude.ai, github.com, auth.openclaw.ai) plus pattern match on /oauth, /authorize, response_type=code, device_code. Per-session dedupe via HashSet, cleared in StartWizardAsync so Start over resets cleanly. Docs/security links are skipped.
Plumbing — Pages/WizardPage.xaml{,.cs}
New ConsoleBanner StackPanel (collapsed by default). _consoleTail + _launchedUrls fields reset on StartWizardAsync. ApplyPayloadAsync uses the new helper. AppendLineTo extracted as a shared renderer for body + banner; URL branch triggers auto-launch.
Helpers are XAML-free and linked into the tray test project via <Compile Include>.
Tests
- 39 new xUnit tests (15 tail filter, 24 helpers).
- Build: 5/5 projects green, win-arm64.
- Shared tests: 2045 pass, 0 fail.
- Tray tests: 968 pass, 0 fail.
- Manual validation across 6 onboarding paths: Codex browser, Codex npm-download, Claude error, xAI OAuth, Gemini OAuth, Start over.
Codex review: needs real behavior proof before merge. Reviewed June 5, 2026, 3:40 PM ET / 19:40 UTC.
Summary Review failed before ClawSweeper could summarize the requested change.
Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.
Review metrics: none identified.
Merge readiness Overall: 🌊 off-meta tidepool Proof: 🌊 off-meta tidepool Patch quality: 🌊 off-meta tidepool Result: rating does not apply to this item.
Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.
Risk before merge
- [P1] No close action taken because the review did not complete.
Maintainer options:
- Decide the mitigation before merge
Retry the Codex review after fixing the execution failure. - Pause or close
Do not merge this PR until maintainers decide whether the risk is worth taking.
Next step before merge
- [P1] Review did not complete, so no work-lane recommendation was made.
Review details
Best possible solution:
Retry the Codex review after fixing the execution failure.
Do we have a high-confidence way to reproduce the issue?
Unclear. The review failed before ClawSweeper could establish a reproduction path.
Is this the best way to solve the issue?
Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.
AGENTS.md: unclear because the file could not be read completely.
Codex review notes: model gpt-5.5, reasoning high; reviewed against afa6218338d6.
Label changes
Label changes:
- add
rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool. - remove
rating: 🧂 unranked krab: Current PR rating israting: 🌊 off-meta tidepool, so this older rating label is no longer current. - remove
status: 📣 needs proof: Current PR status no longer selects a status label. - remove
P2: Current review triage priority is none. - remove
merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels. - remove
merge-risk: 🚨 auth-provider: Current PR review selected no merge-risk labels.
Label justifications:
rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed
What I checked:
- failure reason: timeout.
- codex failure detail: Codex review failed for this PR: spawnSync codex ETIMEDOUT.
Likely related people:
- unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
What the crustacean ranks mean
- 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
- 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
- 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
- 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
- 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
- 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
- 🌊 off-meta tidepool: rating does not apply to this item.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.
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-reviewcomments, 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-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto 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 explainto ask for more context, or@clawsweeper stopto stop active automation.
Good catch — pushed 02a81d9 dropping auto-launch entirely.
You're right that for device-code flows (xAI, Gemini, GitHub device login) the user needs to read a short code from the wizard first, then paste it in the browser. Popping the browser on top of the wizard breaks that sequence. The console tail still renders the URL as a clickable HyperlinkButton, so the user clicks when they're ready.
This also moots the @clawsweeper concern about the predicate being too broad — WizardUrlLauncher is gone along with its 16 tests.