Commit 038007e
authored
🤖 fix: resolve bash tool story flakiness (#1083)
The `expandAllBashTools` helper had a race condition where it would find
and click expand icons before all messages had finished rendering.
**Root cause:** `createStaticChatHandler` sends messages async (50ms
delay), and `waitFor` succeeded as soon as *any* expand icons appeared,
missing tools that rendered in later React commits.
**Fix:**
- Add `data-loaded` attribute to message-window in AIView.tsx that
reflects the actual loading state (true when caught-up received)
- Update `expandAllBashTools` to wait for `data-loaded="true"` before
finding expand icons
This is non-racy because `data-loaded` only becomes true after
`caught-up` is processed, and all messages are sent before `caught-up`.
_Generated with `mux`_1 parent f4a1a82 commit 038007e
File tree
2 files changed
+15
-5
lines changed- src/browser
- components
- stories
2 files changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
| 565 | + | |
565 | 566 | | |
566 | 567 | | |
567 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | | - | |
30 | | - | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
37 | | - | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | | - | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
0 commit comments