RocketChat / RocketChat/EmbeddedChat

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

Open
#1,080 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
165
Forks
381
Avg merge
1d 2h
Merged PRs (30d)
1

Description

A frontend state management bug exists where the Thread View remains open and displays stale data even after its parent message has been deleted from the chat.

While the messageStore correctly removes the deleted message from the main message list, it fails to synchronize thread-specific state. As a result, thread-related state continues to reference a message that no longer exists.


Observed Behavior

  • The parent message is removed from the main chat message list.
  • The Thread Pane remains open.
  • The Thread View continues to display a stale copy of the deleted parent message.
  • The application enters an inconsistent UI state where a thread is shown for a non-existent message.

Screenshots

Rocket chat web
Image

Embedded chat
Image

Expected Behavior

When a parent message is deleted:

  • Any active thread associated with that message should automatically close.
  • Thread-related state should be cleared from the store.
  • The UI should return to the normal chat view without an open thread.

Steps to Reproduce

  1. Open the EmbeddedChat application.
  2. Send a new message or select an existing message.
  3. Open the Thread View for that message.
  4. Delete the parent message (from EmbeddedChat or another client).
  5. Observe the UI state.

Result:

  • The message disappears from the main chat list.
  • The Thread Pane remains open with stale data.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the messageStore deletion flow and the Thread View state used by EmbeddedChat. Reproduce the issue by opening a thread and deleting its parent message, then follow where thread-specific state is retained. Done means the active thread closes, its state is cleared, and the normal chat view is restored without stale parent data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.