docs: tell quickstart readers the setup wizard exists - #3573
Conversation
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe getting-started documentation now describes interactive wizard prompts and non-interactive defaults. Tests read the documentation and verify that key commands and prompt labels match wizard behavior. ChangesWizard documentation alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccfb5f64eb
ℹ️ 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".
The quickstart's create command omitted --template, so in a real terminal it opened a blocking three-prompt wizard the page never mentioned. Pass --template ai-agent in the documented command and describe the wizard (template, runtime, git) on the create-project page. Adds a regression test that ties both pages to shouldRunWizard() and SETUP_COPY so wizard changes cannot silently outrun the docs. Found during a DX dogfood walk.
ccfb5f6 to
fe4600b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cli/commands/init/interactive-wizard.test.ts (1)
47-69: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAssert the complete documentation contract.
Line 58 accepts any value after
--template, so the test passes if the quickstart uses an unsupported template. Lines 62-66 check prompt presence only, so they do not protect prompt order or defaults. Assert-- --template ai-agent, verify the prompt positions, and check the three documented defaults.Proposed assertions
const template = /--template\s+([a-z0-9-]+)/.exec(createCommand)?.[1]; + assertStringIncludes(createCommand, "-- --template ai-agent"); + assertEquals(template, "ai-agent"); assertEquals(shouldRunWizard({ template }), false); ... - for (const prompt of [SETUP_COPY.template, SETUP_COPY.runtime, SETUP_COPY.git]) { + const prompts = [SETUP_COPY.template, SETUP_COPY.runtime, SETUP_COPY.git]; + for (const prompt of prompts) { assertStringIncludes(createProject, prompt); } + const positions = prompts.map((prompt) => createProject.indexOf(prompt)); + assertEquals(positions, [...positions].sort((a, b) => a - b)); + for (const defaultText of ["preselects ai-agent", "preselects Node.js", "preselects Yes"]) { + assertStringIncludes(createProject, defaultText); + }This protects the documented command and the wizard prompt contract shown in the supplied context.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cli/commands/init/interactive-wizard.test.ts` around lines 47 - 69, Strengthen the “getting-started docs match wizard behaviour” tests: require the quickstart create command to contain the exact “-- --template ai-agent” argument and verify that it disables shouldRunWizard. In the create-project documentation test, assert SETUP_COPY.template, SETUP_COPY.runtime, and SETUP_COPY.git appear in that order, and validate each prompt’s documented default value rather than only checking prompt presence.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/getting-started/create-project.md`:
- Around line 29-30: Update the keyboard instruction in the getting-started
prompt to explicitly say users can change an answer first, using concise,
active, present-tense language.
---
Nitpick comments:
In `@cli/commands/init/interactive-wizard.test.ts`:
- Around line 47-69: Strengthen the “getting-started docs match wizard
behaviour” tests: require the quickstart create command to contain the exact “--
--template ai-agent” argument and verify that it disables shouldRunWizard. In
the create-project documentation test, assert SETUP_COPY.template,
SETUP_COPY.runtime, and SETUP_COPY.git appear in that order, and validate each
prompt’s documented default value rather than only checking prompt presence.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 38715925-cf95-4e88-a493-aeb8f4ee2529
📒 Files selected for processing (3)
cli/commands/init/interactive-wizard.test.tsdocs/getting-started/create-project.mddocs/getting-started/quickstart.md
Found during a DX dogfood walk of the published getting-started flow.
Symptom
The quickstart told readers to run:
and then said only: "The
ai-agentstarter is the default. Pass-- --template <template>when you want a different starting point." The page presents scaffolding as one automatic step.In a real terminal that command does not scaffold anything. It stops and waits:
and blocks indefinitely — there is no timeout and no non-interactive fallback once a tty is present. Answering that prompt reveals the wizard is not one question but three:
Choose a starter template:, thenSelect runtime:, thenInitialize Git?. None of "wizard", "Select runtime", or "Initialize Git" appeared anywhere in the published docs fornpm create.Reproduced against this tree with a pty driver on
cli/main.ts init probe-app: blocked on the template prompt until the harness killed it; with two Enters it walked template -> runtime -> git and stalled on git.Root cause
Doc drift, not a CLI defect.
shouldRunWizard()(cli/commands/init/interactive-wizard.ts) returns true whenever--templateis absent, andrunInteractiveWizard()then prompts for template (line 129), runtime (line 155) and git (line 184). The quickstart documented the one invocation that trips this gate while describing the outcome of the invocation that does not.Fix
docs/getting-started/quickstart.md: the documented command now passes-- --template ai-agent, and the prose says what omitting it does (three-question wizard) and what happens in non-interactive shells (ai-agent, Node.js, no git).docs/getting-started/create-project.md: replaces "The wizard preselects theai-agenttemplate" with all three questions and their preselected answers, plus the two ways to skip the wizard.No CLI behaviour changes.
Regression test
cli/commands/init/interactive-wizard.test.ts— it lives next to the gate it protects, so the doc claim and the code that makes it true fail together:--template, and assertsshouldRunWizard()returnsfalsefor it. Drop the flag from the doc and the test fails.SETUP_COPYprompt string verbatim. Add or rename a wizard prompt and the test fails until the page is updated.Both failed before the doc edits (
shouldRunWizardreturnedtrue; the page did not contain "Choose a starter template:") and pass after.Verification
Doc claims checked against real CLI output, not just source:
init probe-appin a pty: blocks onChoose a starter template:with AI Agent preselected; two Enters exposeSelect runtime:(Node.js preselected) andInitialize Git?(Yes preselected).init probe-app --template ai-agentin a pty: no prompt at all, straight to install,✓ probe-app ready, and no.gitin the scaffold — confirming--templateskips the runtime and git questions too.scripts/docs/validate-guides.tspasses (one pre-existing unrelated warning).Summary by CodeRabbit
ai-agenttemplate and clarified interactive and non-interactive setup behavior.