fix(onboard): keep the wizard alive through provider auth failures and polish standalone install UX#100632
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8a3d9bdae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Without model credentials the seeded first message is guaranteed to fail | ||
| // with a provider auth error, so hatch quietly and explain instead. | ||
| const { resolveDefaultModelAuthStatus } = await import("../commands/auth-choice.js"); | ||
| const modelAuthStatus = resolveDefaultModelAuthStatus(nextConfig); |
There was a problem hiding this comment.
Check auth in the default agent store
When a fresh user completes model setup through the wizard with any profile-backed provider method, the profile is written to the default agent directory (the same path runProviderPluginAuthMethod resolves before upserting profiles), not to the global store. This new finalize gate calls resolveDefaultModelAuthStatus without the already-imported resolveDefaultAgentDir(nextConfig), so it reads the wrong store, reports hasAuth: false, suppresses the bootstrap hatch message, and shows the new “Model auth missing” note even though onboarding just saved credentials. Pass the default agent dir (and agent id if needed) into the helper before deciding whether to seed.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. Reviewed July 6, 2026, 2:06 AM ET / 06:06 UTC. Summary PR surface: Source -20, Tests -103, Docs +6, Other +14. Total -103 across 18 files. Reproducibility: yes. by source inspection for the review finding: provider auth writes profiles under the configured default agentDir, while the new finalize gate reads the implicit default store. I did not run the wizard locally because this was a read-only review. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the onboarding fixes, but make the finalize model-auth check resolve and pass the same default agent id and agentDir from nextConfig that provider auth uses before merge. Do we have a high-confidence way to reproduce the issue? Yes by source inspection for the review finding: provider auth writes profiles under the configured default agentDir, while the new finalize gate reads the implicit default store. I did not run the wizard locally because this was a read-only review. Is this the best way to solve the issue? No, not yet: the PR is the right shape for the reported onboarding bugs, but the finalize gate must share the provider-auth agent scope before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f9bf5f589763. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -20, Tests -103, Docs +6, Other +14. Total -103 across 18 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
…d polish standalone install UX Rough edges found by running the standalone install flow (install.sh -> openclaw onboard) in a clean Debian/Node 24 container: - Provider auth setup failures (e.g. the preselected "Anthropic Claude CLI" option on a host without a Claude CLI login) killed the whole wizard and lost all progress. The interactive wizard now notes the error and returns to the provider picker; explicit --auth-choice automation still fails fast. - Onboarding config was only written after the channels step, so a crash or cancel during channel pairing lost auth + gateway decisions. The wizard now persists config before the channel/search/skills steps. - With model auth skipped, finalize auto-launched the TUI and auto-sent "Wake up, my friend!", which always failed with a confusing provider auth error. The seed message is now gated on usable model credentials and a "Model auth missing" note explains the next step (new resolveDefaultModelAuthStatus helper shared with the model check). - Search provider picker suffix said "API key required" even for non-key credentials (SearXNG base URL); it now uses the provider's credentialLabel. - install.sh warned "PATH missing npm global bin dir" with manual fix instructions even though it had already persisted the export line to the shell rc; it now says the PATH was updated and how to reload the current shell. - Delete the dead interactive hooks onboarding step (setupInternalHooks) left behind by the onboarding streamline; quickstart enables default hooks silently. Verified live in a clean container per fix (wizard re-prompt, no-auth hatch note, installer PATH message) plus wizard/onboard test suites.
d8a3d9b to
1659786
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16597863de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Without model credentials the seeded first message is guaranteed to fail | ||
| // with a provider auth error, so hatch quietly and explain instead. | ||
| const { resolveDefaultModelAuthStatus } = await import("../commands/auth-choice.js"); | ||
| const modelAuthStatus = resolveDefaultModelAuthStatus(nextConfig); |
There was a problem hiding this comment.
Honor CLI-backed auth before suppressing hatch
Fresh evidence beyond the existing agent-dir comment: Anthropic CLI setup stores the usable profile under provider claude-cli while keeping the selected default model as anthropic/... with a claude-cli runtime policy (extensions/anthropic/cli-migration.ts:181 and :221). This new gate calls resolveDefaultModelAuthStatus(nextConfig), whose candidates only cover the model provider/OpenAI aliases, so a valid Claude CLI onboarding is reported as hasAuth: false; the wizard then suppresses the first TUI hatch message and shows “Model auth missing” even though auth is present. Include the resolved harness/synthetic auth provider, in addition to the scoped agent dir, before using this status to block the hatch.
Useful? React with 👍 / 👎.
…d polish standalone install UX (openclaw#100632) Fixes rough edges in the standalone install flow (install.sh -> openclaw onboard), found and verified by running the flow in a clean container and on a clean macOS Tahoe VM: - Provider auth setup failures (e.g. the preselected "Anthropic Claude CLI" option on a host without a Claude CLI login) no longer kill the whole wizard. The interactive wizard notes the error and returns to the provider picker; explicit --auth-choice automation still fails fast. - Onboarding config now persists before the channel/search/skills steps, so a crash or cancel during channel pairing no longer loses auth + gateway decisions. - With model auth skipped, finalize no longer auto-sends the "Wake up, my friend!" message (which always failed with a provider auth error). The hatch seed is gated on usable model credentials and a "Model auth missing" note explains the next step. - Search provider picker no longer labels non-key credentials (e.g. SearXNG base URL) as "API key required". - install.sh no longer warns "PATH missing npm global bin dir" with manual fix steps after it already persisted the export line; it reports the PATH was updated and how to reload the current shell. - Removed the dead interactive hooks onboarding step (setupInternalHooks); quickstart enables default hooks silently. Verified live per fix in a clean Debian/Node 24 container and on a clean macOS 26.5 Parallels VM (wizard re-prompt, SearXNG label), plus wizard/onboard test suites and tsgo:core. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…d polish standalone install UX (openclaw#100632) Fixes rough edges in the standalone install flow (install.sh -> openclaw onboard), found and verified by running the flow in a clean container and on a clean macOS Tahoe VM: - Provider auth setup failures (e.g. the preselected "Anthropic Claude CLI" option on a host without a Claude CLI login) no longer kill the whole wizard. The interactive wizard notes the error and returns to the provider picker; explicit --auth-choice automation still fails fast. - Onboarding config now persists before the channel/search/skills steps, so a crash or cancel during channel pairing no longer loses auth + gateway decisions. - With model auth skipped, finalize no longer auto-sends the "Wake up, my friend!" message (which always failed with a provider auth error). The hatch seed is gated on usable model credentials and a "Model auth missing" note explains the next step. - Search provider picker no longer labels non-key credentials (e.g. SearXNG base URL) as "API key required". - install.sh no longer warns "PATH missing npm global bin dir" with manual fix steps after it already persisted the export line; it reports the PATH was updated and how to reload the current shell. - Removed the dead interactive hooks onboarding step (setupInternalHooks); quickstart enables default hooks silently. Verified live per fix in a clean Debian/Node 24 container and on a clean macOS 26.5 Parallels VM (wizard re-prompt, SearXNG label), plus wizard/onboard test suites and tsgo:core. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
What Problem This Solves
Fixes three ways a fresh standalone install (
install.sh→openclaw onboard) could dead-end or mislead a new user, found by running the full flow in a clean Debian/Node 24 container:Error: Claude CLI is not authenticated on this host.and threw away every prior answer.No API key found for provider "openai"error.Also polishes two smaller rough edges: the search-provider picker labeled SearXNG "Self-hosted meta-search with no API key required · API key required" (its credential is a base URL), and
install.shended with a "PATH missing npm global bin dir" warning telling users to hand-edit their shell rc even though the installer had already persisted the export line.Why This Change Was Made
Interactive provider setup failures now note the error and return to the provider picker (explicit
--auth-choiceautomation still fails fast); the wizard persists config before the channel/search/skills steps; and the finalize hatch seed is gated on a newresolveDefaultModelAuthStatushelper (shared with the existing model check) with a "Model auth missing" note pointing atopenclaw configure --section model. The dead interactive hooks step (setupInternalHooks) left behind by the onboarding streamline (#98218) is deleted along with its i18n keys. Net −103 LOC.User Impact
New users can no longer lose all onboarding progress from one wrong menu pick, keep their auth/gateway answers if channel pairing goes sideways, and get an accurate next step instead of a failing first chat when they skipped auth. Installer output now tells the truth about PATH setup.
Evidence
All verified live in a clean
node:24-bookwormcontainer with a packed tarball of this branch, fresh user each run:run error: No API key found for provider "openai". After: "Model auth missing" note during finalize, TUI opens idle with no doomed message.install.shended with "PATH missing npm global bin dir … Fix (zsh: ~/.zshrc, bash: ~/.bashrc)" despite having written the rc line. After: "PATH updated in /home/user/.bashrc … For this shell, run: source /home/user/.bashrc".pnpm test src/wizard(11 files / 124 tests) andpnpm test src/commands/onboard(28 files / 240 tests) green; new regression tests insrc/wizard/setup.model-auth.test.tsandsrc/wizard/setup.finalize.test.ts;pnpm tsgo:coreclean;bash -n scripts/install.shclean.🤖 Generated with Claude Code