Skip to content

fix(sessions): sidebar "All" badge counts only genuinely live runs (v0.193.2)#324

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/sidebar-live-count
Jul 14, 2026
Merged

fix(sessions): sidebar "All" badge counts only genuinely live runs (v0.193.2)#324
vikasprogrammer merged 1 commit into
mainfrom
feat/sidebar-live-count

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

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 reported done but 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:

const runningSessions = sessions.filter((s) => s.status === 'running' && s.alive !== false).length
  • stored status running and a live (or unpollable) pane → counted
  • a running row with a confirmed-dead pane (alive === false) is mid-reap → excluded
  • alive undefined (poll failed / Linux launcher backend) → falls back to the stored running status

Per-session status dots and the reattach affordances still use isLiveunchanged. Only the aggregate badge changes.

Verified

  • npm run typecheck
  • cd web && npm run build
  • Confirmed against the live instapods DB + tmux socket: 10 lingering panes, only 4 at status running — old fix counted 10, new count reflects the running set.

🤖 Generated with Claude Code

…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>
@vikasprogrammer vikasprogrammer merged commit 2f269c1 into main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant