Skip to content

Stopping a thread midway shows a green Done badge in the sidebar #37469

Closed

Description

@satyalyadav

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

  1. Open a thread at least once so lastVisitedAt is set, then leave it.
  2. Start a turn and press Stop.
  3. 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.
  4. 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

  1. added
    via-triage
    on Nov 16, 2026
  2. added a commit that references this issue on Nov 16, 2026
    5b8fbb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions