Commit be889de
authored
🤖 fix: deflake Storybook ChatInput focus (#1138)
Deflakes Storybook App bash/chat/reviews stories by removing
timing-based focus sleeps.
- Refactors ChatInput workspace auto-focus from setTimeout(100) to
bounded requestAnimationFrame retries.
- Exposes `data-autofocus-state="pending|done"` on
`[data-component="ChatInputSection"]` so stories can wait
deterministically.
- Stops auto-focus attempts early if another element outside ChatInput
has focus (avoid fighting user/modals).
- Updates stories to `waitFor` auto-focus completion instead of
`setTimeout(150)`.
Validation:
- make static-check
- make storybook-build
- make storybook (background) + make test-storybook
---
_Generated with `mux` • Model: `unknown` • Thinking: `unknown`_1 parent 6fcca8b commit be889de
File tree
5 files changed
+154
-155
lines changed- .storybook
- src/browser
- components/ChatInput
- stories
5 files changed
+154
-155
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
0 commit comments