Repository navigation
Skills M4 (3/9): run preview-stories on the shared stories toolset - #35729
valentinpalkovic wants to merge 1 commit into
Conversation
Serves the preview-stories tool from the shared stories toolset and deletes the hand-written implementation. Only the MCP app resource stays in the addon, since serving that HTML to the client is transport-level work rather than part of the tool call. The story selector's eval-tuned prose moves into core with it, and now names the documentation tools it points at from the frozen tool-name map instead of repeating the strings. Drops the picoquery dependency: the query-string builder that used it was the only consumer, and preview URLs are now built in core.
|
|
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 ignored due to path filters (1)
📒 Files selected for processing (14)
💤 Files with no reviewable changes (4)
WalkthroughThe preview-stories MCP tool moved from the addon into the shared stories toolset. The addon now registers only the preview resource. Shared logic adds review-aware descriptions, MCP formatting, telemetry, origin validation, and story input fields. ChangesPreview toolset migration
The addon package no longer includes Sequence Diagram(s)sequenceDiagram
participant MCPClient
participant ToolRegistry
participant StoriesPreview
participant PreviewFormatter
MCPClient->>ToolRegistry: Invoke stories.preview
ToolRegistry->>StoriesPreview: Resolve shared toolset method
StoriesPreview->>PreviewFormatter: Format resolved stories and errors
PreviewFormatter-->>MCPClient: Return MCP preview blocks
Possibly related issues
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
Closes #
Part 3 of 9 of the Skills M4 migration. Stacked on #35728, replaces #35677.
What I did
The preview-stories tool builds the URLs an agent hands back to a human so they can look at a story in the browser. It now runs on the shared stories toolset in core, and the hand-written implementation in the MCP addon is deleted. What stays behind there is only the small app resource that renders the preview inside the client, plus one dependency that the deletion made unnecessary.
The tool's input descriptions are carried over word for word. They are tuned for how models choose and fill this tool, so treat any wording difference in review as a bug rather than a cleanup.
This one is mostly deletion.
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.preview-storieswith a couple of story IDs. You should get one preview URL per story, in the same shape and order as before, and opening one of them in the browser should land on that story.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>