-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Agentic Review: Introduce Review addon #34837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yannbf
wants to merge
156
commits into
next
Choose a base branch
from
yann/agentic-review-mcp-integration
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
156 commits
Select commit
Hold shift + click to select a range
8454f12
feat(review-changes): base MCP-communication skeleton
yannbf 9dcf4c5
wip: Implement review changes screen based on latest designs
ghengeveld 2796543
update the schema
yannbf dee98db
Keep iframes mounted when collapsing
ghengeveld f6794b1
Refactor and improve grid to also work well at very large or very sma…
ghengeveld 297e53f
wip: Add review changes details screen
ghengeveld 8a01874
refactor(review-changes): reorganize component structure and remove u…
ghengeveld e3fcd45
revert
yannbf ebfe6a0
Fix React is not defined error
yannbf b3e479f
Revert "revert"
yannbf 53cc0a5
feat(review-changes): enhance ReviewChangesPage with location search …
ghengeveld 67d85aa
Merge pull request #34874 from storybookjs/addon-review-ui
yannbf ff2438b
Introduce design iteration
yannbf c4ba9bc
rename review-changes to review
yannbf 1ffd850
rename directory review-changes -> review
yannbf 5048ee6
small update
yannbf 5a0bf2b
Merge branch 'next' into yann/agentic-review-mcp-integration
yannbf b0dc746
Merge branch 'yann/agentic-review-mcp-integration' into agentic-revie…
yannbf 9841ebc
Refactor review addon: rename ReviewChangesPage to ReviewPage, update…
ghengeveld f23fa39
Rename `apply-review-state` to `display-review` and `request-review-s…
ghengeveld 7acc226
Type fixes
ghengeveld 6784d11
Refactor SummaryScreen component: remove TabsView, introduce TabPanel…
ghengeveld bf3a0fc
Fix background
ghengeveld 88a33ea
Apply review feedback, move logic from MCP to addon review, simplify …
yannbf 7964963
Fix invalid attribute
ghengeveld 62fc281
Load above-the-fold iframes immediately
ghengeveld 521a619
cleanup
yannbf 69c8397
fix failure
yannbf 6b2081f
Fix scrolling on tab panel content
ghengeveld dad96b8
Fix tab a11y
ghengeveld d5e328e
fix(code): add addon-review workspace dependency
Copilot 562f1b2
Handle review comments
ghengeveld b023b97
Fix lockfile
ghengeveld 9c4ac02
Merge pull request #34890 from storybookjs/agentic-review-design-iter…
yannbf ae386c9
Hide clear button on search input
ghengeveld 611c625
Remove filter icon from search field
ghengeveld 4af6305
Make collapsible headers sticky
ghengeveld 04389e2
Replace overly specific headline with a more generic one
ghengeveld 9d76add
Improve review URLs
ghengeveld e0259d1
Add review view state management and scroll restoration
ghengeveld ef2a641
Enhance CollectionGrid and SummaryScreen interactivity
ghengeveld 9cea581
Keep review summary mounted, simplify state handling, and add created…
ghengeveld 31a2813
Open Storybook with proper filters applied
ghengeveld b9ea603
Add a baseline-vs-latest comparison experience to the review details …
ghengeveld b677c0a
Fix React import
ghengeveld 6efe789
Implement story freezing and use it on the review summary screen
ghengeveld d4ec5a5
Set inert attribute on to-be-frozen previews
ghengeveld a3b2219
Freeze animations at the end
ghengeveld 9e7c63b
Serve storybook-static as review baseline if it exists, or fall back …
ghengeveld 2f20330
Prevent vscode from removing React imports
ghengeveld c061e09
Fix details iframe interactivity, track comparison mode in sessionSto…
ghengeveld a8584d2
Implement component to stories extraction
yannbf 28f97f4
Merge pull request #34974 from storybookjs/review-experiments-with-ch…
yannbf d3fdf3d
Show banner when review is stale
ghengeveld 700b464
Styling tweaks
ghengeveld 7b992ab
Fix story assertion
ghengeveld 3c6ae31
Addon Review: throttle, prioritize, and evict preview thumbnails
ghengeveld 4d331ed
Merge branch 'next' into yann/agentic-review-mcp-integration
yannbf a72a9b5
Fix review detail links from inactive summary tab
ghengeveld 0276205
Merge branch 'next' into yann/agentic-review-mcp-integration
yannbf 1984a81
Fix story test
ghengeveld 498473d
Fix ReviewPage Details story test
ghengeveld e0da866
Implement story freezing and use it on the review summary screen
ghengeveld 5dc9aba
Set inert attribute on to-be-frozen previews
ghengeveld a51e72e
Freeze animations at the end
ghengeveld d74b7f9
Address review comments on story freezer
ghengeveld 85b9e83
Fix story test
ghengeveld af28348
Merge remote-tracking branch 'origin/yann/agentic-review-mcp-integrat…
ghengeveld 40e1c24
Log swallowed source-file change listener errors
ghengeveld f7779c7
Merge branch 'yann/agentic-review-mcp-integration' into review-baseli…
yannbf 8fffe6e
Fix review screen story failures
ghengeveld 42403d1
Add timeout and deterministic error handling to baseline proxy
ghengeveld 82fe2df
Fix Minimal story test by removing assertion for unrendered branchName
ghengeveld 6a9120d
Address review comments on story freezer
ghengeveld 69045c5
Fix Details story to assert on rendered preview, drop dead branchName…
ghengeveld a177a6f
Merge remote-tracking branch 'origin/next' into yann/agentic-review-m…
ghengeveld 1a1558d
Address review comments and fix failing SummaryScreen story
ghengeveld fe08da0
Merge branch 'yann/agentic-review-mcp-integration' into review-baseli…
ghengeveld 0e154c1
Add "New" badge for stories absent from the baseline
ghengeveld b429288
Improve review detail screen baseline comparison UX
ghengeveld 43ba86f
Route review addon sessionStorage access through a guarded helper
ghengeveld 7a1c185
Show "New" badge for change-detection-flagged stories
ghengeveld 00094e5
Address review feedback: a11y, theme tokens, and safer URL parsing
ghengeveld 77c7d6b
Merge branch 'yann/agentic-review-mcp-integration' into review-baseli…
ghengeveld 959730b
Fix review addon story mocks
ghengeveld 3d06003
Restore chevron as the accessible collapse/expand control
ghengeveld 3dde2f8
Move focus to detail back button and make summary inert
ghengeveld 420e202
Focus detail title heading on entry instead of back button
ghengeveld 52e8d0a
Add focus ring to the review search field
ghengeveld ba13907
Restore chevron as the accessible collapse/expand control
ghengeveld 92d9e51
Redesign review screens with shared header and responsive grid
ghengeveld 5e78b54
Tweak style and wording
ghengeveld 82aea67
Add copy prompt button to stale review banner
ghengeveld d3f526e
Merge pull request #34926 from storybookjs/review-baseline-comparison
ghengeveld 02105aa
Merge branch 'yann/agentic-review-mcp-integration' into freeze-previe…
ghengeveld 85dde58
Merge branch 'yann/agentic-review-mcp-integration' into review-layout…
ghengeveld 1f8263e
Maintenance: Fix TypeScript error in setupStoryFreezer test
ghengeveld 161997f
Merge remote-tracking branch 'origin/freeze-preview-iframes' into ifr…
ghengeveld b6c155f
Fix stale review banner story tests
ghengeveld 9cdea17
Merge remote-tracking branch 'origin/yann/agentic-review-mcp-integrat…
ghengeveld 59dd78b
Merge pull request #34989 from storybookjs/iframe-performance-enhance…
ghengeveld 76d7f43
Merge pull request #34939 from storybookjs/freeze-preview-iframes
ghengeveld fe73046
Merge remote-tracking branch 'origin/yann/agentic-review-mcp-integrat…
ghengeveld 9780555
Merge branch 'yann/agentic-review-mcp-integration' into stale-review-…
ghengeveld 8c63cfe
Merge pull request #35051 from storybookjs/review-layout-updates
ghengeveld 1d1490c
Merge remote-tracking branch 'origin/yann/agentic-review-mcp-integrat…
ghengeveld bef69a8
Merge pull request #34981 from storybookjs/stale-review-banner
ghengeveld 9870a80
Convert ReviewPage to .tsx with JSX
ghengeveld b52f7b9
Extract baseline comparison iframe sync into a hook
ghengeveld bd8c56e
Consolidate "newly added" resolution into one selector
ghengeveld bf604c7
Single-source the baseline route and preview URL contracts
ghengeveld 33d868e
Remove dead review-addon code
ghengeveld 7ca6547
Make review baseline origin configurable via env
ghengeveld 8e18c2e
Tidy review addon helpers
ghengeveld 8641dd6
Clarify the preview inert gate vs the freeze gate
ghengeveld a50d3d8
Reorder DetailsScreen import to satisfy formatter
ghengeveld 215e415
Fall back to setTimeout when queueMicrotask is unavailable in story f…
ghengeveld 84fa5cf
Restore freezer-mutated globals and injected styles between tests
ghengeveld c4a85d5
Restore local baseline serving and keep review staleness server-autho…
ghengeveld 0184b33
Clear stale baseline state and keep latest preview visible without a …
ghengeveld 3991539
Harden review grid ref typing, clipboard copy, and collection toggle …
ghengeveld 4008669
Keep review detail previews interactive by making freeze opt-in
ghengeveld 00bc383
Fix review grid Frame ref type for polymorphic anchor/div element
ghengeveld 68ba81e
Retrigger CI after svelte sandbox port 6006 EADDRINUSE flake
ghengeveld 44ebd87
Trim verbose preview-margin comment in review grid
ghengeveld 5cca135
Rename pumpPreviewQueue to startQueuedPreviews for clarity
ghengeveld a725efa
Drop noisy StoryInfo doc comment in review grid
ghengeveld 83952dd
Trim band comment and explain fractional grid breakpoints
ghengeveld 8e6ba7f
Give review search highlight a marker look
ghengeveld e5042ef
Extract Highlight and Mark into their own component file
ghengeveld 15a290d
Require resolved StoryInfo in review grid and skip invalid stories
ghengeveld 067f3d4
Remove explanatory comments from ReviewHeader
ghengeveld c2d2548
Drop unnecessary minWidth from ReviewHeader subtitle
ghengeveld a7ead56
Remove unused server-side git branch resolution from review addon
ghengeveld 50272f7
Use api.getStoryHrefs for review previews and links
ghengeveld 9426ad3
Configure review baseline via a single validated env var
ghengeveld f79f74b
Document STORYBOOK_REVIEW_BASELINE env var in review addon README
ghengeveld e23586a
Drop unnecessary review story-id normalization
ghengeveld 1ff5a2a
Inline NEW status value and fix inaccurate New-badge comments
ghengeveld 9c5a693
Revert unintended GuidePage heading change
ghengeveld 2977f3c
Fix SummaryScreen stories
ghengeveld 6cb6e4e
Merge branch 'next' into yann/agentic-review-mcp-integration
ghengeveld 38d35f3
Show copy prompt and view storybook buttons on waiting screen
ghengeveld 24fd698
Merge branch 'next' into yann/agentic-review-mcp-integration
ghengeveld ae8aa27
Fix scroll windowing and highlight style
ghengeveld 7c98b02
Revert config change
ghengeveld 164898e
Reuse shared useCopyButton in the review addon.
ghengeveld 3166dc4
Rename Highlight search variables for readability.
ghengeveld 56b01e4
Remove leftover comment
ghengeveld 6edd68c
Add docblock to explain server-side baseline handling
ghengeveld c1c4ba3
Ignore iframes in Chromatic VRT
ghengeveld 74778b0
Merge branch 'next' into yann/agentic-review-mcp-integration
ghengeveld 1c8975f
Change default comparison mode to 1up
ghengeveld e9d6067
Fix CopyButton typing and align DetailsScreen baseline story tests wi…
ghengeveld b116472
Merge branch 'next' into yann/agentic-review-mcp-integration
yannbf df272c8
Review: Detect stale reviews via core/module-graph open service
yannbf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # @storybook/addon-review | ||
|
|
||
| Renders an agent-pushed review of a code change inside Storybook. | ||
|
|
||
| An ADE agent pushes a review payload via the companion MCP server | ||
| (`@storybook/addon-mcp`); the dev server enriches it with the current git | ||
| branch, caches it, and broadcasts it over the Storybook channel. This addon's | ||
| page receives the payload (and requests a replay on mount so late or refreshed | ||
| tabs catch up) and renders it as a dedicated review experience: | ||
|
|
||
| - **Summary** — the review title and narrative, with the affected stories | ||
| grouped into Collections (agent-curated clusters) or by Components, plus | ||
| search and expand/collapse. | ||
| - **Details** — a focused, full-screen story preview with previous/next | ||
| navigation through the reviewed stories and a link back to the summary. | ||
|
|
||
| ## Channel contract | ||
|
|
||
| Event names live in `src/constants.ts` and are the cross-repo contract with | ||
| `@storybook/addon-mcp`. They must match the emitter's constants exactly. | ||
|
|
||
| - `…/push-review` — agent → server: a new review payload. | ||
| - `…/display-review` — server → tabs: broadcast a review (`createdAt`-stamped). | ||
| - `…/request-review` — tab → server: replay the cached review (on mount). | ||
|
|
||
| ## Review state shape | ||
|
|
||
| See `src/review-state.ts`. It is a duplicate of the canonical valibot schema | ||
| that lives in the MCP addon; this side only renders, so it needs the type, not | ||
| the validator. | ||
|
|
||
| ## Baseline comparison | ||
|
|
||
| The detail screen can render the reviewed story side-by-side against a baseline | ||
| Storybook. The baseline source is configured with a single environment variable: | ||
|
|
||
| ```sh | ||
| STORYBOOK_REVIEW_BASELINE=... | ||
| ``` | ||
|
|
||
| It accepts either of: | ||
|
|
||
| - **A project-relative path to a static build** (e.g. `storybook-static`). The | ||
| directory is served directly. Paths must stay inside the project — absolute | ||
| paths and paths that escape the working directory via `..` are rejected. | ||
| - **A remote origin URL** (e.g. `https://my-app.chromatic.com`). Requests are | ||
| proxied to that origin. | ||
|
|
||
| The dev server exposes the baseline under an internal proxy path, so baseline | ||
| previews and the baseline index load from the same origin as Storybook. If the | ||
| variable is unset, or is neither a valid relative path nor a valid URL, no | ||
| baseline is served (a warning is logged for invalid values) and the comparison | ||
| controls stay hidden. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import type { BuildEntries } from '../../../scripts/build/utils/entry-utils.ts'; | ||
|
|
||
| const config: BuildEntries = { | ||
| entries: { | ||
| browser: [ | ||
| { | ||
| exportEntries: ['.'], | ||
| entryPoint: './src/index.ts', | ||
| }, | ||
| { | ||
| exportEntries: ['./manager'], | ||
| entryPoint: './src/manager.tsx', | ||
| dts: false, | ||
| }, | ||
| ], | ||
| node: [ | ||
| { | ||
| exportEntries: ['./preset'], | ||
| entryPoint: './src/preset.ts', | ||
| dts: false, | ||
| }, | ||
| ], | ||
| }, | ||
| }; | ||
|
|
||
| export default config; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './dist/manager.js'; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "name": "@storybook/addon-review", | ||
| "version": "10.5.0-alpha.5", | ||
| "description": "Storybook addon that renders agent-pushed reviews", | ||
| "keywords": [ | ||
| "storybook", | ||
| "storybook-addon", | ||
| "review", | ||
| "mcp", | ||
| "agent" | ||
| ], | ||
| "homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/review", | ||
| "bugs": { | ||
| "url": "https://github.com/storybookjs/storybook/issues" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/storybookjs/storybook.git", | ||
| "directory": "code/addons/review" | ||
| }, | ||
| "funding": { | ||
| "type": "opencollective", | ||
| "url": "https://opencollective.com/storybook" | ||
| }, | ||
| "license": "MIT", | ||
| "type": "module", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "code": "./src/index.ts", | ||
| "default": "./dist/index.js" | ||
| }, | ||
| "./manager": "./dist/manager.js", | ||
| "./package.json": "./package.json", | ||
| "./preset": "./dist/preset.js" | ||
| }, | ||
| "files": [ | ||
| "dist/**/*", | ||
| "README.md", | ||
| "*.js", | ||
| "*.d.ts", | ||
| "!src/**/*" | ||
| ], | ||
| "devDependencies": { | ||
| "http-proxy-middleware": "^4.0.0", | ||
| "react": "^18.2.0", | ||
| "react-dom": "^18.2.0", | ||
| "sirv": "^2.0.4", | ||
| "typescript": "^5.9.3" | ||
| }, | ||
| "peerDependencies": { | ||
| "storybook": "workspace:^" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "storybook": { | ||
| "displayName": "Review", | ||
| "unsupportedFrameworks": [ | ||
| "react-native" | ||
| ] | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './dist/preset.js'; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "addon-review", | ||
| "$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
| "projectType": "library", | ||
| "targets": { | ||
| "compile": {}, | ||
| "check": {} | ||
| }, | ||
| "tags": ["library"] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.