Repository navigation
[codex] Always show first-run onboarding - #1528
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ Review complete. This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here. |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste — Elegant simplification that removes a complex multi-case fast-path in favour of a single authoritative signal (the openhands-onboarded localStorage flag). The behavioural change is intentional, well-reasoned, and the test updates cleanly invert the old expectations.
What the change does
Root cause / real problem being solved: In non-locked, non-auth-required mode the old shouldShowFirstRunOnboarding formula was authMissing && !onboardingCompleted && !backendLlmReady. Since authMissing is false whenever VITE_AUTH_REQUIRED is not set, root-level onboarding never fired for normal deployments — a fresh browser with no seeded backend fell straight through to MissingAgentServerScreen (the recovery modal) before onboarding could mount. This PR fixes that by dropping the authMissing guard and making the check simply !onboardingCompleted.
Simplifications: The isBackendLlmReady module (49 lines with multiple special-case branches), two useEffect hooks, a useState synchronizer, and useSettings / useActiveBackend calls in two components are all removed. The net result is significantly less code with the same (corrected) guarantees.
Intended UX trade-off: Returning users connecting from a fresh browser/origin will now be walked through onboarding once (previously they were silently skipped when the backend already reported a configured LLM). The PR description calls this out explicitly as the desired behaviour.
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟡 MEDIUM
The formula change widens when first-run onboarding fires: root-level onboarding now triggers for all unvisited origins, not just public-mode deployments. Returning users on fresh browsers will be walked through onboarding once. Test coverage is thorough and both the locked and non-locked paths are exercised. Main residual risk is the deliberate UX change for returning users.
VERDICT:
✅ Worth merging — Core logic is sound, simplification is correct, tests are comprehensive.
KEY INSIGHT:
Removing the LLM-readiness gate unifies first-run gating into root.tsx; OnboardingHost in the outlet tree now functions exclusively as a preview hook.
Improve this review? If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:
- Add a
.agents/skills/custom-codereview-guide.mdfile to your branch (or edit it if one already exists) with the/codereviewtrigger and the context the reviewer is missing. See the customization docs for the required frontmatter format.- Re-request a review — the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
- When your PR is merged, the guideline file goes through normal code review by repository maintainers.
Resolve with AI? Install the iterate skill in your agent and run
/iterateto automatically drive this PR through CI, review, and QA until it's merge-ready.Was this review helpful? React with 👍 or 👎 to give feedback.
This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation
✅ Mock-LLM E2E Tests60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
✅ Mock-LLM Docker E2E Test Results60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
|
🚀 Released in v1.2.0. |
HUMAN:
I tested these changes against the live ngrok endpoint.
Summary
openhands-onboardedlocalStorage flag as the source of truth for first-run onboardingRoot Cause
The root bootstrap previously allowed backend readiness and LLM configuration to bypass first-run onboarding. In frontend-only/static deployments, a fresh browser can have no seeded backend, so the bootstrap fell through to the recovery Manage Backends modal before onboarding could mount.
Validation
npm test -- __tests__/root.test.tsx __tests__/components/onboarding/onboarding-host.test.tsx __tests__/components/onboarding/onboarding-modal.test.tsxnpm run typecheck && VITE_BACKEND_BASE_URL=https://statusquo-dr-ohback.ngrok-free.app npm run buildNotes
🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.29.3-pythonopenhands-automation==1.0.0a13081622b6ac2277d04c727b2917bf725b2d94551ePull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-081622bRun
All tags pushed for this build
About Multi-Architecture Support
sha-081622b) is a multi-arch manifest supporting both amd64 and arm64sha-081622b-amd64) are also available if needed