4486 Commits
Author SHA1 Message Date
Ari Perkkiö 7c171804b7 build: remove test runner from ci and sandboxes 2026-09-29 10:26:31 +03:00
valentinpalkovic dddc3ca820 Merge next into feat/remove-react-dom-shim 2026-09-24 21:39:57 +02:00
yannbf 13913378e5 Merge branch 'next' into claude/mcp-agentic-eval-storybook-migrate-5enntm 2026-09-24 15:24:55 +02:00
valentinpalkovicandPaperclip 37976508ae feat(cli): remove react-dom shim safely
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-24 14:37:11 +02:00
Valentin Palkovic 5b9d1d93dd Merge branch 'next' into jeppe-cursor/browser-support-clusters 2026-09-23 13:45:38 +02:00
Valentin Palkovic fe4717cbb7 Merge pull request #36390 from storybookjs/agent/sto-487-danger-major-phase
CI: Derive Danger branch version from package version
2026-09-22 22:49:02 +02:00
ObviousandGert Hengeveld a7b7aab3b5 test(angular-vite): cover browserTarget options via sandbox chromatic
Give the angular-vite sandbox app a build (browser) target whose styles
array and stylePreprocessorOptions.includePaths are load bearing for a
story's visuals: a banner stylesheet whose theme partial resolves only
through the inherited include path. Regressions in browserTarget option
handling now surface as a failed Storybook build or a Chromatic visual
diff.

Co-authored-by: Gert Hengeveld <gert@chromatic.com>
2026-09-22 17:14:25 +00:00
valentinpalkovic 58d186e730 CI: Derive Danger branch version from package version
Allow required SB11 breaking-change labels as soon as the repository enters an 11.0 prerelease, while retaining minor and patch restrictions for later phases.
2026-09-22 19:07:28 +02:00
valentinpalkovicandPaperclip 3e099a9eed Build: exclude caniuse-lite resolution from ecosystem overrides
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-22 16:27:32 +02:00
yannbf b7e82345f5 Merge branch 'next' into claude/mcp-agentic-eval-storybook-migrate-5enntm 2026-09-21 10:03:37 +02:00
Gert Hengeveld b2009f8dc5 Merge pull request #36284 from storybookjs/chunk/skip-playwright-install-in-init-empty-ci
CI: Skip Playwright browser install in init-empty jobs
2026-09-21 09:03:42 +02:00
Steve Dodier-Lazaro eaa07fe1b8 Merge branch 'next' into claude/mcp-agentic-eval-storybook-migrate-5enntm 2026-09-16 10:24:19 +02:00
Valentin Palkovic 5a25be43b5 Merge pull request #36248 from storybookjs/agent/sto-286-final-csf-diagnostics
CSF: Add shared mutation API for stories and config files
2026-09-14 14:18:55 +02:00
Steve Dodier-Lazaro dc7fde82a7 Merge branch 'next' into claude/mcp-agentic-eval-storybook-migrate-5enntm 2026-09-12 10:43:01 +02:00
Obvious 2af2182409 chore: remove obsolete test-storybooks-portable-vitest3 CI job and react-vitest-3 template
The Vitest 4 floor raise (#36164) obsoleted the dedicated Vitest 3
kitchen-sink variant. Remove the job definition and its registration
from the CircleCI config generator, and delete the
test-storybooks/portable-stories-kitchen-sink/react-vitest-3 template
that this job exclusively consumed.

Validated by regenerating all four CircleCI workflows (normal, merged,
daily, docs) before and after: normal/docs are byte-identical, merged/
daily differ only by the removed job, and tsc/oxlint/oxfmt are clean on
the touched files.
2026-09-11 20:15:10 +00:00
circleci-app[bot] 2e0c3598e3 Skip Playwright browser install in init-empty CI jobs that don't need it
The `init-empty` and `init-empty-windows` CI jobs time out while
installing Playwright browser binaries with `--with-deps` (triggered
because `CI=true` is set). Their smoke tests run `npm run storybook
-- --smoke-test`, which doesn't require Playwright at all.

Add `STORYBOOK_CLI_SKIP_PLAYWRIGHT_INSTALLATION=true` to the
environment for `defineEmptyInitFlow` and `defineEmptyInitWindows`.
The existing `STORYBOOK_CLI_SKIP_PLAYWRIGHT_INSTALLATION` guard in
`AddonVitestService.ts` handles this cleanly.

`defineEmptyInitFeatures` is intentionally left unchanged: it runs
`npx vitest`, which requires Playwright browser binaries to be present.

AI-Generated: true
2026-09-11 16:07:14 +00:00
Claude bc87e50b84 Enforce a single react-aria instance through pinned resolutions
react-aria-components runs react-aria's private modules at runtime and
pins the exact versions it shipped with; those modules hold module-level
React contexts, so a second react-aria resolution forks them and RAC
components silently disconnect from ours. Root resolutions now pin
react-aria and react-stately to the exact versions react-aria-components
depends on, collapsing every dependent - our workspaces, RAC's pin, the
scoped shims, and any future transitive range - onto one copy at
resolution time.

A lockstep test guards the pins: it fails whenever the resolutions stop
matching the react-aria-components manifest (the packages are published
in lockstep, so upgrades bump all three together) or drift outside the
ranges code/core declares. With the invariant enforced structurally, the
PopoverProvider import comment and the lint-message warnings about
drifting copies no longer carry their weight.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WSk2g5RrcpxacMMUTRv9HK
2026-09-11 13:53:36 +02:00
Valentin Palkovic 19e886195c no-mistakes(ci): Root cause of all 59 sandbox CI failures: this branch's quote-inference change to config printing (printConfig now passes quote: config._inferQuotes()) silently broke the printed-source string match in scripts/tasks/sandbox-parts.ts extendPreview, which inserted the sb.mock(...) block by replacing the literal import { sb } from "storybook/test";. Sandbox preview files are single-quoted, so the new import prints single-quoted, the .replace becomes a no-op, and every generated sandbox shipped with zero module mocks. No error surfaced - all *--create jobs succeeded. Evidence: (1) ran the real extendPreview against a single-quoted preview - pre-fix emits 0 of 8 sb.mock calls, post-fix emits 8 of 8; (2) probe against built csf-tools confirmed formatConfig now emits the single-quoted import where recast's prior default emitted double quotes; (3) natural experiment in CI - react-rsbuild/default-ts is the only template with skipMocking: true and the only sandbox whose jobs all passed, while every other template failed on exactly ModuleMocking/ModuleSpyMocking/ModuleAutoMocking/ClearModuleMocksMocking/NodeModuleMocking/CjsNodeModuleMocking (vitest jobs), sb-module-mocking.spec.ts (e2e jobs), and "8 component errors" (Chromatic). Fix (2 files): in scripts/tasks/sandbox-parts.ts, deleted the brittle printed-source string match and instead parse the mock statements and splice them into the AST after the last import declaration, writing through writeConfig; dropped the now-unused formatConfig import. This removes the quote-style coupling rather than hardening it. Regression test added at scripts/tasks/sandbox-parts.test.ts: runs the real extendPreview over a single-quoted preview in memfs, parses the emitted file, and asserts the semantic list of mocked modules (module specifier + spy flag). Verified fail-before ([] vs 8 entries) and pass-after. Verified locally: cd scripts && yarn check -> no type errors; yarn vitest run --project scripts -> 35 files / 303 tests passed; oxlint on both changed files -> clean, no new warnings; cd code && yarn fmt:write run. Did not re-run TypeCheck code: that job, plus eslint, format-check and knip-validation, passed in CI on this exact head commit, and nothing under code/ changed this round. Not fixed - Danger. Its three failures are PR metadata and unfixable by a commit: title is conventional-commit form where Area: Summary is required, body lacks the mandatory #### Manual testing section, and there is no approving Core/Developer-Experience review. Danger executes scripts/dangerfile.ts from the base branch and reads only title, body, labels and reviews; the title/body belong to the PR-description phase, which this phase does not own 2026-09-11 00:07:11 +02:00
Valentin Palkovic 2bd059155f no-mistakes(ci): Root cause: one leftover call to the deleted ConfigFile.setFieldValue in scripts/tasks/sandbox-parts.ts:989 (addStaticDirs). It is a hard TS error, so the TypeScript validation job failed, and that job ends with a when: on_fail "Cancel current workflow" step (scripts/ci/utils/helpers.ts:349), which cancelled the whole normal-generated workflow. That is why 23 unrelated checks (every sandbox create/dev/e2e/chromatic, bench, both UI Tests, normal-generated) went red from a single defect - jobs that had already completed (unit tests, lint, knip) are absent from the failing list, consistent with cancellation rather than genuine failures. Fix (1 line): mainConfig.setFieldValue(['staticDirs'], ...) -> mainConfig.set(['staticDirs'], ...), matching the migration every other call site in the same file already received. Verified locally: - cd scripts && yarn check fails before the fix with tasks/sandbox-parts.ts(989,14): error TS2339: Property 'setFieldValue' does not exist on type 'ConfigFile'. and passes after (No type errors in this package). Fail-before/pass-after confirmed by temporarily reverting the line. - cd code && yarn task --task check --no-link: all 51 packages pass (the other half of the same CI job). - Runtime parity probe against built csf-tools: set(['staticDirs'], [{from:'../public',to:'/foo'},'./static']) on a real main.ts returns {ok:true,changed:true} with no diagnostics and emits the expected staticDirs array, so the sandbox static-dir behavior is preserved (the sandbox jobs were cancelled and never executed this path in CI). - yarn fmt:write run; oxlint on the file reports only pre-existing no-explicit-any warnings. Note on a prior decision: this exact issue was surfaced as review finding sandbox-parts-removed-setfieldvalue and left unselected in review round 2. CI has now proven it is a real build break, and the CI-phase rule requires fixing a genuinely failing build, so it is fixed. Not fixed - Danger (not caused by code, no file change possible). Its three failures are all PR metadata: (1) title feat(csf-tools): ... is conventional-commit form where Danger requires Area: Summary; (2) body lacks the mandatory #### Manual testing heading; (3) no approving review from the Core or Developer Experience team, which only a human can provide. Danger executes scripts/dangerfile.ts from the base branch and reads only title, body, labels and reviews, so nothing committed on this branch can alter its result; the title/body belong to the PR-description phase, which this phase does not own. normal-generated and the cancelled jobs should clear on the next workflow run. No regression test added: the typechecker is the executable check that fails before and passes after; a test grepping sandbox-parts.ts contents would prove nothing 2026-09-10 23:17:14 +02:00
Valentin Palkovic 99543ad5a6 refactor: replace getFieldValue with getValue across multiple files for consistency 2026-09-10 20:21:40 +02:00
Valentin Palkovic b485405f2d refactor: update config mutation methods to use new API
- Replaced `setFieldValue` with `set` in multiple migration scripts and tests for consistency.
- Updated the handling of config mutations to assert success after changes.
- Refactored tests to align with the new configuration structure and methods.
- Improved error handling for config mutations to provide clearer diagnostics.
- Adjusted the logic for managing `beforeEach` hooks and other parameters in preview configurations.
2026-09-10 20:21:40 +02:00
Ari Perkkiö e3dea6ab99 test: add failing test for #24627 2026-09-10 10:31:21 +03:00
Obvious 88f7c9d60f chore: remove remaining PnP config from sandbox scripts
PR #36237 removed the PnP machinery itself; this sweeps the dead
scrubber entries it left behind:

- sanitize-published-sandbox: drop pnpFallbackMode from STRIP_KEYS and
  .pnp.cjs/.pnp.loader.mjs from EXCLUDE_GLOBS (nothing generates those
  artifacts now that sandboxes always use the node-modules linker)
- scripts/utils/yarn.ts: drop `pnpFallbackMode none` from
  configureYarn2ForVerdaccio (a PnP-only setting next to an
  unconditional node-modules linker)
- update the integrity tests asserting the exact key/glob sets

Verified: git grep -i -P 'pnp(?!m)' over scripts/ is empty;
sanitize-published-sandbox.test.ts and yarn.test.ts suites pass.
2026-09-09 10:46:53 +00:00
Obvious 833f0c53cf fix: remove leftover PnP work-arounds flagged in review
- delete test-storybooks-pnp CI job referencing the removed fixture
- Yarn scaffolds now explicitly set nodeLinker node-modules (pnp is the Yarn default)
- drop dead usePnp field, .pnp.cjs NODE_OPTIONS hook, sandbox pnp option, and its always-true guard
- resolve SB11 PnP TODOs and reword stale comment-only mentions
2026-09-09 10:17:07 +00:00
Obvious db5bdb6394 Merge remote-tracking branch 'origin/next' into chore/remove-cra 2026-09-08 16:42:42 +00:00
Steve Dodier-Lazaro 1fd6cf45a5 Merge pull request #36223 from storybookjs/debug-joao-dx-membership
CI: Distinguish review approval danger error messages
2026-09-08 12:27:09 +02:00
Steve Dodier-Lazaro 7440b8585b Distinguish danger error messages to debug why Joao cant merge 2026-09-08 12:02:38 +02:00
Obvious 0aff417983 chore(remove-cra): delete preset-create-react-app package and glue
Remove @storybook/preset-create-react-app end to end: the package itself,
its workspace dependency and lockfile entries, the react-webpack CRA glue
(cra-config, framework-preset-cra, the default preset-cra addon entry and
its package export), and the builder-webpack5 special case that skipped
default webpack config when the CRA preset was present.

CRA projects now get a dedicated init error instead of a scaffoldable
generator (follow-up commit); the telemetry react-scripts mapping stays.
2026-09-07 16:43:06 +00:00
Valentin Palkovic d48adc8e7c Merge pull request #35437 from storybookjs/task/ef28c594-angular-platform-browser-anim
Angular-Vite: Drop @angular/animations and warn on legacy animation modules
2026-09-07 15:24:06 +02:00
Claude c0d46cfbd6 Scripts: Dissolve the scripts-utils package
With the shared surface reduced to a single gh wrapper, a workspace
package no longer earns its keep. scripts/utils returns to being plain
internal code of @storybook/scripts (gh.ts stays there for
collect-pr-data), and agent-eval's results downloader gets its
self-contained gh wrapper back, matching that script's zero-dependency
design.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:58 +02:00
Claude 3c6b33e168 Harmonise ANSI stripping on Node's util.stripVTControlCharacters
Four hand-rolled ANSI regexes (node-logger's wrap-utils and its test
helper, npm-registry, agent-eval's runner-output parsing) and the
ansi-regex test dependency all collapse onto the node:util builtin —
the very replacement the depend/ban-dependencies lint rule prescribes
for strip-ansi. Verified a superset of the local regexes on wrap-utils'
own OSC-8 hyperlink sequences. The shared ansi.ts helper becomes
unnecessary and is deleted; the two table renderers measure width via
the builtin directly. The strip-ansi package remains only in core's
component-testing, which runs in the browser where node:util does not
exist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:58 +02:00
Claude 26b327d203 Scripts: Keep only dual-package helpers in scripts-utils
Per-symbol accounting of what the consolidation actually shares:
only the gh CLI wrapper (collect-pr-data + agent-eval's results
downloader) and the ANSI helpers stripAnsi/visibleLength (npm-registry
and eval's formatTable on one side, agent-eval's table and runner-output
parsing on the other) have users in both packages. Those stay, the
strip helpers now as ansi.ts.

Everything single-sided moves back to its user: the picocolors styling,
box table and math helpers return to agent-eval/lib/utils, and
scripts/eval's formatTable returns to its lib/utils.ts, rebuilt on the
shared visibleLength instead of a private stripAnsi.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:58 +02:00
Claude 57d9bb53ad Scripts: Keep relative ./utils imports inside the scripts workspace
The scripts-utils packagization exists for consumers outside
@storybook/scripts (agent-eval); within scripts the relative imports
were fine as they were, so the codemod is reverted and the now-unused
workspace dependency dropped. Only the helpers scripts newly adopted
(gh, colors, table) reference utils files added by the consolidation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:58 +02:00
Claude 3e0f506b82 Scripts: Make scripts/utils a shared workspace package
scripts/utils becomes @storybook/scripts-utils, the single home for
helpers both the build scripts and the eval harnesses need. Its files
stay put; the ~60 importers inside @storybook/scripts switch to the
package specifier, and agent-eval depends on it as a workspace package.

Centralised into it:
- colors.ts (picocolors-backed styling, stripAnsi, visibleLength) —
  replaces agent-eval's copy, scripts/eval's stripAnsi and the one in
  scripts/release/npm-registry.ts
- table.ts — agent-eval's box renderer plus formatPlainTable, the
  renamed scripts/eval formatTable, now sharing one width computation
- math.ts — the eval stats helpers, unchanged
- gh.ts — one GitHub CLI exec wrapper behind scripts/eval's
  collect-pr-data helpers and agent-eval's results downloader

Also drops the stale agent-eval/typescript entry from the ecosystem-ci
resolutions snapshot, left behind by the version alignment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:57 +02:00
Claude 43dfb6ca97 Eval: Move agent-eval back to the repository root
Restores the pre-existing top-level location (relocating it under
code/lib turned out to conflict with a prior requirement). The utils
package stays nested, now at agent-eval/utils. Reverses the path
fallout of the earlier move: workspace and vitest registration, workflow
and CircleCI paths, REPO_ROOT-derived paths, tsconfig mappings, and the
code-scope lint/knip config that no longer applies outside code/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:57 +02:00
Claude 9c86edda58 Eval: Move agent-eval under code/lib with its utils package nested
agent-eval moves from the repo root to code/lib/agent-eval, and
@storybook/agent-eval-utils from code/lib/agent-eval-utils to
code/lib/agent-eval/utils (registered explicitly in the workspace list,
since code/lib/* does not match a nested package).

Path fallout: workspace and vitest project registration collapse into the
existing code/lib globs; oxfmt/oxlint ignores anchor on **/agent-eval/;
the eval workflows, CircleCI job config and Vercel CLI calls point at the
new location; REPO_ROOT-derived paths in templates.ts, compare-results
and the misuse panel climb three levels instead of one; tsconfig paths
and the vitest alias resolve @storybook/mcp and the utils package
relative to code/lib.

Now that the tree sits inside code/'s lint scope, the code oxlint config
treats eval fixture stories like other fixture stories (renderer-package
and import-extension rules off for evals/, templates/ ignored), the app
route shims skip import extensions for the vendored @/ alias, and the
root .mjs override ignores bare package specifiers. Knip gets a
workspace entry scoping analysis to harness code rather than sandbox
fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122Na2V3ursCnPqLm2aKZKA
2026-09-07 12:47:38 +02:00
Valentin PalkovicandValentin Palkovic ff8e99e8e8 Apply batched suggestions from code review
Co-authored-by: Valentin Palkovic <dev@valentinpalkovic.dev>
2026-09-07 11:40:52 +02:00
Valentin Palkovic 794dd76405 Address review feedback from CodeRabbit and advisor reviews
- generate-types.ts: on d.ts timeout, no longer resolve the race right
  after kill('SIGTERM') - the exit/close listeners settle it once the
  child has actually terminated, so a retry can never overlap a process
  that is still writing .d.ts files; escalate to SIGKILL after 5s if
  SIGTERM is ignored (CodeRabbit).
- PropertyExtractor.test.ts: configure the console.warn mock inside
  beforeEach per repo Vitest guidelines (CodeRabbit nitpick).
- PropertyExtractor.ts: tighten the deprecation warning copy - merge the
  duplicated found/removed lines, capitalize the bullet actions, and
  normalize 'animate.enter'/'animate.leave' spacing (advisor review).
- Docs snippet: same slash-spacing normalization in the note comment.
2026-09-07 11:40:52 +02:00
Steve Dodier-Lazaro 16a00c4459 Fix async use in sync code path 2026-09-07 10:53:00 +02:00
Steve Dodier-Lazaro 346e0d6620 WIP: Finish preact sandbox and run on CI 2026-09-07 10:51:51 +02:00
Obvious 5b7147c374 refactor(vitest): remove Vitest 3 compat code
Collapse the postinstall template matrix to vitest.config.4.template, drop the workspace-file merge path (updateWorkspaceFile) and workspace template, always reference setup-file.browser.4, remove the Vitest-3 server branch and vitest.workspace discovery probes, and drop the deprecated @vitest/browser/context console suppression. Remove the setup-file.browser.3 shim, its export/build-config/optimizeDeps entries, and the stale Vitest 3 doc tabs.
2026-09-03 18:10:22 +00:00
Cursor Agent 241b9edfb1 Merge branch 'next' into jeppe/pkg-pr-new
Keep the pkg.pr.new CLI version specifier and the --features /
--skip-automigrations guard in upgrade().
2026-08-25 09:33:20 +00:00
Cursor Agent 649d97e45d Merge remote-tracking branch 'origin/next' into jeppe/pkg-pr-new
# Conflicts:
#	.github/workflows/publish.yml
#	code/core/src/common/js-package-manager/JsPackageManager.test.ts
#	code/frameworks/nextjs-vite/package.json
#	code/lib/cli-storybook/src/upgrade.test.ts
#	code/lib/cli-storybook/src/util.ts
#	code/lib/create-storybook/package.json
#	code/lib/create-storybook/src/generators/REACT_NATIVE/index.ts
#	code/lib/csf-plugin/package.json
2026-08-25 06:45:09 +00:00
Valentin Palkovic bbec91b60a Build: Send a valid signal when killing timed-out dts processes
ChildProcess.kill takes a signal name or number, not an exit code;
kill(408) throws ERR_UNKNOWN_SIGNAL inside the timeout callback and
crashes the entire build instead of reaching the dts retry logic just
below. Send SIGTERM so a timed-out entry is retried as intended.
2026-08-21 09:43:49 +02:00
Norbert de Langen 30ad44cb74 CI: Stop Verdaccio from proxying vite-plugin-storybook-nextjs to npmjs.
The unscoped package now lives in the monorepo and is already on the public registry at 10.6.0-alpha.7, so sandbox publishes 409 unless it is on the same no-proxy list as the other local Storybook packages.
2026-08-20 15:08:20 +02:00
Julien Huang 4207525226 fix: ci sandbox npm min version 2026-08-19 12:15:21 +02:00
Julien Huang 4259230c33 Merge branch 'next' into julien/vue_docgen_sandbox 2026-08-18 17:35:05 +02:00
Norbert de Langen 1e579a6d13 Merge pull request #35939 from storybookjs/fix/react-native-sandbox-age-gate-exemptions
Build: Fix React Native sandbox generation under age gate
2026-08-18 16:55:17 +02:00
Julien Huang 1b9b76f95c Merge branch 'next' into julien/vue_docgen_sandbox 2026-08-18 16:10:54 +02:00
Julien Huang add38a0c08 fix: sandbox min npm version 2026-08-18 16:02:23 +02:00