Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Follow-up to #13504.
Summary
When I'm in a different tab and another session finishes, I correctly see the ✓ on that other tab. But when I click into that completed tab to review it, the ✓ stays. I'd expect focusing/opening the tab to count as "I've seen it" and clear the completion indicator.
I traced the code and the indicator is deliberately only cleared on a few specific events. This issue is a request to also clear it on focus.
Why
The ✓ is an "attention / here's a result" signal. Once I've opened the session and looked at it, the signal has served its purpose. Leaving it on makes it hard to tell, at a glance across many tabs, which completed sessions I've actually reviewed vs. which I still need to look at.
Every other attention state effectively resolves when I act on it; completion is the one that lingers even after I've looked.
Where this lives in the code (main @ 8731e28)
The tab icon is derived from a per-session activity state. done (✓) is produced whenever a session has a completed outcome:
webview-ui/src/utils/session-activity.tsL13-L21 —activity()returns"done"whenfinished(outcome reasoncompleted).
The activity map is recomputed from statuses, outcomes, blocked, and submitting — but not from which tab is currently focused:
webview-ui/src/context/session.tsxL1816-L1830 —activities({...})inputs.currentSessionID()is not among them, so focusing a tab can't change its icon.
The completed outcome is only cleared by clearClose(id):
- def, L172-L179
- callers: new turn starts (L1558), revert (L1856), session removed (L1941), submit message (L2179), slash command (L2277), resume (L2323), revertSession (L2716).
None of these fire on focusing/selecting a tab, which matches #13504's description (it lists what clears state as "answering a request, starting a new turn, or reverting").
Proposed change
When a session in the done state becomes the focused/current session, clear its completion outcome (call clearClose(id), or feed currentSessionID() into the activities() computation as a "seen" signal).
Important guardrail: only clear done. Do not clear waiting (needs input/permission) or error/failed on focus — those represent unresolved states that should persist until the user actually acts, and auto-dismissing them on a glance would hide real attention items. Scope the clear-on-focus specifically to the completed state.
Open questions for implementation
- Should it clear the moment the tab is focused, or only after the transcript is actually rendered/scrolled?
- Should this apply uniformly across all surfaces (sidebar tabs, native editor tabs, Agent Manager tabs, worktree cards), or just the tab the user clicked?
Activity