Feature ID: F4.17
Summary
Add a secondary state machine for deck loss/recovery tracking, with three transitions:
- Mark as lost — owner (or staff for delegated decks) declares a deck missing
- Mark as found — anyone reports the deck has been located (extends F4.16)
- Mark as recovered — owner confirms physical recovery, returning to normal state
Behavior
- New
lostStatus field on Deck (or Borrow): null → lost → found → recovered (or back to null)
- When a deck is marked as lost:
- Visual indicator on the deck card and detail page
- Active borrows are flagged (the deck may have been lost while lent)
- Notification to relevant parties depending on borrow state
- When found: notification routed to the right person:
- No active borrow → notify owner
- Active borrow → notify borrower + owner
- Delegated to staff → notify staff + owner
- When recovered: state resets, normal workflow resumes
Notification routing matrix
| Deck state |
Lost by |
Found notification to |
Recovered notification to |
| Available (no borrow) |
Owner |
Owner |
Owner |
| Lent (active borrow) |
Borrower |
Borrower + Owner |
Owner |
| Delegated to staff |
Staff |
Staff + Owner |
Owner |
Acceptance Criteria
Notes
Builds on top of F4.16 (found deck notification). The current F4.16 implementation is notification-only with no state change — this feature adds the state machine layer.
Feature ID: F4.17
Summary
Add a secondary state machine for deck loss/recovery tracking, with three transitions:
Behavior
lostStatusfield onDeck(orBorrow):null→lost→found→recovered(or back tonull)Notification routing matrix
Acceptance Criteria
enandfrNotes
Builds on top of F4.16 (found deck notification). The current F4.16 implementation is notification-only with no state change — this feature adds the state machine layer.