Repository navigation
feat(onboarding): add the desktop onboarding flow (first-run) - #5996
ronishrohan wants to merge 15 commits into
Conversation
🏆 Review leaderboardSep 21–28, 2026 · UTC
Ranked by distinct external PRs reviewed, then review rounds, then PR comments. Self-activity and bot activity are excluded. Show 7 more reviewers
|
|
^ old pr, merged by mistake |
neversettle17-101
left a comment
There was a problem hiding this comment.
Two suggestions on the onboarding flow:
-
Cloud step should be enterprise-only. The "Run sessions in the cloud" step should only appear for enterprise users. Everyone else should default to local and skip the step, so the flow goes GitHub -> project.
-
Single agent harness picker. Replace the separate orchestrator and worker dropdowns with one agent harness selection. A first-time user is unlikely to understand the orchestrator vs worker distinction during onboarding. The chosen harness can be applied to both roles, and users can split them later in Settings.
Addressed in |
Addressed in
Also merged the latest |
neversettle17-101
left a comment
There was a problem hiding this comment.
Two review findings:
-
A failed agent refresh blocks re-probing for 5 minutes (
frontend/src/renderer/hooks/useAgentsQuery.ts:24, medium).refreshAgentsIfStalesets its 5-minute throttle timestamp before the request runs and never resets it on failure. If the refresh fails while the daemon is still booting, a newly installed or signed-in harness can stay unselectable for 5 minutes. Suggest setting the timestamp only after a successful probe, or clearing it in the failure path. -
Weaker ownership guard on Windows (
backend/internal/service/agent/codex_secure_fs_windows.go:449, low).protectCodexPrivateFilenow accepts a file owned by any trusted principal and takes ownership of it. The previous check required the current user as owner, so the "changed before ACL protection" guard is weaker. Worth confirming that is intended, and if so, that a test covers a file owned by another trusted principal.
neversettle17-101
left a comment
There was a problem hiding this comment.
Review findings, medium severity (read from the diff; tests not run).
1. A failed onboarding finish can re-run later — _shell.tsx#L1111-L1127
On failure the finish request is intentionally kept in the store so the user can retry, but it is never cleared, and handledOnboardingFinishNonceRef starts at 0 on every ShellLayout mount. If the user leaves onboarding and the shell remounts (for example by navigating to /), the stale request runs createProject again without being asked, behind the "Starting orchestrator" screen. If the first attempt partly succeeded, this can create a duplicate project or orchestrator. Suggest clearing the request when navigating back to /onboarding and having the retry raise a fresh one.
2. Windows credential-file protection accepts any trusted owner — codex_secure_fs_windows.go#L430-L465, #L387-L405
protectCodexPrivateFile used to require the current user as owner. It now accepts any trusted principal (Administrators, SYSTEM) and then takes ownership. The stable-identity and ACL-safe checks remain, and the comment explains the elevated/CI case, but these files hold credentials, so please confirm this relaxation is intended and have a Windows reviewer look at it.
Related: ensurePrivateDirectory decides whether a directory is "new" with an Lstat (L626) before MkdirAll (L630). A process that creates the directory in between gets the lenient "new directory" path. It still needs a trusted owner and a safe ACL, so the window is narrow.
|
From the NotesBot call on Relevant discussion excerpts:
Source thread: https://discord.com/channels/1476302178913357958/1557455414784692224/1557455414784692224 Generated by AO Bot based on the transcript from NotesBot. |
7fadfda to
7185f73
Compare
Fix: GitHub sign-in loader never finished (6ecbdeb)Symptom: on the onboarding GitHub step, clicking Sign in with GitHub showed a loader that never resolved. Cause: the daemon runs gh 2.102.0 copies the code to the clipboard itself and prints this instead: The code was never found, so the attempt stayed in What changed (
Verification:
Known gap (not in this commit): if gh never prints a recognizable code (a future code format, or gh stalling), the step still waits out the 15-minute timeout. A follow-up could fail the attempt after the existing 10-second code wait and show "Try again" with gh's last output line. |
5e4b980 to
1744d5e
Compare
Squashed and rebased onto main. Adds the first-run onboarding page (agents, GitHub, project), the daemon-owned GitHub device sign-in (code shown in the page, no terminal), and the supporting hooks, i18n strings and tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XhB8WKCryTGjCMULBJyhwK
…, drop header logo - Remove the small AO mark from the onboarding header; the progress bars stay put. - Offer 'Start a standalone agent' on the project step. It skips the project, keeps the chosen agent, and ends on the Scratchpad composer. - Once an orchestrator agent is chosen, show a Worker agent dropdown that follows it by default, with a hint that it can differ. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XhB8WKCryTGjCMULBJyhwK
…ording
The onboarding "Sign in with GitHub" step spun forever with gh 2.102.0. The
daemon runs `gh auth login --web` without a terminal and parses the one-time
code from gh's output, but only matched the old wording:
! First copy your one-time code: ABCD-1234
Newer gh copies the code to the clipboard itself and prints:
! One-time code (5D0D-70F8) copied to clipboard
No code was ever found, so the attempt stayed in `starting` until the
15-minute timeout and the UI showed its loader the whole time.
Parsing no longer depends on gh's wording:
- Code: the first XXXX-XXXX token (uppercase letters and digits) gh prints.
Tokens inside a link are skipped, and once a code is found nothing later
replaces it.
- Verification URL: the first https:// link gh prints, in any order relative
to the code. The line no longer has to contain "URL". The
https://github.com/login/device default still applies when gh prints none.
- ANSI color codes are stripped before matching. With CLICOLOR_FORCE=1 in the
environment, gh wraps the code in escapes and the code was never found.
Tests cover the old wording, the gh 2.102 clipboard wording, unfamiliar
wording with decoy code-shaped tokens, and colored output with CRLF line
endings. Also checked against a real gh 2.102.0 run, with and without
CLICOLOR_FORCE=1.
Known gap: if gh never prints a recognizable code (a future code format, or
gh stalling), the step still waits out the 15-minute timeout instead of
failing fast.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#7021) * fix(onboarding): round the connected GitHub card and explain a failed gh install The connected row is now a standalone rounded card, and a failed install shows a plain sentence instead of the job's raw error (e.g. "exit status 1"). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xymr7J3GubQA154hpXTfra * feat(onboarding): start the standalone agent as soon as onboarding finishes Choosing a standalone agent used to end on the Scratchpad composer and wait for a prompt. The finish step now spawns the worker itself and opens its session. A spawn failure goes back to onboarding with the choices kept. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPBEDgCx2B9aYDe7t1um6X * test(onboarding): pass the standalone session dep in the finish tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPBEDgCx2B9aYDe7t1um6X --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…er rebasing on main Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAocjSaz4VhDWFC8rdb8c2
64d7a21 to
a425fef
Compare
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAocjSaz4VhDWFC8rdb8c2


Code changes: +4667 -111
Tests: +2381 -31
Others: +1080 -8 (2 binary assets)
Reopens the reverted onboarding feature from #5566 on a new branch.
Includes the combined worker/orchestrator selection step, current cloud provider-connection handling, and focused frontend verification.
Preserves workspace registration and refreshes agent readiness after manual sign-in. Hardens GitHub device login for older CLI versions, reloads, cancellation, timeouts, and rejected credentials.
Adds a real-daemon OAuth matrix for gh 2.4.0, 2.20.2, 2.50.0, and 2.100.0, plus connected production-renderer tests. GitHub OAuth/API responses use an isolated local fixture with disposable credentials; no personal account or keychain is used.
Preserves native quit confirmation on onboarding and during the project handoff after syncing with main. Adds regression coverage for existing-profile onboarding entry rules.
Detects GitHub CLI versions below 2.4.0 and offers Update in onboarding and the in-app GitHub notice. Uses Homebrew or WinGet upgrades, provides manual Linux instructions, and rechecks the resolved version before starting sign-in. Covers failed updates and older copies still on PATH.
Existing cloud accounts and saved remote hosts now bypass first-run onboarding, including delayed profile reads and offline hosts. Failed profile reads leave the app available instead of forcing setup. Local project and completion-marker behavior is preserved.