Skip to content

PER-8973 feat: carry per-snapshot Storybook story metadata to the API - #2374

Open
Shivanshu-07 wants to merge 1 commit into
masterfrom
feat/per-8973-snapshot-storybook-metadata
Open

PER-8973 feat: carry per-snapshot Storybook story metadata to the API#2374
Shivanshu-07 wants to merge 1 commit into
masterfrom
feat/per-8973-snapshot-storybook-metadata

Conversation

@Shivanshu-07

Copy link
Copy Markdown
Contributor

Summary

  • Adds an optional storybook {id, args, globals} property to the snapshot schema (/snapshot#/$defs/common) so SDK-attached story identity survives /snapshot and /snapshot/dom validation instead of being scrubbed as an unknown property
  • client.createSnapshot forwards it as a storybook snapshot attribute

Attached by @percy/storybook (companion SDK change) and persisted by percy-api (percy/percy-api#6506) so the review UI can deep-link the hosted Storybook bundle to the exact captured variant — including args/globals state like args=primary:!false.

Testing

  • packages/client payload test extended with the new attribute; remaining exact-body assertions updated for the storybook: null default
  • Schema validated directly: valid metadata survives /snapshot/dom, invalid shapes are scrubbed

🤖 Generated with Claude Code

Adds an optional snapshot property storybook {id, args, globals} to the
snapshot schema (so SDK-attached story identity survives validation) and
sends it as a snapshot attribute from client.createSnapshot. Attached by
@percy/storybook so the review UI can deep-link the hosted bundle to the
exact captured variant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Shivanshu-07
Shivanshu-07 requested a review from a team as a code owner August 7, 2026 05:43
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.

1 participant