Conversation
The completed (done) activity check persisted on a session tab even after the user opened that session to review it. It only cleared on a new turn, revert, resume, submit, or delete. Clear it on the focus transition instead: when currentSessionID changes to a session already in the done state, drop its close outcome so every surface (sidebar tabs, native editor tabs, Agent Manager tabs, worktree cards) that derives from the shared activity map updates. A session that completes while already focused keeps its check; waiting and error states are never cleared by focus.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 148.1K · Output: 16.4K · Cached: 653.6K Review guidance: REVIEW.md from base branch |
|
Thanks @ehudc, this makes sense. Opening a finished result is a good point to clear its notification. I prepared a follow-up locally to make this consistent for worktrees, subagent tabs, returning from Review, and sidebar/editor focus. It shares acknowledgement across views without clearing busy, waiting, or error states, and keeps the actual turn outcome intact. Regression tests, lint, typechecks, and the build pass, and I verified the flows in isolated VS Code. Can you enable Allow edits from maintainers so I can push the follow-up and finish the checks? It is currently disabled, so these additions are not on this PR yet. |
|
I opened #13731 to supersede this PR with the original behavior plus consistent worktree, subagent, sidebar, and editor handling. Thanks for the original fix, clearing the notification when opening the result makes sense. For future PRs, I recommend enabling Allow edits from maintainers so we can add follow-up fixes directly to your branch instead of opening a replacement. |
|
@marius-kilocode Thanks, didn't know about that setting for edits, and I'll close this PR with your other branch superseding it. |




Fixes #13702
Context
Follow-up to #13504, which added session-activity icons to tabs. A session's completed (
✓) indicator persists on its tab even after you open that session to review it. The check only clears on a new turn, revert, resume, submit, or delete — so when a background session finishes, you see the✓from another tab, click in to review, and the✓stays. That makes it hard to tell, across many tabs, which completed sessions you've already looked at.Implementation
The activity state for every surface (sidebar tabs, native editor tabs, Agent Manager tabs, worktree cards) is derived from one shared map computed from
closeMap(outcomes), statuses, blocked, and submitting — notably not from which tab is focused. The completed outcome is only dropped byclearClose(id), whose callers are new turn / revert / resume / submit / delete.This adds one more trigger: when
currentSessionIDchanges to a session that is already in thedonestate, clear its close outcome. It's keyed on the focus transition viaon(currentSessionID, ...), deliberately not a continuous effect — so a session that completes while it's already the focused tab still shows its check (it only clears once you navigate away and back). Because all surfaces read the same derived map, clearing in this one place updates every surface.Scope is intentionally narrow: only
doneis acknowledged on focus.waiting(needs input/permission) anderrorare never cleared by focus, since those are unresolved states that must persist until the user actually acts.Screenshots / Video
clear-done-kilo-tab.mov
How to Test
Manual/local verification
bun test tests/unit/session-provider-activity.test.ts— passes. Added assertions cover (a) a session that completes while another tab is focused showsdone, then clears when you switch to it, and (b) the guardrail: switching to a tab in thewaitingstate does not clear it.bun run check-types:webview— clean.eslinton the two changed files — clean.✓shows on the background tab and clears on clicking into it; a⚠needs-input tab does not clear on click.Reviewer test steps
✓.✓clears now that A is focused.⚠persists (onlydoneclears on focus).