Repository navigation
Commit 3e7acb8
committed
fix(timeline): trust session_status only for working derivation
Stuck 'Thinking' shimmer on the timeline progress glide. Our commit
17 (128a2c9) added `!!pending() || sessionStatus().type !== "idle"`
to the working memo, intending it as a self-heal. It's actually a
permanent false positive: pending() reads the DB-persisted message
list, and any assistant message that ever crashed mid-stream stays
incomplete (time.completed = undefined) forever. The result is that
sessions which previously crashed show 'working' forever even after
session_status correctly reports idle.
session_status reliably goes to idle on:
- processor.ts halt path (status.set idle on assistant error)
- run-state.ts cancel path (status.set idle when no runner exists)
- runner.ts onIdle (fires on any fiber exit: success/failure/interrupt)
Trust status only. The pending() memo is still used for
activeMessageID derivation (commit 17's last-msg-only change is
preserved there).
Empirical: 12 incomplete assistant messages persist in opencode-aai.db,
including one in the actively-debugged session created today. This
commit eliminates the user-visible symptom for the timeline.
Companion commits will apply the same trust-status-only pattern to
session.tsx::busy(), sidebar-items.tsx::SessionItem.isWorking, and
tighten session-turn.tsx::pending. Each is intentionally split so it
can be reverted independently if upstream PR anomalyco#17593 lands.
Refs upstream PR anomalyco#17593.1 parent 7a2f630 commit 3e7acb8
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
| |||
0 commit comments