Skip to content

Reporting a message inside a thread crashes the chat #1465

Backlog

Description

@Jaivansh-777

Description:

Reporting a message from inside a thread crashes EmbeddedChat.

In packages/react/src/views/Thread/ThreadMessageList.js the report window is rendered as <MessageReportWindow messageId={messageToReport} />, without the message prop. MessageList passes message={reportedMessage}, but the thread view doesn't. ReportWindowButtons then calls messageDescription(message) with undefined, and if (msg.file) throws.

ChatBody renders either ThreadMessageList or MessageList, so inside a thread this is the only report window and it fails every time. There's no error boundary, so the whole widget goes blank.

Steps to reproduce:

  1. Open a thread
  2. Open the message toolbox on any message in the thread and click "Report"

Expected behavior:

The report window opens with the message preview, same as in the main chat.

Actual behavior:

TypeError: Cannot read properties of undefined (reading 'file') and the chat crashes.

I have a small fix ready (look up the reported message from the thread's messages and pass it in, plus a null check in messageDescription) and will open a PR.

Activity

  1. added
    bug
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions