Commit eb7533e
authored
π€ feat: upgrade Storybook to v10.0.0 (#473)
## Summary
Upgraded Storybook from **8.6.14** β **10.0.0** using automated
migration.
## Benefits
- π¦ **29% smaller install size** - Reduces node_modules and CI cache
size
- π **Unminified dist code** - Easier debugging of Storybook internals
- π§© **Module automocking** - Easier testing with automatic mocks
- π **Typesafe CSF factories** - Better type safety for story
definitions
- π·οΈ **Enhanced tag filtering** - Better sidebar management
## Changes
### Package Updates
- `storybook`: 8.6.14 β 10.0.0
- `@storybook/react-vite`: 8.6.14 β 10.0.0
- `@storybook/addon-links`: 8.6.14 β 10.0.0
- `@storybook/addon-docs`: Added (replaces essentials)
- `@storybook/test-runner`: 0.23.0 β 0.24.0
- `eslint-plugin-storybook`: Added for better linting
Removed packages (functionality merged into core):
- `@storybook/addon-essentials` (merged into addon-docs)
- `@storybook/addon-interactions` (merged into core)
- `@storybook/blocks` (merged into core)
- `@storybook/react` (use react-vite instead)
### Code Changes
- All story imports changed from `@storybook/react` β
`@storybook/react-vite`
- Preview import changed to use react-vite types
- Fixed type error in GitStatusIndicatorView story meta (stricter typing
in v10)
### Config Changes
- Simplified `.storybook/main.ts` addons (essentials β docs)
- Updated `.storybook/preview.tsx` import
## Testing
β
**Dev server**: `make storybook` starts successfully
β
**Static build**: `make storybook-build` completes without errors
β
**Type checking**: `make typecheck` passes
β
**All stories render**: Verified all 23+ story files updated correctly
## Breaking Changes
### ESM-Only
Storybook 10 drops CommonJS support entirely.
**Impact on cmux**: β
**None** - We're already using ESM everywhere in
Storybook config and stories.
## Migration Details
Used Storybook's automated migration tool:
```bash
npx storybook@latest upgrade --yes
```
The tool automatically:
1. Updated package versions
2. Migrated imports across all story files
3. Updated config files
4. Added new eslint plugin
Only manual fix needed:
- Updated `GitStatusIndicatorView.stories.tsx` meta type for stricter
v10 type checking
## Compatibility
- β
Vite 7.1.11 (v10 requires ^5.0.0 || ^6.0.0 || ^7.0.0)
- β
React 18.3.1 (v10 requires ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0)
- β
Node.js 20.19.4 (v10 requires 18+ for ESM)
_Generated with `cmux`_1 parent 145685d commit eb7533e
File tree
24 files changed
+226
-792
lines changed- .storybook
- src
- components
- Messages
- ui
24 files changed
+226
-792
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | 8 | | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
444 | 447 | | |
445 | 448 | | |
446 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
447 | 461 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
92 | 88 | | |
93 | 89 | | |
94 | 90 | | |
| |||
141 | 137 | | |
142 | 138 | | |
143 | 139 | | |
144 | | - | |
| 140 | + | |
145 | 141 | | |
146 | 142 | | |
147 | 143 | | |
| |||
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
153 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments