Skip to content
This repository was archived by the owner on Sep 7, 2026. It is now read-only.

feat: enable componentManifest by default - #208

Merged
yannbf merged 5 commits into
mainfrom
yann/enable-manifest-by-default
Apr 2, 2026
Merged

feat: enable componentManifest by default#208
yannbf merged 5 commits into
mainfrom
yann/enable-manifest-by-default

Conversation

@yannbf

@yannbf yannbf commented Mar 31, 2026

Copy link
Copy Markdown
Member

No description provided.

@changeset-bot

changeset-bot Bot commented Mar 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d0c2848

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 Minor

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

netlify Bot commented Mar 31, 2026

Copy link
Copy Markdown

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

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

@pkg-pr-new

pkg-pr-new Bot commented Mar 31, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/storybookjs/mcp/@storybook/addon-mcp@208
npm i https://pkg.pr.new/storybookjs/mcp/@storybook/mcp@208

commit: d0c2848

@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@70b5b23). Learn more about missing BASE report.
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/addon-mcp/src/preset.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #208   +/-   ##
=======================================
  Coverage        ?   74.00%           
=======================================
  Files           ?       42           
  Lines           ?     1185           
  Branches        ?      331           
=======================================
  Hits            ?      877           
  Misses          ?      193           
  Partials        ?      115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread packages/addon-mcp/src/preset.ts Outdated
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 62.98kB (127.76%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
@storybook/mcp-esm 44.75kB 513 bytes (1.16%) ⬆️
@storybook/addon-mcp-esm 67.52kB 62.46kB (1236.4%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: @storybook/addon-mcp-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
preset.js (New) 67.52kB 67.52kB 100.0% 🚀
preview-*.js (Deleted) -5.05kB 0 bytes -100.0% 🗑️

Files in preset.js:

  • ./src/preset.ts → Total Size: 4.89kB
view changes for bundle: @storybook/mcp-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.js 365 bytes 30.33kB 1.22%
index.d.ts 148 bytes 13.22kB 1.13%

Copilot AI review requested due to automatic review settings April 1, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables Storybook’s component manifest feature by default for @storybook/addon-mcp, and updates the repo’s Storybook prerelease dependency set accordingly.

Changes:

  • Add a features preset in @storybook/addon-mcp to enable componentsManifest.
  • Bump Storybook-related catalog versions from 10.4.0-alpha.2 to 10.4.0-alpha.6.
  • Refresh pnpm lockfiles to reflect the dependency updates.

Reviewed changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updates Storybook-related catalog versions to 10.4.0-alpha.6.
packages/addon-mcp/src/preset.ts Introduces a features preset that enables componentsManifest.
packages/addon-mcp/pnpm-lock.yaml Lockfile update for addon-mcp after Storybook bump.
eval/pnpm-lock.yaml Lockfile update for eval workspace after Storybook bump.
apps/internal-storybook/pnpm-lock.yaml Lockfile update for internal Storybook app after Storybook bump.
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 +171 to +174
return {
...existingFeatures,
componentsManifest: true,
};

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

The features preset currently forces componentsManifest: true regardless of what existingFeatures contains. That prevents consumers from opting out (e.g. if a user config or another preset explicitly sets componentsManifest: false). Consider treating this as a default (only enable when unset), and also account for the legacy experimentalComponentsManifest flag that getManifestStatus() still supports for older Storybook versions.

Suggested change
return {
...existingFeatures,
componentsManifest: true,
};
const result = {
...existingFeatures,
} as typeof existingFeatures & {
componentsManifest?: boolean;
experimentalComponentsManifest?: boolean;
};
const componentsManifest = existingFeatures?.componentsManifest as
| boolean
| undefined;
const experimentalComponentsManifest = (existingFeatures as any)
?.experimentalComponentsManifest as boolean | undefined;
if (typeof componentsManifest === 'boolean' && typeof experimentalComponentsManifest !== 'boolean') {
result.experimentalComponentsManifest = componentsManifest;
} else if (
typeof experimentalComponentsManifest === 'boolean' &&
typeof componentsManifest !== 'boolean'
) {
result.componentsManifest = experimentalComponentsManifest;
} else if (
typeof componentsManifest !== 'boolean' &&
typeof experimentalComponentsManifest !== 'boolean'
) {
result.componentsManifest = true;
result.experimentalComponentsManifest = true;
}
return result;

Copilot uses AI. Check for mistakes.
Comment on lines +171 to +173
return {
...existingFeatures,
componentsManifest: true,

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

New behavior is introduced via the features preset export, but there are no unit tests asserting its merge/override behavior (e.g., that it enables the manifest feature by default without clobbering an explicit user setting). Adding a focused test in preset.test.ts would help prevent regressions across Storybook versions.

Suggested change
return {
...existingFeatures,
componentsManifest: true,
const normalizedFeatures = existingFeatures ?? {};
const componentsManifest = normalizedFeatures.componentsManifest ?? true;
return {
...normalizedFeatures,
componentsManifest,

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 2, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 no new comments.

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

@yannbf
yannbf merged commit 599de1d into main Apr 2, 2026
19 checks passed
@yannbf
yannbf deleted the yann/enable-manifest-by-default branch April 2, 2026 11:59
@storybook-app-bot storybook-app-bot Bot mentioned this pull request Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants