Skip to content

Support Storybook 11 and CSF Next - #17

Merged
Guria merged 1 commit into
mainfrom
t3/storybook-11-addon-migration
Oct 8, 2026
Merged

Guria merged 1 commit into
mainfrom
t3/storybook-11-addon-migration

Conversation

@Guria

@Guria Guria commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #14.

  • Develop against Storybook 11.0.0-alpha.4, the current next release, with the updated lockfile.
  • Add the default kahraman() factory using definePreviewAddon, following Addon Kit. CSF Next previews can register addons: [kahraman()] and get typed parameters.kahraman.
  • Keep all named actor/locator exports and the object-style kahraman/preview annotation. Diagnostics stay opt-in.
  • Explicitly support Storybook 9, 10, and 11, including the 11 prerelease, and raise the package's Node.js requirement to 22.12.
  • Run the full CI checks on Node 22 and 24, with separate compatibility jobs for Storybook 9.1.20 and 10.6.1.
  • Update installation/development docs, add a minor changeset, and regenerate the jsrepo manifest so vendored actor code includes its new preview dependency and addon tests.

Migration scope

This repository has no local .storybook instance, renderer dependency, stories, manager UI, or preset. There is no local Storybook build to migrate, and the removed manager APIs do not apply. The existing ESM build, TypeScript 7, Vite 8, and Vitest 4 already meet the relevant tool requirements. The release workflow already uses OIDC trusted publishing.

Reviewed the addon migration guide, Storybook migration guide, and Addon Kit factory implementation.

Validation

  • Full repository CI task passed on Node 24.21.0 with Storybook 11.0.0-alpha.4: typecheck, lint, fallow, format, all 43 tests, build, publint, are-the-types-wrong, and registry freshness.
  • The equivalent full check sequence passed on Node 22.23.3 with Storybook 11.0.0-alpha.4.
  • Typecheck, all 43 tests, build, and are-the-types-wrong passed separately with Storybook 9.1.20 and 10.6.1.
  • Built-entrypoint smoke tests passed on Storybook 9 and 10, checking factory composition, the legacy annotation, and named exports.
  • pnpm install --frozen-lockfile and git diff --check passed.

The new tests use real Storybook composition and Testing Library configuration APIs, without mocks. They do not render stories or exercise browser DOM interactions; that remains the existing consumer-owned test boundary.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a849ee3a-4e85-4004-8295-f0707953f337
📥 Commits

Reviewing files that changed from the base of the PR and between 86e3c77 and 819acb9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • .changeset/storybook-11.md
  • .github/workflows/ci.yml
  • README.md
  • jsrepo.config.ts
  • package.json
  • registry.json
  • src/index.ts
  • test/addon.test.ts
  • vite.config.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/kahraman@17

commit: 819acb9

@Guria
Guria requested a balanced review from Copilot October 8, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The factory follows Storybook’s established API and the supported versions, exports, documentation, registry, and tests are consistently updated.

0 open findings

What changed in this PR

Adds Storybook 11 and CSF Next support while retaining compatibility with Storybook 9 and 10.

Changes:

  • Adds a typed kahraman() preview-addon factory.
  • Updates Storybook, Node.js requirements, tests, CI, and documentation.
  • Regenerates jsrepo metadata and adds release notes.
File Description
src/​index.ts Exports the CSF Next addon factory.
test/​addon.test.ts Tests composition, typing, diagnostics, and legacy exports.
package.json Updates Storybook compatibility and Node.js requirements.
pnpm-lock.yaml Locks Storybook 11 alpha dependencies.
.github/​workflows/​ci.yml Tests Node 22/24 and Storybook 9/10 compatibility.
README.md Documents support and CSF Next setup.
vite.config.ts Updates test-scope commentary.
jsrepo.config.ts Includes addon tests in vendored sources.
registry.json Regenerates preview dependencies and test metadata.
.changeset/​storybook-11.md Records the minor release changes.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@Guria
Guria merged commit 41dc85e into main Oct 8, 2026
8 checks passed
@Guria
Guria deleted the t3/storybook-11-addon-migration branch October 8, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storybook 11 Support

2 participants