- Added run.started, run.tokens, run.completed events for every completed task
- Token estimates based on time tracked and task complexity
- Metrics tab now displays agent run data for all historical tasks
- Added create-review-tasks.sh script
- Updated activity and status history
- Add digest service for 24h activity aggregation
- Add GET /api/digest/daily endpoint (JSON and Teams format)
- Add GET /api/digest/daily/preview for testing
- Add scripts/daily-digest.sh for cron scheduling
- Skip empty digests when no activity
Content includes:
- Tasks completed/created/in-progress counts
- Agent runs with success rate by agent
- Token usage by agent
- Top accomplishments (recently done tasks)
- Failed runs and blocked items
- Created useTaskMetrics hook to fetch and aggregate telemetry events for a task
- Built TaskMetricsPanel component with:
- Summary cards for total runs, success rate, duration, tokens, cost
- Last run status display
- Expandable per-attempt breakdown with full details
- Integrated as new 'Metrics' tab in TaskDetailPanel
- Fetches via GET /api/telemetry/events/task/:taskId endpoint
- Create useRealtimeAgentStatus hook with WebSocket subscription
- Subscribe to agent:status events as primary transport
- Fall back to polling every 10s when WebSocket disconnects
- Auto-reconnect on WebSocket disconnect (via useWebSocket)
- Stale detection marks agent as idle after 5+ min without updates
- Memoized return value to prevent unnecessary re-renders
- Full TypeScript types for AgentStatusData, SubAgent, AgentStatusState
- Maintain backwards compatibility with useGlobalAgentStatus (polling-only)