Skip to content

Fix/1080 close thread on parent delete - #1470

Open
its-govind wants to merge 6 commits into
RocketChat:developfrom
its-govind:fix/1080-close-thread-on-parent-delete
Open

its-govind wants to merge 6 commits into
RocketChat:developfrom
its-govind:fix/1080-close-thread-on-parent-delete

Conversation

@its-govind

@its-govind its-govind commented Nov 28, 2026 •

Copy link
Copy Markdown

#1080 Thread UI remains open after parent message is deleted (State Leak)

Acceptance Criteria fulfillment

  • Close active thread UI view when parent message is hard-deleted (0 replies)
  • Close active thread UI view when parent message is soft-deleted with replies
  • Prevent UI state leak where thread pane remains open after parent deletion

Fixes #1080

Video/Screenshots

Before (Issue #1080 - State Leak)

0 replies: Thread panel remains stuck open on screen after parent deletion.

issue-1.mov

1 or more replies: Thread panel remains open with stale replies accessible after parent deletion.

issue-2.mov

After (Resolved)

0 replies (Hard Delete): Active thread view immediately closes on parent deletion.

resolve-1.mov

1 or more replies (Soft Delete): For t: 'rm', Active thread view immediately closes when parent is marked as removed.

resolve-2.mov

PR Test Details

  1. Test 0-reply deletion:

    • Post a parent message in the channel.
    • Click "Reply in thread" (thread panel opens with 0 replies).
    • Delete the parent message.
    • Expected Result: Thread panel automatically closes immediately and returns to the channel.
  2. Test >0-reply deletion:

    • Post a parent message.
    • Open thread and send 1 or more replies.
    • Delete the parent message from the main channel.
    • Expected Result: Parent message displays as "message removed" in the channel, and the open thread panel automatically closes.
  3. Regression Test:

    • Open thread on Message A.
    • Delete an unrelated Message B in the channel.
    • Expected Result: Message B is deleted, but Message A's thread remains open.

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1470 after approval. Contributors are requested to replace 1470 with the actual PR number.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Thread UI remains open after parent message is deleted (State Leak)

2 participants