CLI: Remove extensive prompt option #34740
Conversation
📝 WalkthroughWalkthroughThe PR removes the ChangesRemove --extensive flag from ai setup
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Microsoft Presidio Analyzer (2.2.362)code/lib/cli-storybook/src/ai/index.tsMicrosoft Presidio Analyzer failed to scan this file Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@code/lib/cli-storybook/src/ai/setup-prompts/index.ts`:
- Around line 25-28: The FORMERLY_USED_PROMPTS registry currently includes an
entry ('optimized-tests') that is active, causing duplicate prompt names; remove
the 'optimized-tests' entry from FORMERLY_USED_PROMPTS and ensure the
formerly-used registry is populated only with prompts that are not present in
the active registry (e.g., compare against the active/current prompts registry
such as CURRENT_PROMPTS or wherever active prompts are registered) so the two
sets remain mutually exclusive; update the initialization logic for
FORMERLY_USED_PROMPTS to dedupe by checking existing active prompt keys (or
filter out any keys found in the active registry) and keep only genuinely
deprecated entries.
In `@code/lib/cli-storybook/src/ai/setup-prompts/pattern-copy-play.ts`:
- Around line 5-6: Update the misleading Status header in pattern-copy-play.ts
so it matches the actual default variant used in the setup code: change the
header text that currently says "shipping default" to reflect "optimized-tests"
(the default selected in ai/setup-prompts/index.ts); locate the status comment
block in pattern-copy-play.ts and replace the incorrect wording so future
maintainers see the correct default variant name.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 502a34e0-0187-4baa-9b93-4a81e26c0512
📒 Files selected for processing (5)
code/lib/cli-storybook/src/ai/index.tscode/lib/cli-storybook/src/ai/setup-prompts/index.tscode/lib/cli-storybook/src/ai/setup-prompts/pattern-copy-play.tscode/lib/cli-storybook/src/ai/types.tscode/lib/cli-storybook/src/bin/run.ts
💤 Files with no reviewable changes (2)
- code/lib/cli-storybook/src/bin/run.ts
- code/lib/cli-storybook/src/ai/types.ts
Closes #
What I did
Removal of the --extensive CLI option
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit
New Features
--disable-telemetryflag tostorybook ai setupcommand, enabling users to opt out of diagnostic data collection.Refactor
--extensiveflag fromstorybook ai setup. The command now uses a single, optimized prompt variant by default, simplifying the AI setup experience.