Repository navigation
Onboard new accounts with a coding-agent setup prompt - #221
Conversation
On the dashboard visit after signup, ask which coding agents the account uses and what it is building, then hand it a setup prompt that installs the video2ctx skills for those agents, signs the CLI in through the browser, and makes one test call. The welcome toast and confetti now follow "Go to dashboard" instead of firing on arrival. Answers are saved through a browser-session-only PUT /v1/onboarding into a new onboarding_answers table (migration 0027), one row per account, removed with the account.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The welcome toast now follows the onboarding dialog, so the celebration test skips it first. A new test covers choosing agents, the focused goal field, the generated install command, the saved answers, and that an unchanged answer is not saved twice.
Review of 79375fcVerdict: CHANGES NEEDED. The welcome E2E expectation is updated, but a modal keyboard-focus issue remains. P2 — Trap backward tabbing from the focused step headingWelcomeOnboarding.tsx:32–35 moves focus to a Reproduction path: generate the setup prompt, then press Shift+Tab from its programmatically focused heading. Expected: focus stays within onboarding. The current handler permits native backward navigation toward dashboard controls behind the modal. This risks keyboard users operating obscured controls. Handle non-tabbable focus anchors/containment too, and add keyboard regression coverage after Generate and Back. A source-loaded hook probe confirms that the heading case does not prevent default while the first-control case does; actual Chromium focus movement was not independently reproduced because browser launch was blocked by the execution environment. Revisited validationThe new E2E changes correctly replace the obsolete immediate-toast assertion and add prompt generation/save/dedup/finish coverage. The prior head's Dashboard E2E (other) failed; its exact log cause was unavailable. Latest-head CI is still in progress, so this is not a green-check approval. Independent checks: 120 web tests passed on this head. The prior head had 2,123 platform tests passed / 59 skipped, platform typecheck passed, 35 onboarding/auth-boundary tests plus four additional boundary assertions passed, and independent SQLite migration/upsert/cascade checks passed. This commit changes only the E2E specification; platform/runtime source is unchanged. The updated browser E2E was reviewed but not run locally. No production signup, credential grant or email was performed. Merge coordination, not a separate defect in this branch: PR220 changes welcome copy to use each account's recorded signup grant. Preserve that behavior when reconciling this renamed Welcome component, rather than retaining its literal 1,000-credit message for launch accounts. The two differently named 0027 migrations are tracked by full filename; duplicate numeric prefixes alone do not establish a migration failure. No code changes, pushes, merges or deployments performed. |
Onboarding moves focus to each step's heading, which has tabIndex=-1, so the focus trap never matched it as the first or last control and Shift+Tab fell through to the dashboard behind the modal. When focus is on such an anchor, or outside the dialog, pick the next or previous tabbable control in document order and wrap at the ends. The E2E covers Shift+Tab and Tab from the heading after Generate and after Back.
Re-review of e6adab9Verdict: APPROVE. The prior P2 focus issue is resolved and the latest-head CI checks pass. The updated focus hook now handles non-tabbable step headings and focus outside the modal. Independent source-loaded hook probes passed nine assertions covering forward/backward navigation from headings and middle anchors, outside-dialog recovery, boundary wrapping and ordinary middle Tab behavior. The E2E now explicitly covers the original Generate/Back keyboard reproduction, as well as the deferred welcome flow. Independent verification at this head:
Earlier independently verified API principal/validation and SQLite migration/upsert/cascade checks remain applicable: those onboarding backend files are unchanged. The main-branch update incorporates already-reviewed PR219 model changes; no new material issue found. Limits: local Chromium launch was blocked, so the independent hook probe is not a browser execution. Browser E2E success above is GitHub CI evidence. No production signup, email or account mutation was performed. Preserve PR220's recorded-grant welcome logic when reconciling the two PRs; this approval is for this exact head, not an unreviewed conflict resolution. No implementation, push, merge or deployment performed. |
What
New accounts now get a short onboarding before the 1,000-credit welcome toast. On the dashboard visit after signup (
?welcome=1), a dialog opens over the dashboard:The welcome toast and confetti now fire on "Go to dashboard" (or skip) instead of on arrival.
Setup prompt
Built in
web/lib/setup-prompt.ts. It tells the agent to:npx skills add devhims/video2ctx --skill '*' -a claude-code -a codex -g -y(ids are theskillsCLI's own--agentvalues; "Other" explains how to target itself)@video2ctx/cliand sign in withvideo2ctx auth login(browser approval)GET /v1/usage(free) and one transcript call (1 credit)It never embeds or asks for an API key, matching the docs' rule against pasting credentials into agent conversations.
Saved answers
PUT /v1/onboarding, browser-session only (API keys and CLI sessions get403 SESSION_REQUIRED). Validates agent ids, rejects duplicates, caps the goal at 500 characters.0027_onboarding_answers.sql: one row per account (user_id,agentsJSON array,goal,created_at,updated_at), upserted on re-answer,ON DELETE CASCADEwith the user.Coding agent selectedandSetup prompt copiedevents (no goal text).Count accounts per agent:
Other changes
WelcomeToast.tsxrenamed toWelcome.tsx; it readsuseSearchParamsduring render so the dialog is server-rendered with the page (no dashboard flash).NewProjectDialogintouse-dialog-focus.tsso both dialogs share it.docs/internals/endpoints.mdxregenerated for the new route.Testing
vitest run(2,123 passed),tsc --noEmit,docs:check. Newtest/onboarding.test.tscovers saving, agent ordering, validation and the session-only boundary.npm test(120 passed, including new prompt-builder tests),tsc --noEmit.created_at,json_eachcounts, empty arrays rejected, user delete cascades.