Repository navigation
Commit ef4e181
committed
fix(session-turn): last-message-only pending guard
session-turn.tsx::pending used findLast over the full message list,
treating any older assistant message without time.completed as the
pending one. Combined with active() and pendingUser() derivations,
that meant the wrong turn could show as 'active' (drove the
'Thinking' shimmer in session-turn) for sessions with DB residue
from a previously-crashed stream.
Tighten to last-message-only: only the final message in the list
can legitimately be the pending assistant message. Matches the
pattern in upstream PR anomalyco#17593's commit 060f482.
Combined with 3e7acb8, 91ae391, and 347095d, this closes the
client-side stuck-Thinking / stuck-busy bug end-to-end:
- timeline working derivation: trusts status (3e7acb8)
- session.tsx::busy() helper: trusts status (91ae391)
- sidebar SessionItem.isWorking: trusts status (347095d)
- session-turn.tsx::pending: last-message-only (this commit)
The persistent DB residue (12 incomplete assistant messages in the
live aai.db) is now ignored by all UI working-state derivations.
Server-side fix to stop NEW residue from accumulating is a separate
follow-up (see docs/plans/stuck-session-status.md commit 2).
Refs upstream PR anomalyco#17593.1 parent 347095d commit ef4e181
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
| |||
0 commit comments