Skip to content

Allow storybook canaries#212

Open
yannbf wants to merge 4 commits intomainfrom
yann/allow-canaries
Open

Allow storybook canaries#212
yannbf wants to merge 4 commits intomainfrom
yann/allow-canaries

Conversation

@yannbf
Copy link
Copy Markdown
Member

@yannbf yannbf commented Apr 8, 2026

This PR extends the storybook package range to allow for 0.0.0 (canary) versions as well

Copilot AI review requested due to automatic review settings April 8, 2026 12:37
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: c652029

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@storybook/addon-mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for storybook-mcp-self-host-example canceled.

Name Link
🔨 Latest commit c652029
🔍 Latest deploy log https://app.netlify.com/projects/storybook-mcp-self-host-example/deploys/69d64d87c68c870008cedfc0

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 8, 2026

npm i https://pkg.pr.new/storybookjs/mcp/@storybook/addon-mcp@212
npm i https://pkg.pr.new/storybookjs/mcp/@storybook/mcp@212

commit: c652029

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
452 3 449 0
View the full list of 3 ❄️ flaky test(s)
apps/internal-storybook/tests/mcp-composition.e2e.test.ts > MCP Composition E2E Tests > Multi-Source Documentation > should list documentation from both local and remote sources

Flake rate in main: 9.09% (Passed 10 times, Failed 1 times)

Stack Traces | 0.616s run time
AssertionError: expected '# Components\n\n- Button (example-but…' to contain '# Local'

- Expected
+ Received

- # Local
+ # Components
+
+ - Button (example-button): A customizable button component for user interactions.
+ - Header (header)
+ - Page (page)
+ - Card (other-ui-card): Card component with title, image, content, and action button
+
+ # Docs
+
+ - getting-started (getting-started--docs): # Getting Started This is the getting started documentation of this design system. ## Usag...

 ❯ tests/mcp-composition.e2e.test.ts:54:17
apps/internal-storybook/tests/mcp-composition.e2e.test.ts > MCP Composition E2E Tests > Multi-Source Documentation > should require storybookId in multi-source mode

Flake rate in main: 9.09% (Passed 10 times, Failed 1 times)

Stack Traces | 0.339s run time
Error: Snapshot `MCP Composition E2E Tests > Multi-Source Documentation > should require storybookId in multi-source mode 1` mismatched

- Expected
+ Received

  {
    "content": [
      {
-       "text": "Invalid arguments for tool get-documentation: [{"kind":"schema","type":"object","expected":"\"storybookId\"","received":"undefined","message":"Invalid key: Expected \"storybookId\" but received undefined","path":[{"type":"object","origin":"key","input":{"id":"example-button"},"key":"storybookId"}]}]",
+       "text": "# Button
+
+ ID: example-button
+
+ Primary UI component for user interaction
+
+ ## Stories
+
+ ### Primary
+
+ Story ID: example-button--primary
+
+ ```
+ import { Button } from "@my-org/my-component-library";
+
+ const Primary = () => <Button onClick={fn()} primary label="Button" />;
+ ```
+
+ ### Secondary
+
+ Story ID: example-button--secondary
+
+ ```
+ import { Button } from "@my-org/my-component-library";
+
+ const Secondary = () => <Button onClick={fn()} label="Button" />;
+ ```
+
+ ### Large
+
+ Story ID: example-button--large
+
+ ```
+ import { Button } from "@my-org/my-component-library";
+
+ const Large = () => <Button onClick={fn()} size="large" label="Button" />;
+ ```
+
+ ### Other Stories
+
+ - Small (example-button--small)
+ - With A 11 Y Violation (example-button--with-a-11-y-violation)
+
+ ## Props
+
+ ```
+ export type Props = {
+   /**
+     Is this the principal call to action on the page?
+   */
+   primary?: boolean = false;
+   /**
+     What background color to use
+   */
+   backgroundColor?: string;
+   /**
+     How large should the button be?
+   */
+   size?: 'small' | 'medium' | 'large' = 'medium';
+   /**
+     Button contents
+   */
+   label: string;
+   /**
+     Optional click handler
+   */
+   onClick?: () => void;
+ }
+ ```
+
+ ## Docs
+
+ ### Additional Information
+
+ import { Meta, Canvas } from '@storybook/addon-docs/blocks';
+ import * as ButtonStories from './Button.stories';
+
+ <Meta of={ButtonStories} name="Additional Information" />
+
+ It is critical when using the Button component, that the string passed to the `label` prop uses the 🍌-emoji instead of spaces.
+
+ Here is the button:
+
+ <Canvas of={ButtonStories.Primary} />",
        "type": "text",
      },
    ],
-   "isError": true,
  }

 ❯ tests/mcp-composition.e2e.test.ts:212:28
apps/internal-storybook/tests/mcp-composition.e2e.test.ts > MCP Composition E2E Tests > Tools Schema > should include storybookId parameter in get-documentation schema

Flake rate in main: 9.09% (Passed 10 times, Failed 1 times)

Stack Traces | 0.0084s run time
AssertionError: expected { id: { type: 'string', …(1) } } to have property "storybookId"
 ❯ tests/mcp-composition.e2e.test.ts:244:46

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the supported Storybook peer dependency range for @storybook/addon-mcp to allow installing against Storybook canary builds (0.0.0-*).

Changes:

  • Expand storybook peer dependency range to include ^0.0.0-0 (canary versions).
  • Expand @storybook/addon-vitest peer dependency range to include ^0.0.0-0 (canary versions).

Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
Copilot AI review requested due to automatic review settings April 8, 2026 12:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (3)
  • apps/internal-storybook/pnpm-lock.yaml: Language not supported
  • eval/pnpm-lock.yaml: Language not supported
  • packages/addon-mcp/pnpm-lock.yaml: Language not supported

Comment on lines 8 to +18
catalog:
'@storybook/addon-a11y': 10.4.0-alpha.7
'@storybook/addon-docs': 10.4.0-alpha.7
'@storybook/addon-vitest': 10.4.0-alpha.7
'@storybook/react-vite': 10.4.0-alpha.7
'@storybook/addon-themes': 10.4.0-alpha.7
'@storybook/addon-a11y': 10.4.0-alpha.8
'@storybook/addon-docs': 10.4.0-alpha.8
'@storybook/addon-vitest': 10.4.0-alpha.8
'@storybook/react-vite': 10.4.0-alpha.8
'@storybook/addon-themes': 10.4.0-alpha.8
'@tmcp/adapter-valibot': ^0.1.5
'@tmcp/transport-http': ^0.8.5
'@tmcp/transport-stdio': ^0.4.2
eslint-plugin-storybook: 10.4.0-alpha.7
storybook: 10.4.0-alpha.7
eslint-plugin-storybook: 10.4.0-alpha.8
storybook: 10.4.0-alpha.8
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description focuses on allowing Storybook canary versions via peer dependency ranges, but this file also bumps the pinned Storybook-related catalog versions (10.4.0-alpha.7 → 10.4.0-alpha.8). If the version bump is intentional, please call it out in the PR description (or split it into a separate PR) since it can change local/dev and E2E behavior independently of the canary-range change.

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Bundle Report

Changes will decrease total bundle size by 112.27kB (-100.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@storybook/mcp-esm (removed) -44.75kB (-100.0%) ⬇️
@storybook/addon-mcp-esm (removed) -67.52kB (-100.0%) ⬇️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants