Description
Clicking a notification that links to a deleted Bill (e.g., “Bill #1729 – Items Received”) results in an infinite loading spinner. The page never resolves and no message explains that the Bill no longer exists.
Steps to Recreate
- Create a Bill (e.g., via receiving against a PO) so a notification is generated (e.g., “Bill #____ – Items Received”).
- Delete the Bill.
- From Notifications, click the Bill notification.
- Observe the page behavior.
Expected Result
- The application should gracefully handle missing/removed Bills by:
- Displaying a clear message such as “This Bill is unavailable. It may have been deleted, moved, or you don’t have permission to view it.”, and/or
- Redirecting to a safe fallback (e.g., Bills list) with a banner explaining what happened.
Actual Result
- The route loads an endless spinner/gear and never completes.
- No user-facing explanation or recovery action is shown.
Impact
- User confusion & wasted time waiting on a non-loading page.
- Broken trust in notifications (users learn some notifications lead to dead ends).
- Support overhead from “frozen” page reports that are actually deleted-resource cases.
Scope / Frequency
- Reproducible whenever a notification references a deleted Bill.
- Likely browser-agnostic.
Environment
- Web app → Notifications linking to Bills.
- Affects users with access to billing/receiving notifications.
Technical Clues (for triage)
- Likely unhandled 404/410 (deleted) or 403 (permission) response from the Bill fetch.
- UI remains in loading state due to missing error/empty-state handler on Bill detail route.
- Consider “soft-delete” vs. hard delete; route may need to check both.
Proposed Fix
- Add error handling on Bill load:
- If 404/410/403, show an empty state with actions:
- Primary: “Go to Bills”
- Secondary: “Return to Dashboard”
- Message: “This Bill is unavailable. It may have been deleted, moved, or you don’t have permission to view it.”
- Log telemetry for notification→deleted-bill navigations to quantify impact.
- Optional: Update the notification resolver to pre-check Bill existence and route to Bills list with a contextual banner when missing.
Workarounds
- Manually navigate to Bills list or associated PO/Task to continue work.
- No reliable in-page recovery once stuck on the loading spinner.