reminders: persist + surface delivery failures
Broker schema gains attempt_count INTEGER + last_error TEXT
columns via idempotent ALTER TABLE migration (pragma-probed so
fresh + existing dbs converge). reminder_scheduler::tick calls
record_reminder_failure on every deliver_reminder error,
bumping the counter + stashing the message. get_due_reminders
filters out rows where attempt_count >= MAX_REMINDER_ATTEMPTS
(5) so the scheduler stops retrying a stuck row until the
operator intervenes.
new POST /retry-reminder/{id} → reset_reminder_failure clears
the counters; next 5s tick re-attempts. cancel-reminder
unchanged (hard-delete).
dashboard renders failed rows with a red left rule, the error
text inline, and a ⚠ N failed badge. ↻ R3TRY button appears
when attempt_count > 0 — sits next to ✗ C4NC3L in a small
actions row below the body.
This commit is contained in:
parent
d395bdc945
commit
978a3cf391
5 changed files with 173 additions and 8 deletions
|
|
@ -474,6 +474,25 @@ summary:hover { color: var(--purple); }
|
|||
word-break: break-word;
|
||||
margin: 0.3em 0;
|
||||
}
|
||||
.reminder-row.reminder-failed {
|
||||
border-left: 2px solid var(--red, #f38ba8);
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
.reminder-error {
|
||||
color: var(--red, #f38ba8);
|
||||
background: rgba(243, 139, 168, 0.06);
|
||||
border: 1px solid rgba(243, 139, 168, 0.25);
|
||||
padding: 0.3em 0.5em;
|
||||
font-size: 0.85em;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
margin: 0.2em 0;
|
||||
}
|
||||
.reminder-actions {
|
||||
display: flex;
|
||||
gap: 0.4em;
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
|
||||
/* Path linkification — agents drop pointer strings into messages
|
||||
constantly; clicking the anchor expands a sibling <details> that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue