Skip to content

Upgrade to React 19, Storybook 8, and Node 22#1291

Merged
Spiral-Memory merged 11 commits into
RocketChat:developfrom
Aryan-Verma-999:react-19-upgrade
May 16, 2026
Merged

Upgrade to React 19, Storybook 8, and Node 22#1291
Spiral-Memory merged 11 commits into
RocketChat:developfrom
Aryan-Verma-999:react-19-upgrade

Conversation

@Aryan-Verma-999
Copy link
Copy Markdown
Contributor

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

Upgrade to React 19, Storybook 8, and Node 22

This PR modernizes the EmbeddedChat core infrastructure by upgrading the foundational stack to React 19 and Storybook 8, while aligning the development environment with Node 22 (LTS).

Acceptance Criteria fulfillment

  • React 19 Upgrade: Bumped react and react-dom to v19.0.0 across all packages.
  • Node 22 (LTS): Updated .nvmrc and workspace engine requirements to Node 22.
  • Storybook 8: Migrated UI documentation and component stories to Storybook 8.
  • Component Optimization: Refactored LoginForm to use useRef for input state management, significantly reducing unnecessary re-renders.
  • DDP Connection Resilience: Implemented a connection promise guard in EmbeddedChatApi to prevent race conditions and redundant connection attempts (critical for React 19 StrictMode behavior).
  • Rendering Logic: Updated ChatInput, ChatBody, and message handling to resolve issues stemming from React 19's updated rendering engine and lifecycle changes.

Video/Screenshots

PR Test Details

All core features, including authentication, messaging, and real-time updates, have been verified as working.

Note: The file upload functionality is currently excluded from this PR as it is being resolved separately in PR #1231.

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

Comment thread packages/react/src/views/LoginForm/LoginForm.js Outdated
Comment thread packages/api/src/EmbeddedChatApi.ts
Copy link
Copy Markdown
Collaborator

@Spiral-Memory Spiral-Memory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Excellent and clean work. I appreciate it. Please address the minor comments. Thanks.

@Spiral-Memory
Copy link
Copy Markdown
Collaborator

Please fix build and lint and playwright test failures

Comment thread scripts/node-check.js Outdated
@Spiral-Memory
Copy link
Copy Markdown
Collaborator

Build and lint still fails because of format check, can you please use prettier

@Aryan-Verma-999
Copy link
Copy Markdown
Contributor Author

done

@Spiral-Memory
Copy link
Copy Markdown
Collaborator

done

Playwright is still failing

Comment thread scripts/node-check.js
Copy link
Copy Markdown
Collaborator

@Spiral-Memory Spiral-Memory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Spiral-Memory
Copy link
Copy Markdown
Collaborator

Spiral-Memory commented May 16, 2026

@Aryan-Verma-999, please resolve the docs dependency and any other dependencies required for this PR to prevent repeated trial-and-error cycles as Build PR Preview is failing now. Also, ensure the README and other documentation files are updated to reflect the new versions.

@Aryan-Verma-999
Copy link
Copy Markdown
Contributor Author

hi sorry for the inconvenience, i will keep this in mind from now on.
i have ran all the tests locally
this should pass now

@Spiral-Memory
Copy link
Copy Markdown
Collaborator

hi sorry for the inconvenience, i will keep this in mind from now on. i have ran all the tests locally this should pass now

No worries @Aryan-Verma-999

@Spiral-Memory Spiral-Memory merged commit f38073c into RocketChat:develop May 16, 2026
4 checks passed
github-actions Bot added a commit that referenced this pull request May 16, 2026
@Spiral-Memory
Copy link
Copy Markdown
Collaborator

Spiral-Memory commented May 16, 2026

🎉 Congratulations on your first PR merge in GSoC, @Aryan-Verma-999
Great work on this achievement 👏 Wishing you all the best for your future goals and many more successful merges ahead

@Aryan-Verma-999
Copy link
Copy Markdown
Contributor Author

Thank you so much! 🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants