fix: allow retrying/deleting stuck (TEMP) messages - #7561
Conversation
Message component was refactored (RocketChat#7455) into a function component with the status logic in MessageStore.useMessageStatus. hasError was only true for ERROR status, so TEMP (stuck-sending) messages never showed the resend/delete action sheet - the user had to wipe app data to clear them. Extend useMessageStatus.hasError to also cover TEMP status. MessageError already renders the retry/delete icon on hasError and triggers errorActionsShow independently of the tappable gate, so the action sheet is now available for stuck messages. Update the existing useMessageStatus TEMP test to expect hasError true. Signed-off-by: Deepak Bhagat <deepak988088@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (3)**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📚 Learning: 2026-04-30T17:07:51.020ZApplied to files:
📚 Learning: 2026-06-25T18:37:25.526ZApplied to files:
📚 Learning: 2026-06-25T18:37:44.793ZApplied to files:
🔇 Additional comments (2)
Walkthrough
ChangesMessage status handling
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Proposed changes
A message stuck in the
TEMP(sending) state could not be retried or deleted from the app — the only way to clear it was to wipe the app data and log back in.MessageErrorActions(resend/delete) only surfaced forERRORstatus, soTEMPmessages never showed the error/retry affordance.Message.hasErroronly returnedtrueforERRORstatus. This extends it to also treatTEMPstatus as an error, so the retry/delete action sheet is available for stuck-sending messages.Issue(s)
Fixes #6830
How to test or reproduce
TEMP(sending) state (e.g. a transient send failure).Regression test added:
app/containers/message/index.test.tsxassertsMessage.hasErroristrueforTEMP(andERROR) andfalseforSENT. It fails against the unfixed getter and passes after the fix (verified by running the suite locally).Screenshots
N/A (behavior only, no visual change).
Types of changes
Checklist
Further comments
The reported 4.66 -> 4.67 regression (messages getting stuck) could not be reproduced by maintainers and no server/client logs were provided, so the root send failure is not addressed here. This change fixes the concrete, reproducible defect that makes a stuck message unrecoverable: it now always offers Retry / Delete, which both work regardless of the original send error.
Summary by CodeRabbit