Skip to content

# fix(react): resolve React 19 / Storybook structuredClone crashes#1310

Merged
Spiral-Memory merged 1 commit into
RocketChat:developfrom
Aryan-Verma-999:fix/attachments-crash
May 27, 2026
Merged

# fix(react): resolve React 19 / Storybook structuredClone crashes#1310
Spiral-Memory merged 1 commit into
RocketChat:developfrom
Aryan-Verma-999:fix/attachments-crash

Conversation

@Aryan-Verma-999
Copy link
Copy Markdown
Contributor

@Aryan-Verma-999 Aryan-Verma-999 commented May 27, 2026

fix(react): resolve React 19 / Storybook structuredClone crashes

Acceptance Criteria fulfillment

  • Fix structuredClone crashes when interacting with attachments (description updates, file uploads) in Storybook.
  • Safely bypass React 19 dev-mode profiler exceptions when diffing deep WebSocket/DDPSDK instances.

Fixes #1300

Video/Screenshots

2026-05-27.23-40-30.mp4

PR Test Details

  • Storybook actions auto-wrapping has been turned off via .storybook/preview.js to prevent the actions addon from attempting to serialize non-cloneable objects (like File and Blob) through postMessage.
  • Patched global performance.measure to gracefully catch DOMException occurrences thrown by React 19 dev-mode's component render-profiler when crawling deep Context objects.
  • All 9 subpackages compile and build flawlessly.

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

@Spiral-Memory Spiral-Memory merged commit 0f0ebd0 into RocketChat:develop May 27, 2026
4 checks passed
github-actions Bot added a commit that referenced this pull request May 27, 2026
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] : Attachment are sent when the page is refreshed

2 participants