CLI: Skip AI prompts in React Native during init#34577
Conversation
|
View your CI Pipeline Execution ↗ for commit fe2b0c9
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 26094d3 ☁️ Nx Cloud last updated this comment at |
1 similar comment
|
View your CI Pipeline Execution ↗ for commit 26094d3 ☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughUpdated AI setup compatibility to be framework-aware: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
code/lib/create-storybook/src/services/FeatureCompatibilityService.test.ts (1)
78-94: Add one explicitREACT + VITE + nullassertion to lock nullable-framework semantics.This makes intended behavior for unknown framework explicit and protects against regressions in future refactors.
Proposed test addition
it('should return false for non-react renderer with non-vite builder', () => { @@ ).toBe(false); }); + it('should keep AI setup enabled for react renderer with vite builder when framework is null', () => { + expect( + FeatureCompatibilityService.supportsAISetupFeature( + SupportedRenderer.REACT, + SupportedBuilder.VITE, + null + ) + ).toBe(true); + }); + it('should return false for react-native-web-vite framework', () => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@code/lib/create-storybook/src/services/FeatureCompatibilityService.test.ts` around lines 78 - 94, Add an explicit test assertion that verifies the nullable framework case for React with Vite: in the test file add an expect calling FeatureCompatibilityService.supportsAISetupFeature(SupportedRenderer.REACT, SupportedBuilder.VITE, null) and assert the intended boolean (true) to lock the semantics for REACT + VITE + null; reference the existing test pattern around FeatureCompatibilityService.supportsAISetupFeature, SupportedRenderer, SupportedBuilder, and SupportedFramework when adding this new assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@code/lib/create-storybook/src/services/FeatureCompatibilityService.test.ts`:
- Around line 78-94: Add an explicit test assertion that verifies the nullable
framework case for React with Vite: in the test file add an expect calling
FeatureCompatibilityService.supportsAISetupFeature(SupportedRenderer.REACT,
SupportedBuilder.VITE, null) and assert the intended boolean (true) to lock the
semantics for REACT + VITE + null; reference the existing test pattern around
FeatureCompatibilityService.supportsAISetupFeature, SupportedRenderer,
SupportedBuilder, and SupportedFramework when adding this new assertion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8f63b307-e4a4-4f08-870e-945b7ec781c8
📒 Files selected for processing (3)
code/lib/create-storybook/src/initiate.tscode/lib/create-storybook/src/services/FeatureCompatibilityService.test.tscode/lib/create-storybook/src/services/FeatureCompatibilityService.ts
Closes #
What I did
As title says
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
Improvements
Bug Fixes
Tests