[pull] next from storybookjs:next#863
Merged
Merged
Conversation
…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>
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>
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>
Adds the ai-command telemetry event (success / interceptReason / duration)
fired once per "storybook ai <command>" invocation, wraps the passthrough
action in withTelemetry for boot/canceled/error reporting, and identifies
the CLI on the MCP connection via an initialize handshake carrying
clientInfo { name: storybook-cli, version } so addon-mcp server-side
tool:* events can segment CLI traffic.
Closes #35131
…ain config Like init, pass fallbackTelemetryState: true so running storybook ai from a directory without a Storybook still reports the no-instance intercept - that wrong-cwd case is precisely the data the event exists to capture. Explicit opt-outs (env var, flag, loadable core.disableTelemetry) still apply.
…n event delivery Review findings on #35138: - core.disableTelemetry now resolves from the --cwd target project (both flag positions) by deriving cliOptions.configDir, instead of always reading the invoking cwd's config. Verified both directions manually. - The telemetry-only initialize handshake budget drops from 10s to 3s so a hung server cannot meaningfully delay the real command. - ai-command now fires even when writing the --output file fails after the command executed (try/finally), keeping the once-per-executed-command contract; output is still printed before telemetry is sent.
… --cwd scan Follow-up review findings on #35138: - telemetry('ai-command', ...) now passes the target configDir so event metadata describes the same project the opt-out was resolved from. - The target cwd for opt-out resolution is found with a lenient --cwd-only token scan (scanCwdToken) instead of the full arg parser, so invocations rejected as invalid-arguments still honor the target's core.disableTelemetry.
Disabling react-docgen __docgenInfo injection when experimentalDocgenServer is on belongs with the docs-block service consumption (it's the other half of the same swap). Without the consumer, dropping injection regresses argTypes and descriptions in any Storybook with the flag enabled (including our internal one). Move both preset early-returns to the UI consumption PR. Co-authored-by: Cursor <cursoragent@cursor.com>
Docgen: Register service runtime, payload argTypes, and bundler guardrails
…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.
CLI: Add telemetry for the `storybook ai <command>` passthrough
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )