Skip to content

[pull] next from storybookjs:next#863

Merged
pull[bot] merged 19 commits into
GesuBackups:nextfrom
storybookjs:next
Jun 12, 2026
Merged

[pull] next from storybookjs:next#863
pull[bot] merged 19 commits into
GesuBackups:nextfrom
storybookjs:next

Conversation

@pull

@pull pull Bot commented Jun 12, 2026

Copy link
Copy Markdown

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 : )

JReinhold and others added 19 commits June 9, 2026 15:01
…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
@pull pull Bot locked and limited conversation to collaborators Jun 12, 2026
@pull pull Bot added the ⤵️ pull label Jun 12, 2026
@pull pull Bot merged commit ec3c2b9 into GesuBackups:next Jun 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants