fix(ui): Instructions replaces SOUL in routes and agent pages; terse alerts; missing-key hint

This commit is contained in:
sam committed 2026-10-18 19:27:11 +11:00
1 parent bf47a9f540
commit 66ec3437fc
9 files changed
+26 -23

No files matched your search

@@ -55,22 +55,22 @@ func syncTaskAlerts(ctx context.Context, q *postgresdb.Queries, p postgresdb.Ins
subject := fmt.Sprintf("task:%d", p.TaskID)
link := fmt.Sprintf("/tasks/%d", p.TaskID)
name := fmt.Sprintf("Task #%d", p.TaskID)
described := name
title := name
if info.Title != "" {
described = fmt.Sprintf("%s %q", name, info.Title)
title = info.Title
}
key := func(kind string) alert.Key {
return alert.Key{Org: org.OrgID(info.OrgID), Kind: kind, Subject: subject}
}
if needsHuman(p.ToStatus, info.ParkClass) {
body := described + " is waiting for your approval or review."
body := name + " is waiting for approval or review."
if p.ToStatus == workflow.StatusParked {
body = described + " is parked and needs a decision."
body = name + " is parked and needs a decision."
}
_, err := raiseAlert(ctx, q, alert.Input{
Key: key(alert.KindTaskNeedsHuman), Severity: alert.SeverityAction, Condition: true,
Title: name + " needs attention", Body: body, Link: link,
Title: title, Body: body, Link: link,
})
if err != nil {
return err
@@ -83,7 +83,7 @@ func syncTaskAlerts(ctx context.Context, q *postgresdb.Queries, p postgresdb.Ins
if failed(p.ToStatus, info.ParkClass) {
_, err := raiseAlert(ctx, q, alert.Input{
Key: key(alert.KindTaskFailed), Severity: alert.SeverityWarning,
Title: name + " failed", Body: described + " failed and will not run again until you retry it.", Link: link,
Title: title, Body: name + " failed and will not run again until you retry it.", Link: link,
})
return err
}