fix(web): surface admin API-fetch failures instead of empty/zero state #462

Merged
nrupard merged 1 commit from fix/BUNYIP-461-admin-api-error-state into main 2026-08-04 20:16:10 +02:00
Owner

What

Every admin list handler that fetched with unwrap_or_default() / .ok() now captures reachability first and renders error_box(...) when the API is unreachable, instead of showing an empty/zero state.

Why

A down bunyip-api rendered as "No applications" / "No feedback yet" / "No audit logs found" and 0-value dashboard stats - indistinguishable from a genuinely-empty result. UI audit (BUNYIP-455) finding F16. The canonical fix already lived in ip_bans/rate_limits/error_log; this brings the rest into line.

Covered

applications, application groups (list + edit), entitlements (products + granted), audit log, feedback (active/closed/spam + archive), admin dashboard (stat tiles + recent activity), seed templates.

Verify

just check-container (fmt + clippy -D warnings + workspace tests) passes. Row markup byte-identical; only the reachable branch is added.

Closes BUNYIP-461.

## What Every admin list handler that fetched with `unwrap_or_default()` / `.ok()` now captures reachability first and renders `error_box(...)` when the API is unreachable, instead of showing an empty/zero state. ## Why A down bunyip-api rendered as "No applications" / "No feedback yet" / "No audit logs found" and 0-value dashboard stats - indistinguishable from a genuinely-empty result. UI audit (BUNYIP-455) finding F16. The canonical fix already lived in ip_bans/rate_limits/error_log; this brings the rest into line. ## Covered applications, application groups (list + edit), entitlements (products + granted), audit log, feedback (active/closed/spam + archive), admin dashboard (stat tiles + recent activity), seed templates. ## Verify `just check-container` (fmt + clippy `-D warnings` + workspace tests) passes. Row markup byte-identical; only the reachable branch is added. Closes BUNYIP-461.
fix(web): surface admin API-fetch failures instead of empty/zero state
All checks were successful
E2E PR gate / Install + reachability (no deployment secrets) (pull_request) Successful in 27s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m39s
Create release / Create release from merged PR (pull_request) Has been skipped
b07e9fe4b6
Half the admin list pages called admin_api::*(...).unwrap_or_default() with no reachability flag, so a failed API fetch was indistinguishable from a genuinely-empty result: a down bunyip-api rendered as "No applications" / "No feedback yet" / "No audit logs found" (and the admin dashboard showed 0 stats) instead of an outage. Follow the canonical ip_bans/rate_limits/error_log pattern: capture reachable = data.is_ok() (or is_some() on the .ok() paths) before unwrapping, and gate each render body so a fetch failure shows error_box(...) ahead of the empty-state branch.

Covers applications, application groups (list + edit-not-found), entitlements (products + granted), audit log, feedback (active/closed/spam via the shared render + the separate archive), the admin dashboard stat tiles + recent-activity list, and seed templates. Row markup is unchanged; the header count line only renders when reachable, mirroring ip_bans. Found by the 2026-08-04 UI audit (BUNYIP-455), finding F16.

#BUNYIP-461

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: nrupard <natrsmith11@gmail.com>
nrupard deleted branch fix/BUNYIP-461-admin-api-error-state 2026-08-04 20:16:10 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!462
No description provided.