Commit 99d17b7
authored
🤖 tests: stabilize Storybook left sidebar state (#2937)
## Summary
Stabilize Storybook app stories that were flaking because the left
sidebar could inherit the previous story's persisted open/closed state.
## Background
Stories such as "All Reviews Checked" could render with the wrong
left-sidebar visibility when Storybook reused localStorage and an
existing AppLoader instance across captures. That made visual snapshots
depend on whichever story ran before them.
## Implementation
- reset `LEFT_SIDEBAR_COLLAPSED_KEY` before each Storybook render using
the same mobile/desktop default that the app uses
- key `AppWithMocks` by story id plus a viewport bucket so crossing the
mobile breakpoint forces a fresh `AppLoader` mount
- keep per-story overrides intact so stories that intentionally open or
collapse the left sidebar still control their own state
## Validation
- `make static-check`
- `make storybook-build`
## Risks
Low risk. The change is isolated to Storybook wiring and only affects
how persisted sidebar state is seeded for stories.
---
_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` •
Cost: `$2.50`_
<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=2.50 -->1 parent 640a087 commit 99d17b7
2 files changed
+26
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
131 | 144 | | |
132 | 145 | | |
133 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
93 | | - | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
0 commit comments