Commit 93f39ee
fix(web): queued message UI flashes away before drain dispatches
transport-relay's onComplete emits session.state idle WITHOUT pending
message fields. The frontend was unconditionally clearing the queue on
idle, causing queued messages to visually disappear before the drain
event dispatches them (~100ms later).
Fix: only clear pending on idle when the event carries the
pendingMessages field (hasPendingMessagesField=true). transport-relay's
bare idle keeps existing pending; the subsequent runtime idle (with
pending=[]) or drain running event clears them authoritatively.
Applied to both main sessions (app.tsx) and sub-sessions
(useSubSessions.ts).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent cd2b58a commit 93f39ee
2 files changed
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
1424 | | - | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
1425 | 1435 | | |
1426 | 1436 | | |
1427 | 1437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
322 | 326 | | |
323 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
324 | 334 | | |
325 | 335 | | |
326 | 336 | | |
| |||
0 commit comments