Repository navigation
Description
What happened
Pressing Stop on a running thread makes its sidebar row show the green Done badge, as if the turn completed successfully. I saw it on two threads I stopped on 2026-11-15 around 02:31 UTC. Both runs were restart continuations that followed a server restart at 02:30:37Z; I stopped those continuations.
Diagnosis
The badge is hasUnseenCompletion in apps/web/src/components/Sidebar.logic.ts. It returns true whenever latestRun.completedAt is later than lastVisitedAt and never checks latestRun.status. A stopped run is stored as interrupted (or cancelled) with completedAt set, so the row treats the stop as an unseen completion and shows Done. Opening the thread advances the visit watermark and clears the badge.
The same helper also feeds the "Completed" status pill. The timeline shows "Run interrupted", and the desktop notification path only fires for status "completed", so the sidebar is inconsistent with those surfaces. PR #20996 fixed the failed-run case by adding the separate hasUnseenRunFailure status check; interrupted and cancelled runs still fall through. Ignoring interrupted/cancelled runs in hasUnseenCompletion would match that fix.
Steps to reproduce
- Open a thread at least once so lastVisitedAt is set, then leave it.
- Start a turn and press Stop.
- Switch away before the visit update lands, or stop it from another client. If the stopped thread stays open, its visit tracker can clear the badge as the stop arrives.
- The stopped thread's row shows the green Done badge.
Version
0.1.10-nightly.20261114.4709
Environment
Desktop client 0.1.10-nightly.20261114.4709 on Windows, server on Linux x64 (WSL2), Node v26.13.1. Provider: OpenCode, opencode-go/deepseek-v4.1-flash. The check is unchanged on main (b732621).
Evidence
thread 7917049b ("Suggest Next Prompt Usage Impact")
run 1 cancelled completed_at 2026-11-15T02:30:37.437Z
run 2 interrupted completed_at 2026-11-15T02:31:02.686Z (restart continuation of run 1)
thread dc68204e ("Explain What the Project Does")
run 50 cancelled completed_at 2026-11-15T02:30:37.583Z
run 51 interrupted completed_at 2026-11-15T02:31:06.361Z (restart continuation of run 50)
triage session created 2026-11-15T02:31:22Z. A plain Stop with no restart was not captured separately.Related issues
#20996 fixed the failed-run case with a status check. #25585 is about a false Done badge while background work is still pending, a different trigger.
Fix applied or workaround
Open the stopped thread. The visit advances lastVisitedAt and clears the badge.
Filed by
DeepSeek V4.1 Flash via t3 triage (OpenCode). Reviewed by Claude Opus 5.5 high on Kiro.
Activity
fix(mobile): a stopped run no longer shows Done in the thread list