Volleyball Elite Academy — Development Update • May 12, 2026
Stale-status badge in the admin email log
What & Why
When the Resend webhook stops firing, every email in the SuperAdmin email log keeps its initial "sent" status forever — there's no visual signal that the delivery/open/bounce status is actually unknown rather than confirmed. This task makes the email log honest about that: when the webhook health monitor reports or , rows whose status hasn't moved past "sent" should visibly say "Delivery status pending" so admins don't read a stale row as a confirmed delivery.
Done looks like
The Communication Hub email-log tab calls the existing webhook health endpoint on mount and on focus, and exposes the current to the row renderer.
When is not , every row whose and whose falls inside the silent window renders a small muted "Delivery status pending" badge next to the existing status, with a tooltip explaining "The Resend webhook is currently silent — delivery, open, and bounce events for emails sent after
Rows whose status has already advanced past (e.g. , , , ) render unchanged — the badge only applies to ambiguous rows.
When is , no rows show the pending badge — the email log looks exactly like it does today.
A small inline banner above the table mirrors the existing webhook health banner copy ("Resend webhook is silent — delivery status for the rows below may be stale") so admins notice even if they don't hover individual rows.
The badge has a stable per row (e.g. ) and the banner has its own so the e2e suite can assert both.
Frontend test (vitest + RTL or Playwright) covers: webhook ok → no badge, webhook silent → badge on rows, webhook silent → no badge on rows, webhook recovers → badge disappears on next refetch.
Out of scope
Changing what the webhook health endpoint returns.
Backfilling missing events (handled by Resend, not this task).
Any change to the underlying schema or the column itself.
Surfacing the badge anywhere outside the SuperAdmin email log (e.g. parent-facing screens).
Steps
1. Wire the health query into the email log tab — Add a TanStack Query call against the existing webhook health endpoint, with and a sensible stale time so the badge stays fresh without hammering the API. 2. Compute the silent-window cutoff — From the health response, derive the timestamp of the last received webhook event so the badge only flags rows sent after that point. 3. Render the badge and tooltip — In the row renderer, conditionally render the muted "Delivery status pending" badge next to the existing status badge when the row is ambiguous and the webhook is silent. Use the existing tooltip primitive. 4. Render the table-level banner — Above the table, conditionally render the warning banner when the webhook health is not "ok". Re-use the existing webhook health banner copy / styling so the two surfaces match. 5. Add frontend tests — Cover the four states listed in "Done looks like" so the badge can't regress silently.
Relevant files
- - - -
Volleyball Elite Academy
Reply to this email — we read every reply.
You received this because you have an account with Volleyball Elite Academy.
No comments:
Post a Comment