chore(atomic): enable Storybook Agentic Review (PoC) - #8185
Draft
y-lakhdar wants to merge 2 commits into
Draft
Conversation
Prerequisites for Storybook Agentic Review: - packages/atomic: storybook, web-components-vite, addon-a11y, addon-docs, addon-vitest, storybook-addon-pseudo-states -> 10.5.6; addon-mcp -> 0.7.0 (0.7.0 adds display-review / get-stories-by-component). - pnpm-workspace.yaml: exempt storybook-addon-pseudo-states from minimumReleaseAge, consistent with the rest of the Storybook cohort. - Patch storybook@10.5.6: add extensionAlias to the change-detection oxc-resolver so '.js' specifiers resolve to '.ts'/'.tsx' sources (TS bundler/nodenext). Without it, story->component edges are dropped and get-changed-stories/get-stories-by-component cannot map Atomic components to their stories. Temporary workaround until fixed upstream.
Turn on Agentic Review in packages/atomic/.storybook/main.ts:
- features.changeDetection + features.experimentalReview (the latter gates
the MCP display-review tool and the in-Storybook review UI).
- Register @storybook/addon-mcp with endpoint '/mcp' and toolsets
{ dev: true, test: true, docs: false }. The docs/manifest toolset is
React-only, so it stays off for the Web Components renderer.
Dev-tooling only; the published @coveo/atomic package is unchanged.
|
⛔ Snyk checks have failed. 68 issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira
N/A — proof of concept.
Motivation
Evaluate Storybook Agentic Review for
@coveo/atomic, which is a Web Components (Vite) Storybook. The feature requires Storybook ≥ 10.5 and@storybook/addon-mcp≥ 0.7.0, and Storybook currently markets its MCP/AI capabilities as React-first — so this PoC verifies whether the review loop actually works on the Web Components renderer before any wider investment.Changes
@storybook/addon-mcpto 0.7.0 (addsdisplay-review/get-stories-by-component).features.changeDetection+features.experimentalReview, and registeraddon-mcpwithendpoint: '/mcp'and toolsets{ dev: true, test: true, docs: false }(the docs/manifest toolset is React-only).storybook-addon-pseudo-statesfromminimumReleaseAge, consistent with the rest of the Storybook cohort.storybook@10.5.6(patches/): addextensionAliasto the change-detectionoxc-resolverso.jsimport specifiers resolve to.ts/.tsxsources (TSbundler/nodenext). Without it, story→component edges are dropped andget-changed-stories/get-stories-by-componentcannot map Atomic components to their stories. Temporary workaround until fixed upstream (companion issue to be filed onstorybookjs/storybook).Validation
Verified locally by driving the MCP endpoint (
http://localhost:4400/mcp) over JSON-RPC — the same protocol an MCP client uses:display-reviewpublishes a review (returns areviewUrl) and rejects fabricated story IDs (live-index validation); the review page renders in the manager UI.run-story-testspasses for the sampled story.get-changed-stories/get-stories-by-componentresolve Atomic components to their stories — story→component graph edges went from 7 → 1628 across the library.Confirmed limitation — blank Agentic Review thumbnails
Atomic interface stories initialize the Headless engine and execute their mocked search in
play; without that work, theirbindingGuard-protected components render nothing. Storybook review cards are blank for these stories:iframe.html?...&embed=true&freeze=finished;embed=truesuppressesplay.embedwhile retainingfreeze;playran and the card iframe DOM contained the expected Atomic components, but the card raster was still blank.This is a Storybook review-thumbnail/freeze timing limitation, not an Atomic rendering or MSW issue. Review navigation/click-through, MCP test execution, ID validation, change detection, and publication work; the at-a-glance thumbnail grid is not usable for play/async-initialized Atomic stories. Existing Chromatic and CI gates remain authoritative visual evidence.
@coveo/atomicshipped codeChecklist
chore(<scope>): <description>).storybook, devDependencies, root patch); nothing in the published package (dist/,custom-elements.json,docs/,licenses/) changes.Note
Draft / PoC. Agentic Review and MCP are experimental in Storybook; the
storybook@10.5.6patch is version-pinned and will intentionally fail to apply on the next Storybook upgrade (a signal to drop it once the upstream fix lands). Existing gates (Vitest, a11y reporter, Playwright, Chromatic) remain authoritative.