fix(sessions): sidebar "All" badge counts only genuinely live runs (v0.193.2)#324
Merged
Conversation
…0.193.2) The badge was keyed off `isLive`, which is deliberately broad: an interactive session that reported `done` but keeps an attachable pane reads live so its dot stays green and reattachable. That inflated the count with finished sessions whose tmux panes were never reaped (some days old) — the badge could read ~10 when only a handful were actually running. Count now mirrors the server's canonical `aliveSessionCount`: stored status `running` with a live (or unpollable) pane. A confirmed-dead running pane (alive === false) is mid-reap and excluded; alive undefined (poll failed / launcher backend) falls back to the stored status. Per-session dots and the reattach affordances still use `isLive`, unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The sidebar "All" session badge now counts only genuinely live runs.
It was keyed off
isLive, which is deliberately broad — an interactive session that reporteddonebut keeps an attachable pane reads live so its per-session dot stays green and reattachable. That inflated the badge with finished sessions whose tmux panes were never reaped (some days old on the live instance), so the count could read ~10 when only a handful were actually running.Fix
The badge now mirrors the server's canonical
aliveSessionCount:runningand a live (or unpollable) pane → countedalive === false) is mid-reap → excludedaliveundefined (poll failed / Linux launcher backend) → falls back to the storedrunningstatusPer-session status dots and the reattach affordances still use
isLive— unchanged. Only the aggregate badge changes.Verified
npm run typecheck✓cd web && npm run build✓instapodsDB + tmux socket: 10 lingering panes, only 4 at statusrunning— old fix counted 10, new count reflects the running set.🤖 Generated with Claude Code