Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
386 commits
Select commit Hold shift + click to select a range
798eb60
Eval: refine trial collection and batch controls
kasperpeulen Apr 9, 2026
ec41d25
Apply suggestion from @Sidnioulz
Sidnioulz Apr 9, 2026
a6f4f1f
Apply suggestion from @Sidnioulz
Sidnioulz Apr 9, 2026
0155a76
Apply suggestion from @Sidnioulz
Sidnioulz Apr 9, 2026
e3f41aa
Tests: fix formatting and stabilize CI assertions
kasperpeulen Apr 9, 2026
eec68c2
Apply suggestion from @Sidnioulz
Sidnioulz Apr 9, 2026
b571cf5
Apply suggestion from @Sidnioulz
Sidnioulz Apr 9, 2026
959740b
Vitest: keep screenshot config out of public templates
kasperpeulen Apr 9, 2026
9ce34d7
Build: fix production check failures
kasperpeulen Apr 9, 2026
25f017e
Eval: fast-forward source baseline before sync
kasperpeulen Apr 9, 2026
eeccece
Format eval batch types and baseline test assertions
kasperpeulen Apr 9, 2026
090c511
refactor: rename ai-setup-evidence to ai-prepare-evidence, add ai-pre…
Sidnioulz Apr 10, 2026
fec53a5
feat: create ai-prepare-evidence module with evidence collection, sto…
Sidnioulz Apr 10, 2026
8606a4a
refactor: replace inline AiSetupPendingRecord with type import from a…
Sidnioulz Apr 10, 2026
a529bcb
refactor: move AiSetupPendingRecord and isStoryCreatedByAISetup to te…
Sidnioulz Apr 10, 2026
d22240d
refactor: remove evidence collection from withTelemetry, import from …
Sidnioulz Apr 10, 2026
f60ecfe
feat: fire ai-prepare evidence from doTelemetry with story index for …
Sidnioulz Apr 10, 2026
1826b68
test: add unit tests for ai-prepare-evidence module
Sidnioulz Apr 10, 2026
a6a2532
chore: clean up dead detect-agent mock, fix test name for agent detec…
Sidnioulz Apr 10, 2026
82f7bcd
feat: add AI story scoring to ghost stories channel with CPU capacity…
Sidnioulz Apr 10, 2026
8c9eaa0
Fix linting
Sidnioulz Apr 10, 2026
c891c83
Update implementation
Sidnioulz Apr 11, 2026
b9bb015
Update test mocks and fixtures
Sidnioulz Apr 11, 2026
50ddc1f
Remove spike script for feature adoption data flow
Sidnioulz Apr 11, 2026
f802462
Align type imports between two files
Sidnioulz Apr 11, 2026
91c0d05
CLI: Rework --dev default and ai prepare UX
Sidnioulz Apr 11, 2026
f351600
Flush event cache when ai prepare event is expired
Sidnioulz Apr 11, 2026
115de94
feat: add centralised AI prepare prompt copy
Sidnioulz Apr 11, 2026
0207230
feat: add optional icon field to ChecklistData type
Sidnioulz Apr 11, 2026
ea0c654
feat: support custom icon field in ChecklistWidget
Sidnioulz Apr 11, 2026
5c87352
feat: add forceCollapsed prop to Checklist component
Sidnioulz Apr 11, 2026
67d3f86
feat: add aiPrepare checklist item with WandIcon
Sidnioulz Apr 11, 2026
8100b5c
feat: add AI prepare CTA block to Guide page
Sidnioulz Apr 11, 2026
6cdf869
feat: detect ai-prepare telemetry at startup and mark checklist item …
Sidnioulz Apr 11, 2026
a9590c2
Reorganise LLM code
Sidnioulz Apr 11, 2026
6f45a42
Align UI with Figma
Sidnioulz Apr 11, 2026
8c18046
Adjust behaviour of AI prepare checklist item post done
Sidnioulz Apr 11, 2026
7b7112c
Adjust the prompt to the copy we currently use
Sidnioulz Apr 11, 2026
0b5ce36
Only show agent success message with followup to supported frameworks
Sidnioulz Apr 11, 2026
51aef29
Re-add storybookCommand
Sidnioulz Apr 11, 2026
c0ceb72
Fix up mistakes in GuidePage
Sidnioulz Apr 11, 2026
721dc82
Add unit tests for ai prepare checklist
Sidnioulz Apr 11, 2026
fd96be3
Update FinalizationCommand tests
Sidnioulz Apr 11, 2026
993868a
docs: add agent vitest telemetry implementation plan
Sidnioulz Apr 13, 2026
473bd11
refactor: extract shared test result types from ghost-stories
Sidnioulz Apr 13, 2026
8d8d4fb
Track when users request AI prepare prompt in init
Sidnioulz Apr 13, 2026
ff2b625
refactor: extract shared test analysis logic from ghost-stories
Sidnioulz Apr 13, 2026
2acb09d
refactor: rename render analysis gate to support both ghost stories a…
Sidnioulz Apr 13, 2026
16beee4
feat: add agent-test-run telemetry event type
Sidnioulz Apr 13, 2026
983c0d1
feat: add AgentTelemetryReporter for vitest CLI agent runs
Sidnioulz Apr 13, 2026
60762e8
feat: inject AgentTelemetryReporter when agent detected in vitest CLI
Sidnioulz Apr 13, 2026
4d91e1c
Add telemetry when users copy prompts
Sidnioulz Apr 13, 2026
545dac9
improve ai prepare prompt
yannbf Apr 13, 2026
11bf99f
Merge pull request #34532 from storybookjs/yann/improved-prompt
yannbf Apr 13, 2026
22a5bc1
PR feedback
Sidnioulz Apr 13, 2026
7fe4da6
Merge pull request #34526 from storybookjs/sidnioulz/cli-init-changes
Sidnioulz Apr 13, 2026
c46a39a
fix error message extraction logic
yannbf Apr 14, 2026
33ae28e
refactor eval harness for play-driven trials
kasperpeulen Apr 14, 2026
0372c7a
Remove screenshot plumbing from addon-vitest
kasperpeulen Apr 14, 2026
fbfdfdf
improve error categorization
yannbf Apr 14, 2026
14d1e91
Revert extra ghost-story and vitest test changes
kasperpeulen Apr 14, 2026
94d9872
Restore review-pr skill and trim Vitest noise
kasperpeulen Apr 14, 2026
5c90b6c
Merge remote-tracking branch 'origin/project/sb-agentic-setup' into k…
kasperpeulen Apr 14, 2026
3062995
Drop remaining non-eval review noise
kasperpeulen Apr 14, 2026
a3e829f
add isWithinInitialSession utility to easily check session windows
yannbf Apr 14, 2026
b3ae6dc
feat: collapse AiSetupBlock to heading row with animation when skipped
Sidnioulz Apr 14, 2026
bfb5bb1
Changes from Codex
kasperpeulen Apr 14, 2026
50a19ea
feat: add AiSetupBlock stories (Open, Skipped, SkippedToOpen)
Sidnioulz Apr 14, 2026
3117fa3
feat: add WithAiPrepare and WithAiPrepareSkipped stories to Checklist
Sidnioulz Apr 14, 2026
73db61e
feat: add AiCtaSkipped and AllDone stories to GuidePage
Sidnioulz Apr 14, 2026
951fc88
feat: add WithAiPrepare story to ChecklistWidget
Sidnioulz Apr 14, 2026
ca96d8d
remove ghostStories global
yannbf Apr 14, 2026
0834932
remove duplicated tsconfig json key
yannbf Apr 14, 2026
580885e
fix: allow useCopyButton onClick to be called without event argument
Sidnioulz Apr 14, 2026
8b926cb
Fix formatting in eval scripts
kasperpeulen Apr 14, 2026
69cd8c0
Make last adjustements to block sizing
Sidnioulz Apr 14, 2026
07cb30b
Fix eval scripts lint and type errors
kasperpeulen Apr 14, 2026
44a11df
Add story
Sidnioulz Apr 14, 2026
33accf7
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 14, 2026
4bf38d3
Fix types
Sidnioulz Apr 14, 2026
9e795d3
Apply suggestion from @Sidnioulz
Sidnioulz Apr 14, 2026
f00c02f
Apply suggestion from @Sidnioulz
Sidnioulz Apr 14, 2026
1687113
Merge branch 'project/sb-agentic-setup' into sidnioulz/agentic-teleme…
Sidnioulz Apr 14, 2026
656cdea
Merge branch 'sidnioulz/agentic-telemetry-ws1' into sidnioulz/agentic…
yannbf Apr 14, 2026
956d2fe
Merge telemetry loggers
Sidnioulz Apr 14, 2026
8119825
Switch delayed analytics to a 4m timeout
Sidnioulz Apr 14, 2026
cd66a6a
Merge remote-tracking branch 'origin/sidnioulz/agentic-telemetry-ws1'…
yannbf Apr 14, 2026
f51a483
Fix timings in tests
Sidnioulz Apr 14, 2026
920b29d
Merge pull request #34510 from storybookjs/sidnioulz/agentic-telemetr…
Sidnioulz Apr 14, 2026
de096e0
Merge branch 'project/sb-agentic-setup' into sidnioulz/copy-prompt-cta
Sidnioulz Apr 14, 2026
de01e41
Clarify vitest pass-rate wording
kasperpeulen Apr 14, 2026
7b6155a
Merge pull request #34527 from storybookjs/sidnioulz/copy-prompt-cta
Sidnioulz Apr 14, 2026
22dd5e2
refactor: rename 'ai prepare' to 'ai setup' across the codebase
Sidnioulz Apr 14, 2026
5685647
Eval: store sync baselines as string templates
kasperpeulen Apr 14, 2026
3e26b59
Eval: make baseline templates readable
kasperpeulen Apr 14, 2026
c4a883e
Eval: make baseline MDX consumers safe
kasperpeulen Apr 14, 2026
4a76b60
Chore: fix eval formatting
kasperpeulen Apr 14, 2026
8929a4c
Fix CI: TypeScript error and stale project list in eval tests
kasperpeulen Apr 15, 2026
e495640
Eval: remove syncLocalBuildsToTrial
kasperpeulen Apr 15, 2026
d7720a8
Restore trailing newline in scripts/.eslintignore
kasperpeulen Apr 15, 2026
4bf9804
Fix formatting in prepare-trial.test.ts
kasperpeulen Apr 15, 2026
bcdfeb2
Repair global exports mashed up by merge resolution
Sidnioulz Apr 15, 2026
f997d25
Fix sync-baselines: auto-clone missing repos and remove premature mai…
kasperpeulen Apr 15, 2026
93cd9dd
Fix formatting in sync-baselines files
kasperpeulen Apr 15, 2026
ef3857b
eval: format scores as percentages; default batch to Claude+Codex at …
kasperpeulen Apr 15, 2026
c9bba6f
Fix formatting in run-batch.test.ts
kasperpeulen Apr 15, 2026
ec0fa15
Add stuff missed by the LLM
Sidnioulz Apr 15, 2026
3609ad8
Merge pull request #34543 from storybookjs/sidnioulz/rename-prepare-t…
Sidnioulz Apr 15, 2026
0045954
Fix CI: remove unused BATCH_AGENT_IDS import
kasperpeulen Apr 15, 2026
2524f56
Merge branch 'next' into project/sb-agentic-setup
Sidnioulz Apr 15, 2026
907c256
Merge pull request #34421 from storybookjs/kasper/eval-worktrees-chro…
yannbf Apr 15, 2026
bacd3ce
fix initial session code
yannbf Apr 15, 2026
f52e589
Add --help flag to all eval CLI scripts
kasperpeulen Apr 15, 2026
6714b03
Revert "remove ghostStories global"
yannbf Apr 15, 2026
396eba6
Fix up issues with next merge
Sidnioulz Apr 15, 2026
f0d0c94
Merge branch 'project/sb-agentic-setup' into sidnioulz/agentic-teleme…
yannbf Apr 15, 2026
175b59c
dangling changes
yannbf Apr 15, 2026
512183d
Agentic Setup: Rename final scoring event
Sidnioulz Apr 15, 2026
48a55f9
Merge pull request #34549 from storybookjs/sidnioulz/rename-story-sco…
yannbf Apr 15, 2026
7cac0a4
fix reporting time
yannbf Apr 15, 2026
611b996
Eval harness: address review feedback and improve CLIs
kasperpeulen Apr 15, 2026
1c0580d
eval: document and spawn trials via node from repo root
kasperpeulen Apr 15, 2026
f694ac3
refactor ghost stories test result parsing
yannbf Apr 15, 2026
d437782
fix error message extraction
yannbf Apr 15, 2026
a12571a
Clean up diff: remove ./ prefix, add diagrams, fix MCP repo links
kasperpeulen Apr 15, 2026
a8ab777
add --include and --exclude log flags to event log collector
yannbf Apr 15, 2026
2089cea
add --no-metadata flag in event log collector
yannbf Apr 15, 2026
ba64b84
Address PR review: sanitize labels, use esMain, remove duplicate gain…
kasperpeulen Apr 15, 2026
bd1f96e
Use comma-separated --add-label; remove unnecessary JSDoc
kasperpeulen Apr 15, 2026
e4a4aaf
chore: oxfmt eval scripts (fix Circle format-check)
kasperpeulen Apr 15, 2026
5b6aa67
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 15, 2026
d565bef
Merge branch 'project/sb-agentic-setup' into kasper/eval-scripts-help
kasperpeulen Apr 15, 2026
054986e
Merge branch 'project/sb-agentic-setup' into sidnioulz/agentic-teleme…
yannbf Apr 15, 2026
9881a88
eval: validate prompt name in requireBatchPrompt
kasperpeulen Apr 15, 2026
6d29099
account for PR feedback
yannbf Apr 15, 2026
8a008b2
refactor ghost run logic
yannbf Apr 15, 2026
e81a5db
fix tests
yannbf Apr 15, 2026
7821847
Merge pull request #34537 from storybookjs/sidnioulz/agentic-telemetr…
yannbf Apr 15, 2026
627ebbd
feat(init): write onboarding-pending cache entry after successful init
Sidnioulz Apr 15, 2026
53aae10
feat(init): remove --initial-path=/onboarding from dev subprocess launch
Sidnioulz Apr 15, 2026
09dc917
feat(dev): resolve initialPath from onboarding-pending cache with CLI…
Sidnioulz Apr 15, 2026
a34e916
Avoid onboarding agents
Sidnioulz Apr 15, 2026
b6829a8
fix(dev): remove detectAgent guard, restore addon-onboarding check an…
Sidnioulz Apr 15, 2026
78a8c24
feat: implement AI setup tracking and conditional telemetry firing
yannbf Apr 15, 2026
8334c6d
fix(dev): drop addon check, restore detectAgent guard, simplify resol…
Sidnioulz Apr 15, 2026
7c569fd
Merge branch 'project/sb-agentic-setup' into sidnioulz/fix-onboarding…
Sidnioulz Apr 15, 2026
ebc33b5
skip AI feature recommendation for empty projects during initialization
yannbf Apr 15, 2026
69535ce
Eval: use vitest:storybook script for grading, compact agent output
kasperpeulen Apr 16, 2026
dc22d9c
Eval: pass verbose flag to agent drivers for full output logging
kasperpeulen Apr 16, 2026
5005276
Merge remote-tracking branch 'origin/project/sb-agentic-setup' into k…
kasperpeulen Apr 16, 2026
aad59f0
Address CodeRabbit review: loadPrompt path traversal, --add-label safety
kasperpeulen Apr 16, 2026
7fa1c26
Eval: restore manual vitest grading, add labels to story render passes
kasperpeulen Apr 16, 2026
6d203ea
Eval prompt: clarify preview-first goal, add args story examples
kasperpeulen Apr 16, 2026
ca69287
Fix formatting in story-render.ts to pass CI format-check
kasperpeulen Apr 16, 2026
c473959
First pass at agentic flow docs
yannbf Apr 16, 2026
96d1021
gracefully handle cache failures
yannbf Apr 16, 2026
bb7bc99
Merge pull request #34552 from storybookjs/sidnioulz/fix-onboarding-u…
yannbf Apr 16, 2026
047c282
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 16, 2026
1b2e10d
Merge branch 'project/sb-agentic-setup' into yann/skip-ai-prompts-emp…
yannbf Apr 16, 2026
f5cf0db
Merge branch 'project/sb-agentic-setup' into yann/conditional-ai-feature
yannbf Apr 16, 2026
056c8ff
add ai as feature metadata
yannbf Apr 16, 2026
cd51da6
rework logic
yannbf Apr 16, 2026
af4587a
fix tests
yannbf Apr 16, 2026
18f76fc
fix tests
yannbf Apr 16, 2026
a9caa31
first pass at fixing stale data
yannbf Apr 16, 2026
c85561f
move logic to the server
yannbf Apr 16, 2026
fc8bd08
add bluesky
yannbf Apr 16, 2026
26094d3
skip ai prompts in react native
yannbf Apr 17, 2026
b819806
fix tests
yannbf Apr 17, 2026
558da6d
Merge pull request #34546 from storybookjs/kasper/eval-scripts-help
yannbf Apr 17, 2026
6e9182c
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 17, 2026
fe2b0c9
fix tests
yannbf Apr 17, 2026
21be9dc
fix
yannbf Apr 17, 2026
e416fb6
accomodate for review feedback
yannbf Apr 17, 2026
9a43d2c
Merge pull request #34577 from storybookjs/yann/skip-ai-in-react-native
yannbf Apr 17, 2026
ffaabc7
Merge pull request #34561 from storybookjs/yann/skip-ai-prompts-empty…
yannbf Apr 17, 2026
a4f12d3
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 17, 2026
2ec3044
Improve agentic setup docs: style, structure, and links
kylegach Apr 17, 2026
822568b
account for test runs
yannbf Apr 17, 2026
12ae3fe
Address feedback and format
kylegach Apr 17, 2026
809ba4e
Add new page to "more resources" list
kylegach Apr 17, 2026
a6355f4
Merge branch 'project/sb-agentic-setup' into yann/storybook-ai-api-docs
kylegach Apr 17, 2026
3ef7a4d
Merge pull request #34560 from storybookjs/yann/storybook-ai-api-docs
kylegach Apr 17, 2026
6ad855d
add stories
yannbf Apr 17, 2026
1164d23
Merge branch 'project/sb-agentic-setup' into yann/conditional-ai-feature
yannbf Apr 17, 2026
0c8eb06
fixes
yannbf Apr 17, 2026
f2b55f5
slight improvements
yannbf Apr 18, 2026
8ed4332
Merge pull request #34555 from storybookjs/yann/conditional-ai-feature
yannbf Apr 18, 2026
407f451
Eval: require a getComputedStyle assertion in stories to prove CSS is…
kasperpeulen Apr 19, 2026
720d018
Eval prompt: reword end-state sentence to avoid biasing toward render()
kasperpeulen Apr 19, 2026
88dffdb
Eval grade: scope CSS-assertion check to added lines in story files
kasperpeulen Apr 20, 2026
fd48b03
Eval: name the CSS-check story `CssCheck` so telemetry can find it
kasperpeulen Apr 20, 2026
d0fe90e
Telemetry: attribute the CssCheck story result in ai-setup-final-scoring
kasperpeulen Apr 20, 2026
28fea35
Build: Source eval prompts from the CLI via EVAL_SETUP_PROMPT
kasperpeulen Apr 20, 2026
9412695
CLI: Port pattern-copy-play prompt improvements from #34596
kasperpeulen Apr 20, 2026
5a85358
Merge remote-tracking branch 'origin/kasper/eval-prompts-from-cli' in…
kasperpeulen Apr 20, 2026
741237e
chore: oxfmt scripts/eval/eval.ts (fix CI format-check)
kasperpeulen Apr 20, 2026
5be3f0b
CLI: Capture real ai-setup markdown in trial records and normalize pr…
kasperpeulen Apr 21, 2026
42f4ed9
CLI: Address ai-setup eval review findings
kasperpeulen Apr 21, 2026
d86161f
Docs: Drop stray eslint-plugin.mdx quote-style change
kasperpeulen Apr 21, 2026
86ae333
Merge remote-tracking branch 'origin/kasper/eval-prompts-from-cli' in…
kasperpeulen Apr 21, 2026
391a8c1
Telemetry: tighten JSDoc on CssCheck helper + storyResults order
kasperpeulen Apr 21, 2026
a320350
Telemetry: simplify cssCheck to a boolean on TestRunAnalysis
kasperpeulen Apr 21, 2026
5d2a7fb
Telemetry: make cssCheck a 3-state enum on TestRunAnalysis
kasperpeulen Apr 21, 2026
7cb6490
Eval: add sync-storybook-version script + --skip-automigrations
kasperpeulen Apr 22, 2026
8c8312b
Eval: hoist default sync hooks to avoid TDZ from CLI entry
kasperpeulen Apr 22, 2026
d8de741
Eval: let reruns push existing local sync commits
kasperpeulen Apr 22, 2026
9140f6c
Merge remote-tracking branch 'origin/kasper/eval-sync-storybook-versi…
kasperpeulen Apr 22, 2026
60a3006
Core: fix ghost stories telemetry test for cssCheck
cursoragent Apr 22, 2026
62f2fa6
Merge remote-tracking branch 'origin/kasper/eval-sync-storybook-versi…
kasperpeulen Apr 22, 2026
a6aaf4f
CI: type sync-storybook-version env as NodeJS.ProcessEnv
kasperpeulen Apr 22, 2026
d9db8a8
Eval: Type-annotate env literal in sync-storybook-version
kasperpeulen Apr 22, 2026
01068aa
Merge remote-tracking branch 'origin/kasper/eval-prompts-from-cli' in…
kasperpeulen Apr 22, 2026
448d4d4
CI: type sync-storybook-version env as NodeJS.ProcessEnv
kasperpeulen Apr 22, 2026
3ce2bac
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 27, 2026
817d8b9
fix tests
yannbf Apr 27, 2026
7013d94
fix test flake
yannbf Apr 28, 2026
59b8813
Merge pull request #34600 from storybookjs/cursor/telemetry-css-check…
yannbf Apr 28, 2026
fbf3baa
Merge pull request #34612 from storybookjs/kasper/eval-sync-storybook…
yannbf Apr 28, 2026
585d962
fix tests
yannbf Apr 28, 2026
99ade86
Merge branch 'project/sb-agentic-setup' into kasper/eval-prompts-from…
yannbf Apr 28, 2026
9729a8b
Merge branch 'kasper/eval-prompts-from-cli' into cursor/eval-css-load…
yannbf Apr 28, 2026
14d97d2
simplify css check
yannbf Apr 28, 2026
470626f
improve eval batch run script and docs
yannbf Apr 29, 2026
ce0e6cb
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 29, 2026
96b782c
Merge branch 'project/sb-agentic-setup' into kasper/eval-prompts-from…
yannbf Apr 29, 2026
1557244
Merge branch 'kasper/eval-prompts-from-cli' into cursor/eval-css-load…
yannbf Apr 29, 2026
fd6a2b0
add csscheck to pr body
yannbf Apr 29, 2026
3b67e50
Merge pull request #34595 from storybookjs/cursor/eval-css-loaded-pro…
yannbf Apr 29, 2026
8e7c397
Fix inconsistencies in eval README
Sidnioulz Apr 29, 2026
305a7eb
share constant for `.rnstorybook`
ndelangen Apr 29, 2026
dc5b803
Update CHANGELOG.md for v10.3.6 [skip ci]
storybook-bot Apr 29, 2026
6d13586
do not show onboarding when AI is selected
yannbf Apr 29, 2026
66ab0cb
fix tests
yannbf Apr 29, 2026
ab56f65
Avoid mutating env in tests
Sidnioulz Apr 29, 2026
62849d4
Merge pull request #34650 from storybookjs/yann/skip-onboarding-with-ai
Sidnioulz Apr 29, 2026
045ac28
Merge branch 'next' into norbert/share-rnstorybook-constant
ndelangen Apr 29, 2026
af1479a
Account for PR feedback
yannbf Apr 29, 2026
e49e97f
Docs: Improve `fn` details for Actions
kylegach Apr 29, 2026
29920d9
Apply suggestion from @coderabbitai[bot]
kylegach Apr 29, 2026
b35ff84
fix test
yannbf Apr 29, 2026
aa4d8d8
Merge pull request #34654 from storybookjs/docs-improve-actions-fn
kylegach Apr 29, 2026
db8eabc
Merge pull request #34602 from storybookjs/kasper/eval-prompts-from-cli
yannbf Apr 30, 2026
e8b2899
account for review feedback
yannbf Apr 30, 2026
61aa8ea
fix minor bug
yannbf Apr 30, 2026
cf07244
Merge pull request #34653 from storybookjs/norbert/share-rnstorybook-…
ndelangen Apr 30, 2026
de31a57
Merge branch 'next' into project/sb-agentic-setup
yannbf Apr 30, 2026
8f1a55d
fix types
yannbf Apr 30, 2026
e94c57c
Merge pull request #34297 from storybookjs/project/sb-agentic-setup
yannbf Apr 30, 2026
7cf97be
Write changelog for 10.4.0-alpha.12 [skip ci]
storybook-bot Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
generate-and-run-config:
executor:
name: node/default
resource_class: small
resource_class: large
steps:
- node/install:
install-yarn: true
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,13 @@ CLAUDE.local.md
.vscode/mcp.json
.mcp.json
.nx/polygraph
.omc

# Eval system
scripts/eval/.cache
scripts/eval/results

# review-pr skill output
.pr-review

# Unknown
.omc
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"[jsonc]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.oxc": "explicit"
Expand Down
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ This file is the canonical instruction source for coding agents. Files like `CLA
Storybook is a large TypeScript monorepo. The git root is the repo root, the main code lives in `code/`, and build tooling lives in `scripts/`. The default branch is `next`.

- **Base branch**: `next` (all PRs should target `next`, not `main`)
- **Node.js**: `22.21.1` (see `.nvmrc`)
- **Node.js**: `22.22.1` (see `.nvmrc`) — supports `.ts` natively via type stripping (no loader needed)
- **Package Manager**: Yarn Berry
- **Task orchestration**: NX plus the custom `yarn task` runner
- **CI environment**: Linux and Windows
- **TS execution**: Migrating from `jiti` to native `node` for running `.ts` files. New scripts should use `node ./path/file.ts` with explicit `.ts` import extensions (enabled by `allowImportingTsExtensions` in tsconfig). Legacy scripts still use `jiti` but should be migrated over time.

## Repository Structure

Expand Down Expand Up @@ -236,7 +237,7 @@ When writing tests:

After changing files:

1. Format with `cd code && oxfmt`
1. Format with `yarn fmt:write` (run from the repo root)
2. Lint with `yarn --cwd code lint:js:cmd <file-relative-to-code-folder> --fix` or `cd code && yarn lint:js:cmd <file-relative-to-code-folder>`
3. Run relevant tests before submitting a PR

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 10.3.6

- ESLint: Update deprecated @storybook/test reference to storybook/test - [#34430](https://github.com/storybookjs/storybook/pull/34430), thanks @venkat22022202!
- React: Add optional React type peers to packages that publish React-based declarations - [#34641](https://github.com/storybookjs/storybook/pull/34641), thanks @copilot-swe-agent!
- UI: Fix global background + color styles affecting stories - [#34071](https://github.com/storybookjs/storybook/pull/34071), thanks @Axadali!

## 10.3.5

- Core: Disable component manifest by default - [#34408](https://github.com/storybookjs/storybook/pull/34408), thanks @yannbf!
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 10.4.0-alpha.12

- CLI: Introduce Agentic Setup workflow - [#34297](https://github.com/storybookjs/storybook/pull/34297), thanks @yannbf!

## 10.4.0-alpha.11

- CLI: Change mock event detection - [#34586](https://github.com/storybookjs/storybook/pull/34586), thanks @yannbf!
Expand Down
1 change: 1 addition & 0 deletions code/addons/a11y/src/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const afterEach: AfterEach<any> = async ({
}) => {
const a11yParameter: A11yParameters | undefined = parameters.a11y;
const a11yGlobals = globals.a11y;
// we do not run a11y checks as part of ghost stories runs
const isGhostStories = !!globals.ghostStories;

const shouldRunEnvironmentIndependent =
Expand Down
206 changes: 206 additions & 0 deletions code/addons/vitest/src/vitest-plugin/agent-telemetry-reporter.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';

import { AgentTelemetryReporter } from './agent-telemetry-reporter.ts';

vi.mock('storybook/internal/telemetry', () => ({
telemetry: vi.fn(),
isExampleStoryId: vi.fn(
(id: string) =>
id.startsWith('example-button--') ||
id.startsWith('example-header--') ||
id.startsWith('example-page--')
),
}));

const { telemetry } = await import('storybook/internal/telemetry');

function createMockTestCase({
storyId,
status,
reports = [],
errors = [],
}: {
storyId?: string;
status: 'passed' | 'failed' | 'pending';
reports?: Array<{ type: string; result?: Record<string, unknown> }>;
errors?: Array<{ message: string; stack?: string }>;
}) {
return {
meta: () => ({ storyId, reports }),
result: () => ({
state: status,
errors: status === 'failed' ? errors : [],
}),
};
}

function createMockTestModules(testCounts: { passed: number; failed: number }) {
const tests: Array<{ result: () => { state: string } }> = [];
for (let i = 0; i < testCounts.passed; i++) {
tests.push({ result: () => ({ state: 'passed' }) });
}
for (let i = 0; i < testCounts.failed; i++) {
tests.push({ result: () => ({ state: 'failed' }) });
}
return [
{
children: {
allTests: function* (filter?: string) {
for (const t of tests) {
if (!filter || t.result().state === filter) {
yield t;
}
}
},
},
errors: () => [],
},
];
}

describe('AgentTelemetryReporter', () => {
let reporter: AgentTelemetryReporter;

beforeEach(() => {
vi.clearAllMocks();
reporter = new AgentTelemetryReporter({
configDir: '.storybook',
agent: { name: 'claude' },
});
});

describe('onTestCaseResult', () => {
it('should collect story test results', () => {
const testCase = createMockTestCase({
storyId: 'my-story--primary',
status: 'passed',
});
reporter.onTestCaseResult(testCase as any);
});

it('should skip tests without storyId', () => {
const testCase = createMockTestCase({
storyId: undefined,
status: 'passed',
});
reporter.onTestCaseResult(testCase as any);
});

it('should skip example story IDs', () => {
const testCase = createMockTestCase({
storyId: 'example-button--primary',
status: 'passed',
});
reporter.onTestCaseResult(testCase as any);
});
});

describe('onTestRunEnd', () => {
it('should send telemetry with analysis of collected results', async () => {
reporter.onInit({ config: { watch: false } } as any);

reporter.onTestCaseResult(createMockTestCase({ storyId: 's1', status: 'passed' }) as any);
reporter.onTestCaseResult(
createMockTestCase({
storyId: 's2',
status: 'failed',
errors: [{ message: 'Error: Module not found: foo' }],
}) as any
);
reporter.onTestCaseResult(
createMockTestCase({
storyId: 's3',
status: 'passed',
reports: [{ type: 'render-analysis', result: { emptyRender: true } }],
}) as any
);

await reporter.onTestRunEnd(createMockTestModules({ passed: 2, failed: 1 }) as any, []);

expect(telemetry).toHaveBeenCalledWith(
'ai-setup-self-healing-scoring',
expect.objectContaining({
agent: { name: 'claude' },
analysis: expect.objectContaining({
total: 3,
passed: 2,
passedButEmptyRender: 1,
successRate: 0.67,
successRateWithoutEmptyRender: 0.33,
uniqueErrorCount: 1,
}),
unhandledErrorCount: 0,
watch: false,
}),
{ configDir: '.storybook', stripMetadata: true }
);
});

it('should filter out example stories from analysis', async () => {
reporter.onInit({ config: { watch: false } } as any);

reporter.onTestCaseResult(
createMockTestCase({ storyId: 'my-story--primary', status: 'passed' }) as any
);
reporter.onTestCaseResult(
createMockTestCase({ storyId: 'example-button--primary', status: 'passed' }) as any
);

await reporter.onTestRunEnd(createMockTestModules({ passed: 2, failed: 0 }) as any, []);

expect(telemetry).toHaveBeenCalledWith(
'ai-setup-self-healing-scoring',
expect.objectContaining({
analysis: expect.objectContaining({
total: 1,
passed: 1,
}),
}),
expect.anything()
);
});

it('should count unhandled errors', async () => {
reporter.onInit({ config: { watch: false } } as any);

await reporter.onTestRunEnd(
createMockTestModules({ passed: 0, failed: 0 }) as any,
[{ message: 'unhandled' }, { message: 'another' }] as any
);

expect(telemetry).toHaveBeenCalledWith(
'ai-setup-self-healing-scoring',
expect.objectContaining({
unhandledErrorCount: 2,
}),
expect.anything()
);
});

it('should reset collected results after each run', async () => {
reporter.onInit({ config: { watch: false } } as any);

reporter.onTestCaseResult(createMockTestCase({ storyId: 's1', status: 'passed' }) as any);
await reporter.onTestRunEnd(createMockTestModules({ passed: 1, failed: 0 }) as any, []);

reporter.onTestCaseResult(
createMockTestCase({
storyId: 's2',
status: 'failed',
errors: [{ message: 'err' }],
}) as any
);
await reporter.onTestRunEnd(createMockTestModules({ passed: 0, failed: 1 }) as any, []);

const secondCall = vi.mocked(telemetry).mock.calls[1];
expect(secondCall[1]).toEqual(
expect.objectContaining({
analysis: expect.objectContaining({
total: 1,
passed: 0,
}),
})
);
});
});
});
88 changes: 88 additions & 0 deletions code/addons/vitest/src/vitest-plugin/agent-telemetry-reporter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import type { SerializedError } from 'vitest';
import type { TestCase, TestModule, Vitest } from 'vitest/node';
import type { Reporter } from 'vitest/reporters';

import type { TaskMeta } from '@vitest/runner';
import type { Report } from 'storybook/preview-api';
import { analyzeTestResults, toStoryTestResult } from 'storybook/internal/core-server';
import type { StoryTestResult } from 'storybook/internal/core-server';
import { isExampleStoryId, telemetry } from 'storybook/internal/telemetry';
import type { AgentInfo } from 'storybook/internal/telemetry';

interface AgentTelemetryReporterOptions {
configDir: string;
agent: AgentInfo;
}

export class AgentTelemetryReporter implements Reporter {
private ctx!: Vitest;

private testResults: StoryTestResult[] = [];

private startTime = Date.now();

private configDir: string;

private agent: AgentInfo;

constructor(options: AgentTelemetryReporterOptions) {
this.configDir = options.configDir;
this.agent = options.agent;
}

onInit(ctx: Vitest) {
this.ctx = ctx;
}

onTestRunStart() {
this.startTime = Date.now();
}

onTestCaseResult(testCase: TestCase) {
const { storyId, reports } = testCase.meta() as TaskMeta &
Partial<{ storyId: string; reports: Report[] }>;

if (!storyId || isExampleStoryId(storyId)) {
return;
}

const testResult = testCase.result();
const result = toStoryTestResult({
storyId,
statusRaw: testResult.state,
reports,
errors: testResult.errors,
});

if (result) {
this.testResults.push(result);
}
}

async onTestRunEnd(
testModules: readonly TestModule[],
unhandledErrors: readonly SerializedError[]
) {
const analysis = analyzeTestResults(this.testResults);
const duration = Date.now() - this.startTime;

const testModulesErrors = testModules.flatMap((t) => t.errors());
const unhandledErrorCount = unhandledErrors.length + testModulesErrors.length;

// Fire and forget — same pattern as the existing test-run telemetry
telemetry(
'ai-setup-self-healing-scoring',
{
agent: this.agent,
analysis,
unhandledErrorCount,
duration,
watch: this.ctx.config.watch,
},
{ configDir: this.configDir, stripMetadata: true }
);

// Reset for next run (watch mode)
this.testResults = [];
}
}
Loading
Loading