From 5603d1cf2ad3b0151c5a3caf87adebed00d9a0bc Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 1 Sep 2026 22:57:57 +0200 Subject: [PATCH 01/17] fix: classify sessions with armed heartbeats as idle, not running An armed heartbeat between firings is residency, not work, so it no longer counts as a running signal anywhere: the roster classifier, the unified agents-view classifier, the ancestor-propagation overwrite, and the subagent count projections all drop the heartbeat clause. A firing heartbeat still lands in Running through its executing turn, and hasActiveHeartbeat stays on the wire for badges and labels. Idle rows with an armed heartbeat now label the next fire time (heartbeat - next 5m) when the aggregate knows it. Paused-only heartbeats, previously invisible, render a dimmed heartbeat badge without affecting the section. The delete confirmation warns when the targeted session or subagent still has an armed heartbeat; the daemon already cancels scheduled jobs in both delete paths. ENG-5847 --- .../eng-5847-heartbeat-idle-status.md | 3 + .../src/modes/agents-view/agents-view-mode.ts | 9 ++- .../modes/agents-view/agents-view-state.ts | 79 +++++++++---------- .../src/modes/daemon/agent-roster.ts | 9 +-- .../src/modes/daemon/daemon-mode.ts | 3 - .../components/subagent-summary-line.ts | 16 +--- .../src/modes/interactive/interactive-mode.ts | 21 ++--- .../coding-agent/test/agent-roster.test.ts | 33 +++----- .../test/agents-view-mode.test.ts | 58 +++++++++++++- .../test/agents-view-state.test.ts | 74 ++++++++++------- .../coding-agent/test/daemon-mode.test.ts | 12 +-- .../test/subagent-summary-line.test.ts | 9 ++- 12 files changed, 179 insertions(+), 147 deletions(-) create mode 100644 packages/coding-agent/.changes/eng-5847-heartbeat-idle-status.md diff --git a/packages/coding-agent/.changes/eng-5847-heartbeat-idle-status.md b/packages/coding-agent/.changes/eng-5847-heartbeat-idle-status.md new file mode 100644 index 0000000000..d58c1564f9 --- /dev/null +++ b/packages/coding-agent/.changes/eng-5847-heartbeat-idle-status.md @@ -0,0 +1,3 @@ +- Fixed sessions with armed heartbeats showing as Running forever in the agents view; between firings they now list as Idle with the heartbeat badge and a `heartbeat · next