Repository navigation
fix(sidebar): count sessions awaiting input apart from running ones when folded - #1423
Conversation
…hen folded A collapsed project group and the collapsed pinned section counted a session parked on an extension dialog as running, so the amber awaiting-input dot of the expanded row turned into the blue spinner. Folded headers now count awaiting families on their own: an amber dot and count in a group's summary, an amber dot on the pinned header, and the spinner only for families still working. Closes agegr#1400 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. I reproduced #1400 on main with a tree-model test: a group and a pinned section whose only sessions await input both reported The branch conflicted with main: #1357 removed |
Closes #1400
Problem
A session parked on a blocking extension dialog shows the amber "waiting for your input" dot while its project is expanded. Once the project is collapsed, the group's summary counts it as running and shows the blue spinner instead, as if work were still going on. The collapsed pinned section does the same with its blue dot.
Reproduce on
mainAdd a global extension, e.g.
~/.pi/agent/extensions/ask.js:In a saved session, send
/askand leave the dialog open. The row shows the amber dot.Collapse its project: the header shows the spinner and
1. Pin the session and collapse the pinned section: the header shows the blue running dot.Cause
buildSessionTree()(lib/session-tree.ts) gives the group and pinned-header rows onlyrunningandunreadcounts.awaitingIdsis a subset ofrunningIds, so an awaiting family is counted as running, while its row shows the awaiting state first.Fix
activityCounts()counts each family the way its row shows it: awaiting input if any member awaits, else running if any member runs; unread as before. The group and pinned-header rows carry the newawaitingcount, andrunningno longer includes awaiting families.ActivitySummaryshows an amber dot and count beside the spinner's count, and the collapsed pinned header gets an amber dot. Both use the existingsidebar.agentAwaitingInputlabel and the awaiting dot's#d97706, so no new strings.ProjectWorktreePicker) still count runs only;ActivitySummary'sawaitingdefaults to 0 there.docs/agents/sessions.mdsaid the group and pinned-header counts stay unchanged for awaiting sessions (from #1145). I updated that note, since this PR changes it as #1400 asks.Checks
npm test(2872 passed, 1 skipped, 0 failed),node_modules/.bin/tsc --noEmit,npm run lint./askand another running a long extension command in the same project: the collapsed group shows⟳ 1 ● 1(amber). With the awaiting session pinned and the pinned section collapsed, its header shows only the amber dot.🤖 Generated with Claude Code