Commit Graph

5 Commits

Author SHA1 Message Date
gsxdsm
e40fec4356 fix(dashboard): state-drive agent health + remove Stop buttons from detail view
agentHealth.tsx:
- Drop the "Disabled" label and isHeartbeatEnabled helper. Server-side
  heartbeat scheduling is driven by agent.state (active/running = armed),
  not by the legacy runtimeConfig.enabled flag, so surfacing "Disabled" for
  agents with a stale flag on disk was misleading.
- Replace the elapsed > heartbeatTimeoutMs check with elapsed > 2× effective
  interval (with a 60s floor). heartbeatTimeoutMs is the per-run work budget,
  not a between-tick freshness window; using it made any agent configured
  with a multi-minute+ interval show Unresponsive the moment it got more
  than 60s old. The effective interval resolver now falls back to the
  server-side 1h default, so agents never configured via the dropdown and
  agents with an explicit interval get consistent treatment, differing only
  by scheduled cadence.

AgentDetailView.tsx:
- Remove Stop buttons from active/paused/running/error (mirrors the earlier
  AgentsView cleanup — Pause/Resume/Retry cover reversible transitions,
  Delete stays on idle/terminated for teardown).
- Add a "Next Heartbeat" info row alongside "Last Heartbeat" for ticking
  agents (active/running), computed as lastHeartbeatAt + effective interval.

Tests rewritten to cover the new semantics; dropped 14 obsolete cases that
were pinned to the old heartbeatTimeoutMs-based check and the "Disabled"
branch. 42 agentHealth tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 21:46:37 -07:00
Fusion
148a2ad017 feat(FN-2211): suppress redundant agent health labels
- Add stateDerived metadata to AgentHealthStatus to indicate when health text only mirrors agent.state
- Update getAgentHealthStatus to set stateDerived consistently across terminated, error, paused, running, heartbeat, idle, and disabled paths
- Update AgentDetailView, AgentListModal, and AgentsView to render icon-only health badges when labels are state-derived while preserving full labels via title tooltips
- Expand agentHealth tests with explicit stateDerived assertions and a table-driven semantics suite for representative states
2026-04-21 08:05:20 -07:00
Fusion
01eabe4aa7 fix(FN-2040): prevent false unresponsive agent states
- Apply a default 30s heartbeat interval when scheduler config is missing or invalid
- Dynamically register and update heartbeat triggers from AgentStore create/update events
- Register all non-disabled agents at startup and guard listener cleanup when stopping runtime
- Treat non-periodic agents as healthy in dashboard health checks to avoid stale-time false alarms
- Expand engine and dashboard tests and add a patch changeset for @gsxdsm/fusion
2026-04-17 20:40:06 -07:00
gsxdsm
d4f42787d1 feat(FN-1661): merge fusion/fn-1661 (auto-resolved)
- feat(FN-1661): complete Step 4 — document task-worker health fix
- feat(FN-1661): complete Step 3 — verify task-worker agent health fix
2026-04-13 08:54:19 -07:00
gsxdsm
9544a79290 feat(FN-1491): add centralized agent health status utility
- Create agentHealth.tsx utility with consistent health status logic
- Update AgentDetailView, AgentListModal, and AgentsView to use centralized utility
- Add comprehensive tests for health status edge cases
- Update agents.md documentation with health status reference
- Add changeset for @gsxdsm/fusion patch release
2026-04-09 22:58:47 -07:00