Show 50 recent events with size, processing time and status (closes #347)
check / check (push) Successful in 4m30s

The recent events list on a webhook's page now shows the 50 newest
events, each with its time relative to now (the full UTC timestamp on
hover), its body size, its processing time and, when the webhook has
exactly one HTTP target, that target's last HTTP status, colour-coded.
Resubmitted copies are marked, as in the event log.

Each event now records its body's size in bytes when it is stored, on
receipt and on resubmit, and the list reads that instead of the body.
Processing time is read from the existing delivery and attempt
timestamps. The list loads its deliveries and their attempts in batched
queries of its own, reading only the columns it shows. A failed load
answers with an error instead of an empty list.

Model: opus-5-5
This commit is contained in:
2026-10-01 19:14:05 +00:00
committed by sneak
parent b79e4649a1
commit 832db418ce
10 changed files with 711 additions and 17 deletions
+18 -3
View File
@@ -62,6 +62,23 @@ func renderSourceDetailPage(
) string {
t.Helper()
w := serveSourceDetailPage(t, h, sess, webhookID)
require.Equal(t, http.StatusOK, w.Code)
return w.Body.String()
}
// serveSourceDetailPage runs the real source detail handler for a
// webhook and returns its response, whatever its status.
func serveSourceDetailPage(
t *testing.T,
h *handlers.Handlers,
sess *session.Session,
webhookID string,
) *httptest.ResponseRecorder {
t.Helper()
req := httptest.NewRequestWithContext(
context.Background(),
http.MethodGet,
@@ -87,9 +104,7 @@ func renderSourceDetailPage(
w := httptest.NewRecorder()
h.HandleSourceDetail().ServeHTTP(w, req)
require.Equal(t, http.StatusOK, w.Code)
return w.Body.String()
return w
}
// TestHandleSourceDetail_MasksSlackWebhookURL is the