Release: Prerelease 10.5.0-alpha.7#35128
Open
github-actions[bot] wants to merge 99 commits into
Open
Conversation
…` parameter Introduced a useEffect hook to log a deprecation warning when the `viewport.defaultViewport` parameter is used, advising users to switch to the new `globals` configuration or use the automigrate tool. This change enhances the migration experience for users upgrading to Storybook 10.
…rails Wire preview/manager registration behind experimentalDocgenServer, add renderer- converted argTypes to the docgen payload, and skip preview __docgenInfo injection when the flag is enabled. Does not enable the flag by default. Co-authored-by: Cursor <cursoragent@cursor.com>
…abled Add Legacy/DocgenService splits for docs blocks and the manager Controls panel, mergeServiceArgTypes for layering custom argTypes at read time, and export getService for preview/manager consumers. Gated behind experimentalDocgenServer. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace useState/useEffect with useSyncExternalStore for tear-free, concurrent-safe reads of the core/docgen runtime. getDocgen reads state by reference, so snapshots stay Object.is-stable without an extra equality layer. Co-authored-by: Cursor <cursoragent@cursor.com>
The instance-type alias was declared twice (before and after docgenServiceDef), causing TS2300 duplicate identifier in the production dts build. Keep the declaration after the service def, matching ModuleGraphService. Co-authored-by: Cursor <cursoragent@cursor.com>
…_FEATURE_AI_CLI Generic passthrough that forwards `storybook ai <tool>` calls to the MCP server of the locally running Storybook via tools/call, plus an `ai list-tools` helper. Registry resolution (~/.storybook/instances), PID liveness, version check and repair instructions are copied from @storybook/mcp-proxy (storybookjs/mcp) so the CLI behaves like the proxy. Without STORYBOOK_FEATURE_AI_CLI, `storybook ai` is unchanged (setup only). Part of #35124
… error result addon-mcp (tmcp) returns unknown-tool failures as an isError tool result rather than a JSON-RPC error, so the unknown-tool listing must also check error results against tools/list.
…rough - exhaustive never guards on the status/reason switches - placeholder output when a tool returns no content - precise undefined check for JSON-RPC results - document why the registry dir constant and extra MCP statuses are duplicated - trim provenance prose from comments
TypeScript models `boolean` as `true | false`, so an optional boolean prop (`true | false | undefined`) fell through serializeType to `typeToString` as `boolean | undefined`, which downstream argType mapping treated as `other`. Collapse the boolean-literal pair back to `boolean`, and update the RCM extraction snapshots that captured the old output. Co-authored-by: Cursor <cursoragent@cursor.com>
…p the discovery surface Review follow-ups on #35125: - copy the current @storybook/mcp-proxy resolver: most-recently-started instance selection, optional --port targeting with a port-mismatch intercept, and version checks that prefer the registry record's storybookVersion over disk resolution (resolve.paths based lookup) - replace the list-tools subcommand with help: `storybook ai --help` appends the running Storybook's tool commands to the regular help, and `storybook ai <tool> --help` shows a tool's description and arguments - document the intentionally stateless JSON-RPC shortcut and add a request timeout so a hung server cannot stall the CLI - honor -o/--output for tool results instead of silently ignoring it
…elog CI: Add missing changelog entry following CI failure
Review feedback from #35125: use the repository's vi.mock(..., { spy: true }) convention instead of mock factories, and serialize the SSE fixture with indentation so the multi-line data: join branch is actually exercised.
…entation detail User-facing output no longer mentions tools or MCP: the help section is 'Storybook commands', errors say 'Storybook server', the usage line is 'ai [options] [command] [args...]', and repair instructions reference the addon without protocol jargon. Internal names keep Tool/MCP since the protocol is the implementation.
…orybookjs/storybook into kasper/ai-cli-mcp-passthrough
Restores parity with @storybook/mcp-proxy's registry schema instead of a hand-rolled type guard; valibot was already a monorepo dependency.
Found by a second thermo-nuclear review pass: the help path re-parsed from the pre-command options and dropped a token-provided --port. Both help entry points now delegate to one post-parse helper, the duplicated server-unreachable error is a single formatter, and the multi-instance warning says 'status' instead of 'mcp'.
The docgen service does not yet work in production builds, so keep the flag off for now. With it disabled, the docs blocks and controls panel route through the legacy extraction path and presets keep injecting __docgenInfo, so the normal non-experimental case is not regressed. Co-authored-by: Cursor <cursoragent@cursor.com>
- Use play-context canvas type in ArgTypes.stories instead of value-importing within - Assert service controls via rendered radio input, not arg name label text - Update StoryStore inline snapshots after argTypes fixture additions Co-authored-by: Cursor <cursoragent@cursor.com>
Make service-query snapshots pure for React, remove the server snapshot argument, and ensure service ControlsPanel still renders prepared custom argTypes when no service docgen payload exists. Also tidy ArgTypes docs/imports from review. Co-authored-by: Cursor <cursoragent@cursor.com>
ObjectControl initialized raw mode when it first mounted without data and never switched back after args/docgen arrived. Track the no-data to data transition and return to rich mode unless the user explicitly requested raw editing via Set object. Co-authored-by: Cursor <cursoragent@cursor.com>
…ument MCP-spec session flow Review feedback on #35138: - McpToolResultError accepts ErrorOptions and the call site attaches the tool's error text as `cause`. The message stays constant so telemetry error hashes remain aggregatable; the cause is uploaded path-sanitized and only with crash-reports consent (the standard sanitized error path). - Document that the Mcp-Session-Id flow is MCP Streamable HTTP spec behavior rather than a tmcp implementation detail, so swapping the server library in addon-mcp cannot break the CLI handshake.
When an object control first mounted without data it initialized raw mode and stayed there after args/docgen arrived. Switch back to rich mode for the automatic no-data to data transition, and cover the delayed-data case. Co-authored-by: Cursor <cursoragent@cursor.com>
The service ControlsPanel could render docgen rows before STORY_PREPARED updated custom argTypes/parameters, causing a brief full-table flicker before include or exclude filters arrived. Keep the ArgsTable skeleton visible until both the story is prepared and the docgen query has settled. Co-authored-by: Cursor <cursoragent@cursor.com>
…sper/ai-cli-bundled
CLI: Add telemetry for the `storybook ai <command>` passthrough
c5ae2b1 to
59042d0
Compare
`dirname(join(process.cwd(), configDir))` collapsed `--config-dir .` to the project's parent directory, mispointing story-glob resolution and the tsconfig/jsconfig lookup in detectLanguage. Taking dirname before resolving keeps root-level config dirs anchored to the project root. Pre-existing on next, surfaced by the move (CodeRabbit review on #35147).
…internal-ops-df57 Open Service: Mark module-graph engine commands as internal
Hand-written formatting frequently diverges from oxfmt, so make running `yarn fmt:write` from `code/` a mandatory post-edit step. Co-authored-by: Cursor <cursoragent@cursor.com>
Component comments parsed via the docgen service were collapsed onto a single line because comment-parser defaults to `compact` spacing, so multi-paragraph Markdown rendered as one heading. Parse the block description with `preserve` spacing (matching react-docgen's legacy `__docgenInfo`) while keeping a separate `compact` parse for tag values, and let the Description block fall back to the service description. Co-authored-by: Cursor <cursoragent@cursor.com>
59042d0 to
292002a
Compare
CLI: Bundle the `ai` command in core so it never downloads `@storybook/cli`
292002a to
bb81d25
Compare
…RROR_HANDLER global The bare PayloadErrorHandler name in typings.d.ts never resolved (declaration files are skipLibCheck'd), so the global was silently typed any. Export the type and reference it the same way as the other telemetry globals.
…ate-guard Telemetry: Preserve state machine when the module loads more than once
bb81d25 to
a4cdbc8
Compare
Replace renderControlsTables with a ControlsTables FC so table rendering follows the same component pattern as the rest of the Controls block. Co-authored-by: Cursor <cursoragent@cursor.com>
Docs: Route ArgTypes and Controls through docgen service when flag enabled
a4cdbc8 to
3abd22a
Compare
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.
This is an automated pull request that bumps the version from `10.5.0-alpha.6` to `10.5.0-alpha.7`.
Once this pull request is merged, it will trigger a new release of version `10.5.0-alpha.7`.
If you're not a core maintainer with permissions to release you can ignore this pull request.
To do
Before merging the PR, there are a few QA steps to go through:
And for each change below:
This is a list of all the PRs merged and commits pushed directly to `next`, that will be part of this release:
If you've made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with this workflow and wait for it to finish. It will wipe your progress in this to do, which is expected.
Feel free to manually commit any changes necessary to this branch after you've done the last re-generation, following the Make Manual Changes section in the docs, especially if you're making changes to the changelog.
When everything above is done:
Generated changelog
10.5.0-alpha.7