Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: message composer #2669

Draft
wants to merge 30 commits into
base: rc
Choose a base branch
from
Draft

feat: message composer #2669

wants to merge 30 commits into from

Conversation

MartinCupela
Copy link
Contributor

Submit a pull request

🎯 Goal

Describe why we are making this change

🛠 Implementation details

Provide a description of the implementation

🎨 UI Changes

Add relevant screenshots

@MartinCupela MartinCupela changed the title Feat/message composer feat: message composer Mar 13, 2025
@MartinCupela MartinCupela marked this pull request as draft March 13, 2025 12:14
@MartinCupela MartinCupela force-pushed the feat/message-composer branch 2 times, most recently from 41fe189 to 98fe4f2 Compare March 13, 2025 12:36
@arnautov-anton arnautov-anton force-pushed the feat/message-composer branch from dc919e7 to 0a7dc0f Compare March 13, 2025 12:44
@arnautov-anton arnautov-anton force-pushed the feat/message-composer branch from 0a7dc0f to 991b070 Compare March 13, 2025 14:09
@arnautov-anton arnautov-anton requested a review from Copilot April 1, 2025 08:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors various components related to message composition and handling by replacing StreamMessage with LocalMessage and modifying how message drafts and thread instances are managed. Key changes include:

  • Updating type references across components (e.g. EventComponent, ChannelPreview, Channel).
  • Removing deprecated ChatAutoComplete tests and exports.
  • Refactoring functions in Channel components to support message drafts and update message sending logic.

Reviewed Changes

Copilot reviewed 126 out of 127 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/EventComponent/EventComponent.tsx Updated type reference for message property to use LocalMessage
src/components/ChatAutoComplete/* Removed redundant exports and test files for ChatAutoComplete
src/components/Chat/hooks/useChat.ts Hardcoded version variable to an empty string
src/components/Channel/* Refactored message sending/updating logic and thread management
src/components/AutoCompleteTextarea/* Removed unused components and types
examples/vite/src/App.tsx Added emojiSearchIndex prop to Channel
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

src/components/Channel/Channel.tsx:1092

  • The removal of the quotedMessage state reset in the openThread function might lead to unexpected behavior when opening threads; please verify if this change is intended.
const openThread = (message: LocalMessage, event?: React.BaseSyntheticEvent) => {

src/components/Channel/Channel.tsx:961

  • [nitpick] The use of similar parameter names 'localMessage' and 'message' in doSendMessage can be ambiguous; consider renaming one of them to improve clarity.
const doSendMessage = async ({ localMessage, message, options, }: {

Comment on lines +58 to 59
const version = ''; //process.env.STREAM_CHAT_REACT_VERSION;

Copy link
Preview

Copilot AI Apr 1, 2025

Choose a reason for hiding this comment

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

Hardcoding the version to an empty string disables version tracking; confirm if this change is intentional or if the original process.env value should be used.

Suggested change
const version = ''; //process.env.STREAM_CHAT_REACT_VERSION;
const version = process.env.STREAM_CHAT_REACT_VERSION || '';

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

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.

2 participants