feat: add VITE_DISABLE_ONBOARDING to suppress the onboarding wizard#1928
feat: add VITE_DISABLE_ONBOARDING to suppress the onboarding wizard#1928hieptl wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
VascoSch92
left a comment
There was a problem hiding this comment.
LGTM
Two other things that are not blocking that you can address if you have the time:
onboarding-host.tsx:10-23— apply the docstring patch I gave above. Two lines: name both gates, and scope the "fresh browser sees onboarding once" invariant with "absent deployment-level suppression."static-server.mjs:572— either accept 1/True/yes or console.warn when AGENT_CANVAS_DISABLE_ONBOARDING is set to something other than "true". A Helm typo currently no-ops silently.
neubig
left a comment
There was a problem hiding this comment.
Could we consider #1942 as an alternative before merging this?
#1928 solves the SaaS problem with a new build-time flag, runtime environment variable, CLI option, and injected window global. #1942 instead uses the runtime signals Canvas already has: it suppresses the post-auth modal only when the active backend matches the deployment's locked Cloud host and settings report a usable LLM (a non-empty model plus API-key or subscription authentication).
That keeps the fresh-browser behavior from #1528 for Local and arbitrary Cloud backends, preserves Cloud login/recovery and preview mode, and avoids adding another deployment configuration surface. It also does not write a fake onboarding-completion marker.
Requesting changes so we can compare the scoped capability-based approach before committing to the new flag/API surface.
✅ 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) |
|
Hello @neubig, I took a close look at #1942, and I think your concern about avoiding another deployment-specific configuration option is a reasonable one. One correction, though—and this is on me. #1928 has never written to The main question that determines the right approach for me is whether #1942's assumption holds in practice. It only takes effect when the Cloud settings report There are also two behavioral implications that may be worth calling out explicitly:
If #1942 moves forward, I have one small suggestion: consider reusing There is also a possible middle ground if the goal is to eliminate the configuration surface without relying on mutable backend state. We could instead gate on In any case, I'm happy with whichever of these three approaches you prefer. If you'd rather proceed with #1942 instead, I'm completely comfortable closing this PR. Thank you very much! 🙏 |
HUMAN:
End-to-end evidence (beyond unit tests):
npm run build:node scripts/static-server.mjs --port 3001 --dir build --disable-onboarding→curl -s localhost:3001/ | grep __AGENT_CANVAS_DISABLE_ONBOARDING__matcheswindow.__AGENT_CANVAS_DISABLE_ONBOARDING__=true, and the startup log printsFirst-run onboarding: disabled.AGENT_CANVAS_DISABLE_ONBOARDING=true node scripts/static-server.mjs --port 3001 --dir build→ same injection + log (this is the path the SaaS Helm chart'senv:passthrough uses).npm run build:mock, served by the real static server on two ports = two fresh origins/localStorage):--session-api-key, the wizard opens on "Choose your agent" with OpenHands pre-selected).--disable-onboarding, fresh profile with a healthy backend → lands directly on the "Let's Start Building!" home page with the chat composer; no wizard. In-page check confirmedwindow.__AGENT_CANVAS_DISABLE_ONBOARDING__ === trueandlocalStorage["openhands-onboarded"] === null(suppression comes from the flag, not a fake completion marker).npm run lintclean;npm test→ 3,959 passed / 512 files (includes 10 new tests below);npm run buildandnpm run build:libpass.AGENT:
Why
New SaaS users on app.all-hands.dev/canvas are forced through the onboarding wizard even though OpenHands Cloud already pre-provisions everything it collects (agent = OpenHands, free Cloud LLM). They should drop straight into the "Let's Start Building!" new-chat page. The wizard's two gates (root.tsx first-run screen; home-page
OnboardingHostmodal — the one SaaS users see) key solely off the per-browseropenhands-onboardedlocalStorage flag, with no deployment-level override. A purely build-time flag cannot reach SaaS because it consumes the shared prebuilt image, so the flag follows the same dual-half convention asVITE_LOCK_TO_CLOUD/VITE_AUTH_REQUIRED.Summary
isOnboardingDisabled()(src/api/agent-server-config.ts): true when build-timeVITE_DISABLE_ONBOARDING === "true"or the runtime-injectedwindow.__AGENT_CANVAS_DISABLE_ONBOARDING__ === true; wire it intouseOnboardingCompletion()so both wizard gates close while locked-mode Cloud login and the?previewOnboardingStepharness are unaffected.--disable-onboardingtoscripts/static-server.mjs(injects the window global intoindex.html, mirrors--lock-to-cloud), with anAGENT_CANVAS_DISABLE_ONBOARDING=trueenv fallback read at process entry so the SaaS Helm chart can enable it via its genericenv:passthrough without a chart release. Document the flag in.env.sample,AGENTS.md, anddocs/DEVELOPMENT.md.agent-server-config.test.ts), gate suppression for a fresh Cloud user (onboarding-host.test.tsx) and a fresh install (root.test.tsx), and static-server flag parsing + injection (static-server.test.ts).Issue Number
N/A.
How to Test
npm install, thenVITE_DISABLE_ONBOARDING= npm test(see Notes on the.envcaveat) andnpm run lint.npm run dev→ the onboarding wizard appears.VITE_DISABLE_ONBOARDING="true"to.env, restartnpm run dev, clear localStorage → you land on the home screen, no wizard;?previewOnboardingStep=0still opens the preview. Remove the line afterwards (leaving it set makes wizard-visibility unit tests fail locally — same known hazard asVITE_LOCK_TO_CLOUD).npm run build, thennode scripts/static-server.mjs --port 3001 --dir build --disable-onboarding(orAGENT_CANVAS_DISABLE_ONBOARDING=true node scripts/static-server.mjs --port 3001 --dir build) →curl -s localhost:3001/containswindow.__AGENT_CANVAS_DISABLE_ONBOARDING__=true; a fresh browser profile gets no wizard. Without the flag, the same build shows the wizard.Video/Screenshots
oss-5736.mov
Type
🐳 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.37.0-pythonopenhands-automation==1.3.1ff8443d3e5d76439e23478c7a7d904a5539c3f0fPull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-ff8443dRun
All tags pushed for this build
About Multi-Architecture Support
sha-ff8443d) is a multi-arch manifest supporting both amd64 and arm64sha-ff8443d-amd64) are also available if needed