Get-started residual polish from the Phase 4 re-walk (#842)#855
Get-started residual polish from the Phase 4 re-walk (#842)#855dennisonbertram wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Derive step-1 (Vercel account) completion from an existing session
instead of click-state only, so accordion progress no longer resets
on remount after bouncing off /sessions.
- Reword the GitHub connect description to avoid the 'step 1 of 2'
bare-ordinal collision under a card numbered 2.
- Rename the step-2 header to 'GitHub' so the title, description, and
action button no longer repeat the exact phrase 'Connect GitHub'
three times in close proximity.
- Clarify the step-1 Continue button label ('Continue to GitHub').
- Show a one-line arrival banner ('Finish setup to continue to your
sessions.') when the onboarding gate redirect lands the user here
with an explicit next param.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6343540cca
ℹ️ 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".
| const isStep1DerivedComplete = Boolean(session?.user); | ||
| const completedSteps = new Set<StepId>(clickCompletedSteps); | ||
| if (isStep1DerivedComplete) { | ||
| completedSteps.add(1); |
There was a problem hiding this comment.
Open the GitHub step when deriving step 1 complete
When a signed-in user is bounced from /sessions to /get-started?next=%2Fsessions (the gate does not add step=github), shouldAutoOpenGitHubStep is false so activeStep remains 1. This new derived-completion block only adds step 1 to completedSteps; it does not advance/open step 2 after the session arrives from /api/auth/info, so the remount still shows the completed Vercel panel and hides the GitHub panel until the user clicks Continue again—the re-collapse path this change is meant to fix.
Useful? React with 👍 / 👎.
Why
Implements #842 (child of epic #779). The Phase 4 directed verification passed 13/13 gate-state checks, but the naive re-walks still hit real (small) confusions on the guided path itself.
Protected path: "the guided first-run flow reads coherently end to end."
What changed
All changes are in
apps/web/app/get-started/get-started-flow.tsx(+ colocated test), matching the issue's declared scope:completedSteps), so navigating away (e.g. bouncing off/sessions) and back re-locked/re-collapsed step 2. Step 1 is now also derived-complete whenever a session exists (Boolean(session?.user)), merged with the click-state set, so a signed-in user's step 2 is never re-locked on remount.requireOnboarded(the/sessionsgate from Onboarding gate: sign-in lands new users in /get-started, not an empty console #780) always redirects here with an explicitnextparam. Users who typed/sessionsdirectly and got bounced saw a bare setup flow with no explanation. Added a one-line banner, "Finish setup to continue to your sessions.", shown whenevernextis present; hidden on a direct visit with nonextparam.Verify-first findings (6–7)
apps/web/lib/auth/run-auth-cta.ts(the shared pending/error/retry contract used by both/get-startedand/settings/connections, added in Auth CTA feedback — sign-in and GitHub connect get pending, error, and cancel states #786) and confirmedsetPending(true)is called synchronously beforeawait action(). Live-clicked "Connect" on/settings/connectionsin a real browser and captured the button showing a spinner icon immediately after click (screenshot05-settings-connect-click-immediate.png). Outcome: verified correct in current code, no change needed. The Phase 4 walker's report likely predates or missed the Auth CTA feedback — sign-in and GitHub connect get pending, error, and cancel states #786 shared-helper refactor.apps/web/components/landing/app-mockup.tsxand live-clicked between session tabs on the real landing page. Confirmed the entire mockup content (repo path, branch, prompt, tool count, todo progress, typed summary, file list) visibly switches on click, and the active tab gets a highlighted background (screenshots06-landing-tab-auth-flow-active.png/07-landing-tab-api-refactor-active.png). Outcome: verified working; no code change made. Per the issue's explicit "In scope" line (copy/state fixes inget-started-flow.tsx+ colocated, verification items 6–7 only), no change was made toapp-mockup.tsx— a subtlearia-current/indicator enhancement is a reasonable future follow-up but is out of this PR's scope.Out of scope
verifyRepoAccess(Onboarding completion should require an accessible repo, not just "an installation exists" #792, sequenced after verifyRepoAccess should best-effort re-sync installations before returning no_installation #791 — not implemented in this wave).apps/web/components/landing/app-mockup.tsx(finding 7 is verify-first only, per the issue's scope).How it was verified
Red-first TDD in
apps/web/app/get-started/get-started-flow-polish.test.tsx:Then the smallest green change, plus an update to one existing assertion in
get-started-flow.test.tsxthat hard-coded the old "step 1 of 2" copy string.Full gate, all exit 0:
Browser evidence (authenticated local smoke,
PORT=3041 bun run web, test-auth cookieopen_agents_test_user_id=dev-managed-runtime-user):/get-started?next=%2Fsessions→ arrival banner visible, step 1 shows a completed checkmark on first render (no click needed), step 2 unlocked and titled "GitHub"./get-started?step=github(nonext) → no arrival banner, confirming the conditional./settings/connections→ "Connect" click shows an immediate spinner (finding 6 verified)./(signed out) landing mockup → clicking between session tabs visibly switches all content (finding 7 verified).agent-browser errorsand console showed no unexpected errors; the oneauth_cta_failed/ 401 on/api/auth/link-socialis expected (no real GitHub OAuth client configured in this local worktree).Evidence quality
Deterministic test coverage (bun test, red-first) for findings 1–5, plus local Agent Browser smoke screenshots for the visible/state behavior and verify-first findings 6–7. Screenshots live in the epic evidence bundle at
.context/onboarding-evidence/phase5/842/in the main checkout (headlessghcannot upload images to this PR body):01-gate-arrival-banner.png— arrival banner + auto-completed step 102-github-step-expanded.png— reworded copy, single-button label03-direct-visit-no-banner.png— no banner withoutnext04-settings-connections.png— settings Connections page baseline05-settings-connect-click-immediate.png— synchronous spinner on click (finding 6)06-landing-tab-auth-flow-active.png/07-landing-tab-api-refactor-active.png— landing tab switch (finding 7)Risk and rollback
Pure client-side copy/state changes in one component (
get-started-flow.tsx) plus its tests; no schema, API, auth, or deploy-impacting changes. No migration required. Rollback is a plain revert of this PR's commits — no data or state to unwind, sincecompletedSteps/clickCompletedStepsremain client-only React state.Reviewer guide
apps/web/app/get-started/get-started-flow-polish.test.tsxfor the new-behavior contracts (findings 1, 2, 3, 4, 5), thenapps/web/app/get-started/get-started-flow.tsxfor the implementation.apps/web/app/get-started/get-started-flow.test.tsx(finding-1 assertion update) is mechanical — it just points the existing "not-yet-linked, no reconnect copy" assertion at the new wording instead of the old "step 1 of 2" phrase.completedStepsmerge logic (clickCompletedSteps∪ derived step-1-from-session) — this is the one piece of actual state-derivation logic in the diff, not just copy.Follow-up from epic #779.