fix(tickets): show "Ticket not found" instead of infinite loading on 404 #210

Merged
vas2000-work merged 1 commit from fix/mapps-198-ticket-detail-not-found into main 2026-06-16 23:49:02 +02:00
Owner

The ticket detail page read its resource with .flatten(), which collapses
the in-flight state (None) and the failed-fetch state (Some(None)) into a
single None. The header and body sections all render None as "Loading…",
so opening a missing, deleted, or cross-tenant ticket id hung on a perpetual
"Loading…" skeleton with no error and no way back.

Capture the failure before flattening and short-circuit to a "Ticket not
found" card with a link back to the ticket list, mirroring the explicit
Some(None) arm already used on the invoice, contract, and company detail
pages. In-flight fetches still show the loading skeleton and successfully
loaded tickets render unchanged.

#MAPPS-198

The ticket detail page read its resource with `.flatten()`, which collapses the in-flight state (`None`) and the failed-fetch state (`Some(None)`) into a single `None`. The header and body sections all render `None` as "Loading…", so opening a missing, deleted, or cross-tenant ticket id hung on a perpetual "Loading…" skeleton with no error and no way back. Capture the failure before flattening and short-circuit to a "Ticket not found" card with a link back to the ticket list, mirroring the explicit `Some(None)` arm already used on the invoice, contract, and company detail pages. In-flight fetches still show the loading skeleton and successfully loaded tickets render unchanged. #MAPPS-198
fix(tickets): show "Ticket not found" instead of infinite loading on 404
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m42s
Create release / Create release from merged PR (pull_request) Has been skipped
f3529e2f81
The ticket detail page read its resource with `.flatten()`, which collapses
the in-flight state (`None`) and the failed-fetch state (`Some(None)`) into a
single `None`. The header and body sections all render `None` as "Loading…",
so opening a missing, deleted, or cross-tenant ticket id hung on a perpetual
"Loading…" skeleton with no error and no way back.

Capture the failure before flattening and short-circuit to a "Ticket not
found" card with a link back to the ticket list, mirroring the explicit
`Some(None)` arm already used on the invoice, contract, and company detail
pages. In-flight fetches still show the loading skeleton and successfully
loaded tickets render unchanged.

#MAPPS-198
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/mokosh-apps!210
No description provided.