Merge pull request #347 from sauerdaniel/polecat/nux-mail-notification-fix

Reviewed by gastown/crew/jack - clean fix using established NudgeSession pattern
This commit is contained in:
Steve Yegge
2026-01-12 01:47:11 -08:00
committed by GitHub

View File

@@ -863,7 +863,7 @@ func (r *Router) GetMailbox(address string) (*Mailbox, error) {
}
// notifyRecipient sends a notification to a recipient's tmux session.
// Uses send-keys to echo a visible banner to ensure notification is seen.
// Uses NudgeSession to add the notification to the agent's conversation history.
// Supports mayor/, rig/polecat, and rig/refinery addresses.
func (r *Router) notifyRecipient(msg *Message) error {
sessionID := addressToSessionID(msg.To)
@@ -877,8 +877,9 @@ func (r *Router) notifyRecipient(msg *Message) error {
return nil // No active session, skip notification
}
// Send visible notification banner to the terminal
return r.tmux.SendNotificationBanner(sessionID, msg.From, msg.Subject)
// Send notification to the agent's conversation history
notification := fmt.Sprintf("📬 You have new mail from %s. Subject: %s. Run 'gt mail inbox' to read.", msg.From, msg.Subject)
return r.tmux.NudgeSession(sessionID, notification)
}
// addressToSessionID converts a mail address to a tmux session ID.