Skip to content
Draft
Prev Previous commit
Next Next commit
feat(server): send each proactive nudge's subject to the dashboard
  • Loading branch information
zakiego committed Nov 24, 2026
commit f2b62a14e2c1d8c5d1eb7ee26cb6a32387cecc13
3 changes: 2 additions & 1 deletion apps/server/internal/httpapi/rpcpeople/proactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type proactiveConnector struct {
type proactiveNudge struct {
ID string `json:"id"`
Kind string `json:"kind"`
Subject string `json:"subject"`
Status string `json:"status"`
Label string `json:"label"`
Reason *string `json:"reason"`
Expand Down Expand Up @@ -238,7 +239,7 @@ func proactiveFor(q db.Q, agentID string, now int64) (*proactiveView, error) {
}
sentOutboxes := map[string]bool{}
for _, n := range nudges {
v.Activity = append(v.Activity, proactiveNudge{ID: n.ID, Kind: n.Kind, Status: n.Status, Label: proactive.Label(n), Reason: n.Reason, SentAt: n.SentAt, EscalatedAt: n.EscalatedAt, WakeAt: n.WakeAt, UpdatedAt: n.UpdatedAt})
v.Activity = append(v.Activity, proactiveNudge{ID: n.ID, Kind: n.Kind, Subject: n.Subject, Status: n.Status, Label: proactive.Label(n), Reason: n.Reason, SentAt: n.SentAt, EscalatedAt: n.EscalatedAt, WakeAt: n.WakeAt, UpdatedAt: n.UpdatedAt})
if n.SentAt != nil && *n.SentAt >= dayStart && n.OutboxID != nil {
sentOutboxes[*n.OutboxID] = true
}
Expand Down