Skip to content

Conversation

@JReinhold
Copy link
Contributor

storybookjs/storybook#32882 introduces name to errors. This updates the validation to include that.

Copilot AI review requested due to automatic review settings October 30, 2025 12:58
@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

🦋 Changeset detected

Latest commit: f5b610d

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

This PR includes changesets to release 2 packages
Name Type
@storybook/mcp Patch
@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

@JReinhold JReinhold marked this pull request as draft October 30, 2025 12:58
@JReinhold JReinhold changed the title Update-format Support name in manifest errors Oct 30, 2025
@codecov
Copy link

codecov bot commented Oct 30, 2025

Bundle Report

Changes will increase total bundle size by 215 bytes (0.57%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@storybook/mcp-esm 20.16kB 215 bytes (1.08%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: @storybook/mcp-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.js 23 bytes 13.2kB 0.17%
index.d.ts 192 bytes 6.97kB 2.83%

Files in index.js:

  • ./src/types.ts → Total Size: 756 bytes

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.56%. Comparing base (77536a7) to head (f5b610d).
⚠️ Report is 1 commits behind head on next.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             next      #55      +/-   ##
==========================================
+ Coverage   82.20%   82.56%   +0.35%     
==========================================
  Files          15       15              
  Lines         843      843              
  Branches      159      162       +3     
==========================================
+ Hits          693      696       +3     
+ Misses        142      139       -3     
  Partials        8        8              

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

Copy link
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

This PR adds support for handling error states in component manifests by updating the schema to include an error name field and adding comprehensive test coverage for various error scenarios.

Key Changes:

  • Added name field to the error object schema in component and example manifests
  • Created a new test fixture (with-errors.fixture.json) demonstrating five different error scenarios
  • Added test cases verifying that components and examples with errors are handled gracefully (skipped when rendering)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/mcp/src/types.ts Added name field to error object schema for better error identification
packages/mcp/fixtures/with-errors.fixture.json New test fixture with realistic error scenarios including mixed success/error states
packages/mcp/src/utils/format-manifest.test.ts Added comprehensive tests verifying error handling behavior in formatting functions
packages/mcp/src/utils/error-to-mcp-content.test.ts Reformatted multi-line constructor call to single line

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 30, 2025

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

commit: f5b610d

@JReinhold JReinhold changed the base branch from main to next October 30, 2025 13:40
@JReinhold JReinhold marked this pull request as ready for review October 31, 2025 10:01
Copilot AI review requested due to automatic review settings October 31, 2025 10:01
Copy link
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 5 out of 5 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings October 31, 2025 21:12
Copy link
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 6 out of 6 changed files in this pull request and generated 4 comments.

@JReinhold JReinhold merged commit cddbf34 into next Oct 31, 2025
14 checks passed
@JReinhold JReinhold deleted the update-format branch October 31, 2025 21:23
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