Repository navigation
Skills M4 (5/9): the Vitest addon hosts the test toolset and serves the story-test tool - #35731
valentinpalkovic wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 25 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: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (29)
Comment |
|
Closes #
Part 5 of 9 of the Skills M4 migration. Stacked on #35730, replaces #35677.
What I did
The tool that runs story tests for an agent lives in the MCP addon today, even though everything it drives belongs to the Vitest addon. Ownership moves where it belongs: the Vitest addon now hosts the test toolset, and the tool is served from there. The MCP addon only exposes it.
Behavior change worth its own look: the tool used to be offered whenever
@storybook/addon-vitestwas merely installed. It is now offered when the addon is actually enabled in the Storybook configuration. A project that has the package in its dependencies but never added it to its addons list will stop seeing the tool. That is the correct answer, because the tool could not have run a single test there anyway, but it is a visible difference for anyone in that state. A new end-to-end fixture models exactly that setup so the case stays covered.A second, smaller change in the same area: a request where only some of the named stories resolve now fails loudly. Previously the tool quietly ran the ones it could find and reported a verdict as though that had been the whole request, which means an agent could be told its tests passed when part of what it asked for never ran. It now reports which selectors did not resolve. A request where nothing at all matched still comes back as a plain result with the reasons attached, exactly as before.
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!
yarn nx run-many -t compile.test-storybooks/mcp, runyarn installand thenyarn storybook. The MCP endpoint comes up athttp://localhost:6006/mcp.run-story-testsfor a component that has stories. The pass/fail summary, the failure details and the accessibility section should read as they did before.@storybook/addon-vitestfrom the addons list in that Storybook's configuration while leaving the package installed, restart, and confirm the tool no longer appears in the tool list at all. Put it back and confirm it returns.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.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake 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>