Skip to content

fix(coding-agent): always render inactive sessions in the agents view - #2091

Merged
sethkarten merged 2 commits into
mainfrom
fix/agents-view-always-show-inactive
Sep 8, 2026
Merged

fix(coding-agent): always render inactive sessions in the agents view#2091
sethkarten merged 2 commits into
mainfrom
fix/agents-view-always-show-inactive

Conversation

@snimu

@snimu snimu commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes RES-1316

Purpose

Inactive sessions must always render in the agents view; search is the filter. This partially reverts #2087's inactive-collapse ("Collapsed inactive sessions by default. Search still includes them; Alt+I toggles the section."), which was merged via the #2068 consolidation. Beyond the product decision, the Alt+I toggle is unreachable on default macOS terminals: the composed character goes to the always-focused search editor, so users could not reveal the hidden sessions.

Changes (surgical revert of one feature; everything else from the #2068 consolidation stays)

  • compactSessionRows no longer gates depth-0 blocks on the inactive section; it keeps folding subagent-summary rows (that folding serves the running-subagents display items, which remain).
  • Both call sites lose the showInactive plumbing (the query no longer doubles as a reveal switch — it filters, as before the collapse).
  • Removed the app.agents.inactiveCollapse keybinding (type map + alt+i default), its input handler, the Inactive-header ▸/▾ prefix + Alt+I hint, and the actions-panel line.
  • Removed persistentState.inactiveExpanded (writer + type). The state object is in-process only — it is never serialized to disk — so a stale property from an older view instance is simply never read; nothing needs migration.

Tests

  • Flipped the collapse pin to the new contract: inactive rows render immediately with fresh persistent state (fails on current main), a stale inactiveExpanded: false is ignored, the old Alt+I chord hides nothing, and search still narrows to matches only.

LOC

Total src: +7/−36 (net -29); tests: +10/−12 (net -2). Net-negative surgical revert: the inactive-collapse gating, alt+i keybinding, header hint, actions line, and persisted flag deleted; kept consolidation features untouched. +1 changelog fragment.

Validation

  • npm run check green (pre-commit hook).
  • agents-view-mode (36), agents-view-state (77), 502 regressions (15), keybinding-hints green; reverting the src hunks fails exactly the flipped pin.

Note

Low Risk
Agents-view UI and list filtering only; no auth, daemon protocol, or persistence migration changes.

Overview
Inactive sessions are always visible in the agents view; the Alt+I collapse toggle is removed because it was hard to reach when search input captures keys on macOS.

Row building no longer hides the inactive section: compactSessionRows only drops subagent-summary rows, and search text filters the list instead of acting as a reveal switch. UI cleanup removes the inactive header ▸/▾ affordance, the actions-panel hint, and app.agents.inactiveCollapse from keybindings. inactiveExpanded is dropped from in-process persistent state (stale values are ignored).

Tests now assert inactive rows appear on load, Alt+I does nothing, and only a non-matching search hides them.

Reviewed by Cursor Bugbot for commit 12fefcd. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Always render inactive sessions in agents-view-mode

Removes the collapse/expand toggle for inactive sessions in the agents view so they always render. Search remains the only way to filter sessions out.

  • Deletes the app.agents.inactiveCollapse keybinding (Alt+I) from keybindings.ts and the inactiveExpanded persistent-state property from agents-view-mode.ts
  • Strips the showInactive parameter from compactSessionRows; inactive top-level rows are always retained and only subagent-summary rows are folded
  • Removes collapse/expand markers and the Alt+I hint from section headings and the actions panel
  • Risk: any persisted inactiveExpanded state from older sessions is now ignored; no migration is performed, but the stale value has no effect

Macroscope summarized 12fefcd.

Partially reverts #2087's inactive-collapse (merged via the #2068
consolidation) per user decision: inactive sessions always render and
search is the filter. Removes the Alt+I keybinding (unreachable on
default macOS terminals, where the composed character feeds the
always-focused search editor), the compactSessionRows inactive gating,
and the persisted inactiveExpanded flag; stale flags from older state
objects are ignored. The subagent-summary row folding stays. Fixes RES-1316.
@sethkarten
sethkarten self-requested a review September 8, 2026 22:35
@sethkarten
sethkarten merged commit 0c68732 into main Sep 8, 2026
24 checks passed
@sethkarten
sethkarten deleted the fix/agents-view-always-show-inactive branch September 8, 2026 22:37
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.

2 participants