feat: enable componentManifest by default - #208
Conversation
🦋 Changeset detectedLatest commit: d0c2848 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
✅ Deploy Preview for storybook-mcp-self-host-example canceled.
|
commit: |
Codecov Report❌ Patch coverage is
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. |
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
Bundle ReportChanges will increase total bundle size by 62.98kB (127.76%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: @storybook/addon-mcp-esmAssets Changed:
Files in
view changes for bundle: @storybook/mcp-esmAssets Changed:
|
There was a problem hiding this comment.
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
featurespreset in@storybook/addon-mcpto enablecomponentsManifest. - Bump Storybook-related catalog versions from
10.4.0-alpha.2to10.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
| return { | ||
| ...existingFeatures, | ||
| componentsManifest: true, | ||
| }; |
There was a problem hiding this comment.
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.
| 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; |
| return { | ||
| ...existingFeatures, | ||
| componentsManifest: true, |
There was a problem hiding this comment.
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.
| return { | |
| ...existingFeatures, | |
| componentsManifest: true, | |
| const normalizedFeatures = existingFeatures ?? {}; | |
| const componentsManifest = normalizedFeatures.componentsManifest ?? true; | |
| return { | |
| ...normalizedFeatures, | |
| componentsManifest, |
There was a problem hiding this comment.
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
No description provided.