Skip to content

Toast notifications for agent status changes #79

@TechDufus

Description

@TechDufus

Parent: #77

Problem

When an agent transitions from working to waiting (needs user input), it's easy to miss. The current status is shown on ticket cards but requires actively looking at the board.

Current State

  • Status polling via agent/status.go detects AgentWorking, AgentWaiting, AgentIdle
  • Status shown as badge on ticket cards and in header activity indicator
  • m.notify() shows ephemeral messages in status bar (3 second timeout)
  • No active notification when status changes

Proposed Solution

Track Status Transitions

  • Store previous status per ticket
  • Detect meaningful transitions on each poll

Notify on Key Transitions

Transition Notification Priority
Working → Waiting "⏸ Agent needs input: {title}" High
Working → Idle "✓ Agent idle: {title}" Medium
Working → Error "✗ Agent error: {title}" High
Any → Completed "✓ Agent completed: {title}" Medium

Interactive Toast

Toast notifications should be interactive with two actions:

  1. Click to attach - Clicking the toast attaches you to that agent's session
  2. Dismiss - Click × or press Esc to dismiss without action
┌─────────────────────────────────────────┐
│ ⏸ Agent needs input: Fix login bug  [×] │
└─────────────────────────────────────────┘
        ↑ click to attach      ↑ dismiss
  • Toast persists until dismissed or clicked (no auto-timeout for "waiting"?)
  • Or: longer timeout (10-15s) with manual dismiss option
  • Could also support keyboard: Enter to attach, Esc to dismiss

Additional Notification Options (configurable?)

  1. Ticket highlight - flash or highlight the ticket card briefly
  2. Terminal bell - \a for audible alert (optional, config flag)
  3. Stack multiple - if multiple agents need attention, show count or stack toasts

Implementation Notes

  • Add previousAgentStatus map in Model or per-ticket
  • Check for transitions in agentStatusResultMsg handler
  • New toast struct: { ticketID, message, timestamp, dismissable }
  • Add click handlers for toast body (attach) and dismiss button
  • Could add config.Behavior.AgentNotifications settings

Open Questions

  • Auto-timeout or persist until dismissed for "waiting" status?
  • Should toasts stack or replace each other?
  • Position: top-right overlay? bottom status area? floating?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions