Event log: show attempt and delivery times, label replays, zone event times (closes #386)
check / check (push) Successful in 3m19s

Each attempt shows when it was recorded and each delivery when it was
created, in the event log and on the event's page. The event log's
event times read as the recent events list does: how long ago, with
the full UTC time on hover.

A delivery records whether Replay created it, in a new replay column
added to the delivery model in place. Such a delivery is labelled a
replay in the event's summary line and in both pages' delivery lists.

Model: opus-5-5
This commit is contained in:
2026-10-03 00:52:03 +00:00
parent bcdd4791ec
commit 92dbfc8996
12 changed files with 152 additions and 9 deletions
@@ -3,6 +3,7 @@ package handlers
import (
"time"
"github.com/dustin/go-humanize"
"sneak.berlin/go/webhooker/internal/delivery"
)
@@ -47,6 +48,11 @@ type DeliveryResultView struct {
AttemptNum int
Success bool
// Ran is how long ago the attempt was recorded, and RanUTC the
// full timestamp the page shows on hover.
Ran string
RanUTC string
// StatusCode is 0 when the attempt never got a response,
// which is why the page asks HasStatusCode rather than
// printing the number.
@@ -160,6 +166,8 @@ func (r *deliveryResultRow) view(
return DeliveryResultView{
AttemptNum: r.AttemptNum,
Success: r.Success,
Ran: humanize.Time(r.CreatedAt),
RanUTC: r.CreatedAt.UTC().Format(time.DateTime) + " UTC",
StatusCode: r.StatusCode,
Error: redactor.Redact(r.Error),
DurationMS: r.Duration,