Commit 43fa874
authored
🤖 fix: collapse right sidebar by default in Storybook (#1252)
## Problem
Right sidebar expansion state was non-deterministic across Storybook
stories because:
- Storybook/Chromatic preserves `localStorage` across story runs in the
same session
- `App.rightsidebar.stories.tsx` calls `expandRightSidebar()` to show
the sidebar
- Other stories that don't explicitly set sidebar state would inherit
whatever state was left behind
## Solution
Add `collapseRightSidebar()` to the global decorator in
`.storybook/preview.tsx`. This ensures every story starts with a
collapsed right sidebar, and stories that need it expanded call
`expandRightSidebar()` in their setup after the decorator runs.
Follows the same pattern already used for disabling tutorials globally.
---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking:
`high`_1 parent ffe9c34 commit 43fa874
1 file changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
| |||
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
| |||
0 commit comments