Repository navigation
Agentic Review [3]: Add /review/ generic route and rename review namespace - #35220
Conversation
| const location = R.useLocation(); | ||
| const { path: pathFromQuery, singleStory } = queryFromLocation(location); | ||
| const path = resolvePathQueryParam(location.search, pathFromQuery); | ||
| const { path = '', singleStory } = queryFromLocation(location); |
There was a problem hiding this comment.
🤖 AI note (Claude Code), not written by Yann: This revert (back to plain
queryFromLocation) is safe only because PR1 (#35218) single-sourcedcustomQueryParamsso a duplicatepath=can no longer be emitted (getCustomQueryParamsomitspath;buildNavigationUrlfilters it). If PR1 is reverted or only partially lands, the deletedresolvePathQueryParamguard must come back. That's the one cross-PR coupling to keep in mind when rebasing the stack.
fa89f91 to
0ef089d
Compare
ab9a58e to
bf62f59
Compare
0ef089d to
9beb182
Compare
bf62f59 to
4946ed5
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (2)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughTwo independent changes: the review addon namespace string is renamed from ChangesReview Addon ID Rename
Remove
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
9da9ee9 to
f26f113
Compare
91e8783 to
037a9fb
Compare
…ce to storybook/review - M6: delete the review-specific `resolvePathQueryParam` band-aid and revert the router's Location to plain `queryFromLocation`. PR1 made a duplicate `path=` query param unproducible (customQueryParams no longer carries `path`), so the guard is dead. `/review/` is now recognized by the same generic viewMode-prefix mechanism as /story//docs//settings/ instead of a hardcoded route allowlist. - Q7/Q1: rename the review namespace `storybook/addon-review` → `storybook/review` for the status type id (REVIEW_STATUS_TYPE_ID), the channel events, the page/ toolbar ids, and the sessionStorage keys, plus the two core clones (review-mode.ts, ReviewWidget.tsx). Core now owns the `storybook/review/*` ingest contract. The package name `@storybook/addon-review` is unchanged (distinct from the namespace). The external `@storybook/addon-mcp` producer must emit the new namespace in lockstep — see PR description. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
f26f113 to
867db42
Compare
037a9fb to
0ac0627
Compare
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 72 | 72 | 0 |
| Self size | 21.21 MB | 21.26 MB | 🚨 +50 KB 🚨 |
| Dependency size | 36.42 MB | 36.42 MB | 0 B |
| Bundle Size Analyzer | Link | Link |
@storybook/angular-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 0 | 31 | 🚨 +31 🚨 |
| Self size | 0 B | 25.14 MB | 🚨 +25.14 MB 🚨 |
| Dependency size | 0 B | 19.84 MB | 🚨 +19.84 MB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 204 | 204 | 0 |
| Self size | 802 KB | 821 KB | 🚨 +19 KB 🚨 |
| Dependency size | 91.56 MB | 91.62 MB | 🚨 +59 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 197 | 197 | 0 |
| Self size | 32 KB | 32 KB | 🚨 +36 B 🚨 |
| Dependency size | 90.05 MB | 90.10 MB | 🚨 +50 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 73 | 73 | 0 |
| Self size | 1.08 MB | 1.09 MB | 🚨 +10 KB 🚨 |
| Dependency size | 57.64 MB | 57.69 MB | 🚨 +50 KB 🚨 |
| Bundle Size Analyzer | node | node |
ff365ba
into
yann/agentic-review-mcp-integration
What I did
Two changes that promote review from an addon-routed page to a core-routed, core-namespaced feature. PR3 of a 5-PR stack, telescoping on PR2 (#35219) → PR1 (#35218) → #34837.
1.
/review/as a generic core route (M6 / Q6)resolvePathQueryParamfromrouter/utils.tsand reverted the router'sLocationto plainqueryFromLocation./story/,/docs/,/settings/prefixes to disambiguate a duplicatepath=query param. PR1 (Agentic Review [1]: Standalone review core quality fixes #35218) removed the root cause —customQueryParamsno longer carries a stalepath, andbuildNavigationUrlfilterspath— so a duplicatepath=is unproducible and the guard is dead code./review/is now recognized by the same genericviewMode-prefix mechanism as/story/,/docs/,/settings/(there is no central route registry;parsePathderivesviewMode: 'review'for free, and the Layout already treats any non-story/docs viewMode as a full-screen page). The route is owned by the router, not a review special case.2. Rename the namespace
storybook/addon-review→storybook/review(Q7 / Q1)REVIEW_STATUS_TYPE_ID, the channel events (PUSH_REVIEW/DISPLAY_REVIEW/REQUEST_REVIEW/REVIEW_STALE/DISMISS_REVIEW/REVIEW_DISMISSED), the page/toolbar ids, and the sessionStorage keys all move understorybook/review/*.review-mode.ts,ReviewWidget.tsx) and the test literal so the contract stays consistent across every emitter/listener.@storybook/addon-reviewis intentionally unchanged — it's distinct from the namespace string.Stack position
Base:
review-core/02-delete-compare(PR2, #35219).Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
For a maintainer:
cd code && yarn storybook:ui.@storybook/addon-mcp/ a producer emitting the newstorybook/review/*namespace — see coordination note). The review summary should load at/review/.path=, no canvas blanking), thereviewingsidebar status still appears, and prev/next + dismiss still work.reviewingstatus filter behaves under the renamed type idstorybook/review.storybook/addon-review/*namespace no longer displays — that breakage is expected and intentional.Documentation
src/constants.ts, which now carries the new namespace; no literal to update)Checklist for Maintainers
ci:normalqa:neededmaintenance🤖 Generated with Claude Code
Summary by CodeRabbit
storybook/reviewnamespace, keeping review event handling and persisted review-mode state consistent.pathquery resolution and instead derive location path inputs directly, which can change match behavior based on query parameters.