[MT-23014] Show a friendly state for deleted open messages#42
Conversation
A message deleted while open (by another client, the API, or retention eviction) surfaced as the raw axios string "Error: AxiosError: Request failed with status code 404" in MessageView. - Add isNotFoundError() to api/client next to isAbortError. - On a 404 load, render an EmptyCard saying the message was deleted, with a "Back to inbox" button instead of the raw error. - Subscribe MessageView to the live channel and swap to the same deleted state when a 'destroyed' frame targets the open message, instead of leaving a stale view. - Non-404 failures now go through extractApiError() for readable copy. Jira: MT-22849 (finding 8) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughMessageView now distinguishes deleted messages from other load failures. It renders a deleted state for 404 responses or matching live ChangesMessage deletion handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant MessageView
participant MessagesAPI
participant useMessagesChannel
participant InboxNavigation
MessagesAPI->>MessageView: message load response or 404 error
useMessagesChannel->>MessageView: destroyed frame with message ID
MessageView->>MessageView: set deleted state for matching message
MessageView->>InboxNavigation: navigate back to inbox
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
What & why
Fixes MT-23014, a sub-task of MT-22849.
Message API 404s were handled as generic Axios failures, and an externally deleted open message remained stale. This change recognizes the not-found case, reacts to live deletion, and renders a clear recovery state with a route back to the inbox.
Impact
Users no longer see a raw network error when the open message has been deleted.
Screenshots
Verification
npm test— 62 tests passednpm run lint— 0 errors; 4 existing warningsnpm run build— passedgit diff --check main...fix/mt-23014-deleted-message-state— passedSummary by CodeRabbit
New Features
Bug Fixes