- Shipped
- 4 Agosti 2026, 20:58 UTC
- Author
- kamo
- Commit
- ffcc5ac
Five defects an adversarial review confirmed against the first cut: - The page rendered "You don't have access" on every load. checkRole returns false while the session is still resolving, and the gate did not consult the hook's loading flag — and because the early return sits above LeadsCreditLayout it took the tab bar with it, so the feature read as revoked rather than slow. Same guard the sibling leads pages already use. - Commission-split rows were keyed by index and member, so picking a colleague remounted the row mid-edit: the field blurred and a half-typed amount beside it was discarded. Rows now carry their own key for their lifetime. - Editing a reservation blanked the member on any split whose colleague had since lost lead access, which reads as "no member set" on a share that is still owed. The name now carries through and the stale member stays selectable. - Mutating the last row on a page left the user on a page that no longer exists, and on a full page left a gap the server had a row for. Both refetch now, stepping back a page when the current one empties. - A failed history fetch rendered as "Nothing has happened on this reservation yet." On an audit trail those are opposite answers. Also narrows the approve flow: edits are saved before the approval, not after, so a failure leaves the reservation pending and retryable instead of granting exclusivity on terms that never saved.