Skip to content

chore(real time composer): refactor messageboxes to use same base and sync feats with develop - #41374

Merged
MartinSchoeler merged 5 commits into
poc/real-time-composerfrom
chore/real-time-composer-msgbox-split
Jul 20, 2026
Merged

chore(real time composer): refactor messageboxes to use same base and sync feats with develop#41374
MartinSchoeler merged 5 commits into
poc/real-time-composerfrom
chore/real-time-composer-msgbox-split

Conversation

@MartinSchoeler

@MartinSchoeler MartinSchoeler commented Jul 14, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Stops the code duplication at RichTextMessageBox by using a shared base for the message boxes.

Also syncs the realtime composer features with the ones in develop (multiple file uploads)

Issue(s)

RTC-5
RTC-50

Steps to test or reproduce

Further comments

Review in cubic

Summary by CodeRabbit

  • New Features
    • Drafts now persist consistently across rich-text composer sessions.
    • Clipboard images are extracted and uploaded directly from the composer.
    • Rich-text selection wrapping and keyboard formatting shortcuts are supported.
    • Quoted message chains are automatically limited for cleaner conversations.
  • Bug Fixes
    • Improved composer teardown and event handling prevents lingering input behavior after closing or switching.
    • Sending is better coordinated with uploads/processing and composer enablement states.
    • Emoji insertion and editing/close flows are more reliable (including caret restoration and popup updates).

@dionisio-bot

dionisio-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 01364d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f67f322f-4b8e-430e-b648-8bc48d521b23

📥 Commits

Reviewing files that changed from the base of the PR and between e6fb998 and 01364d5.

📒 Files selected for processing (1)
  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
⚠️ CI failures not shown inline (6)

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ❌ **Has milestone or project** — This PR is missing the required milestone or project
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ❌ **Has milestone or project** — This PR is missing the required milestone or project
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ❌ **Has milestone or project** — This PR is missing the required milestone or project
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ❌ **Has milestone or project** — This PR is missing the required milestone or project
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ❌ **Has milestone or project** — This PR is missing the required milestone or project
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ❌ **Has milestone or project** — This PR is missing the required milestone or project
- ✅ **Valid PR title**
- ✅ **Correct target version**

Walkthrough

Rich-text composer draft persistence, quote-chain limits, selection wrapping, clipboard image uploads, editing behavior, and teardown are refactored. Message box rendering is centralized in MessageBoxBase, with attachment and upload handling passed through component props.

Changes

Message composer refactor

Layer / File(s) Summary
Composer API and draft lifecycle
apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts
The composer API accepts caller-provided draft persistence and initial content, applies quote-chain limits, and removes input listeners during release.
Composer input helpers
apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts, apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
Formatting shortcuts, clipboard image extraction, and rich-text selection wrapping are provided as shared helpers.
Shared message box rendering
apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx
A shared component renders replies, previews, hints, recorders, composer controls, attachments, and send or join actions.
MessageBox integration
apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
MessageBox delegates rendering to MessageBoxBase and routes pasted image files through the optional upload callback or internal uploader.
Rich-text composer integration
apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx
RichTextMessageBox integrates room-scoped drafts, quote limits, lifecycle cleanup, upload-state gating, editing reset behavior, emoji insertion, and rich-text input handlers.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant RichTextMessageBox
  participant MessageBoxBase
  participant createRichTextComposerAPI
  participant useDraft
  participant handleUploadFiles
  User->>RichTextMessageBox: type, paste image, or submit
  RichTextMessageBox->>useDraft: load or persist room draft
  RichTextMessageBox->>createRichTextComposerAPI: initialize composer with draft and quote limit
  RichTextMessageBox->>MessageBoxBase: pass composer, input, files, and action state
  User->>RichTextMessageBox: paste clipboard image
  RichTextMessageBox->>handleUploadFiles: upload extracted image files
  User->>MessageBoxBase: activate send or join action
  MessageBoxBase->>RichTextMessageBox: invoke onSend or onJoin
Loading

Possibly related PRs

Suggested labels: type: feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: message boxes were refactored to a shared base and composer features were synced with develop.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • RTC-5: Request failed with status code 401
  • RTC-50: Request failed with status code 401

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MartinSchoeler
MartinSchoeler force-pushed the poc/real-time-composer branch from f79f20b to fe2f3c2 Compare July 14, 2026 18:32
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.37762% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.04%. Comparing base (fd61b66) to head (01364d5).

Additional details and impacted files

Impacted file tree graph

@@                    Coverage Diff                     @@
##           poc/real-time-composer   #41374      +/-   ##
==========================================================
- Coverage                   68.11%   68.04%   -0.07%     
==========================================================
  Files                        3979     3979              
  Lines                      155833   155718     -115     
  Branches                    28063    28004      -59     
==========================================================
- Hits                       106142   105955     -187     
- Misses                      44939    45021      +82     
+ Partials                     4752     4742      -10     
Flag Coverage Δ
e2e 58.47% <23.01%> (+<0.01%) ⬆️
e2e-api 44.03% <ø> (-0.01%) ⬇️
unit 70.02% <9.09%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MartinSchoeler
MartinSchoeler force-pushed the poc/real-time-composer branch from fe2f3c2 to 6eda512 Compare July 15, 2026 12:49
@MartinSchoeler
MartinSchoeler force-pushed the chore/real-time-composer-msgbox-split branch from 9e5147a to 0e1e773 Compare July 15, 2026 14:23
@MartinSchoeler
MartinSchoeler force-pushed the poc/real-time-composer branch from 6eda512 to 7021e91 Compare July 15, 2026 14:25
@MartinSchoeler
MartinSchoeler force-pushed the chore/real-time-composer-msgbox-split branch 2 times, most recently from 99f2b5a to 76e90ff Compare July 15, 2026 17:19
@MartinSchoeler
MartinSchoeler changed the base branch from poc/real-time-composer to feat-b/real-time-refactor July 15, 2026 17:19
@MartinSchoeler MartinSchoeler changed the title chore: refactor messageboxes to use same base chore(real time composer): refactor messageboxes to use same base and sync feats with develop Jul 15, 2026
Base automatically changed from feat-b/real-time-refactor to poc/real-time-composer July 16, 2026 19:01
@MartinSchoeler
MartinSchoeler force-pushed the chore/real-time-composer-msgbox-split branch from 76e90ff to 77135a1 Compare July 16, 2026 19:24
@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (3)
apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx (1)

164-164: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the added implementation comments.

Prefer self-explanatory names or extracted helpers; track the parser TODO outside implementation code.

As per coding guidelines, “Avoid code comments in the implementation.”

Also applies to: 249-251, 281-281, 290-290

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx` at
line 164, Remove the added implementation comments in RichTextMessageBox,
including the comments around the room-change raw markdown state update and the
referenced locations near lines 249–251, 281, and 290. Keep the surrounding
logic unchanged and track any parser TODO outside the implementation code.

Source: Coding guidelines

apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx (2)

104-109: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the newly added implementation comments.

  • apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx#L104-L109: express the preview condition through a named value or helper.
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts#L33-L35: rely on the preventDefault branch and function naming.
  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts#L69-L79: rely on the rich-text handler name and named comparison predicate.

As per coding guidelines: “Avoid code comments in the implementation.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx` around
lines 104 - 109, Remove the implementation comments at MessageBoxBase.tsx lines
104-109, messageBoxHelpers.ts lines 33-35, and wrapSelection.ts lines 69-79. In
MessageBoxBase, express the preview condition through a named value or helper;
in messageBoxHelpers, rely on the preventDefault branch and function naming; and
in wrapSelection, rely on the rich-text handler name and a named comparison
predicate.

Source: Coding guidelines


113-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace the any escape hatches with explicit contracts.

  • apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx#L113-L114: narrow the preview option or align useComposerBoxPopup and ComposerBoxPopupPreview prop types instead of casting items and focused.
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts#L9-L10: type the stable fallback as the actual formatter snapshot type rather than any[].

As per coding guidelines: “Write concise, technical TypeScript/JavaScript with accurate typing.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx` around
lines 113 - 114, Replace the any casts passed to ComposerBoxPopupPreview in
MessageBoxBase.tsx by narrowing the preview option or aligning
useComposerBoxPopup with the component’s item and focused prop types; in
messageBoxHelpers.ts, type the stable fallback using the actual formatter
snapshot type instead of any[].

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx`:
- Line 47: Update the paste handling in MessageBox so images are still uploaded
when onUploadFiles is undefined: preserve the existing native fallback behavior
instead of preventing the paste, and only invoke the callback and prevent the
default event when the callback is available. Apply this consistently to the
related handlers around the referenced upload logic.
- Around line 401-404: Update the MessageBox component’s Join button wiring to
invoke joinMutation.mutate or mutateAsync through its callback instead of
passing onJoin directly. Keep the existing join behavior and ensure
joinMutation.isPending controls the button while the join request is active.

In `@apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx`:
- Around line 191-208: Update callbackRef to track the composer API instance
created by this component, and during node === null cleanup call
chat.setComposerAPI() only when chat.composer matches that tracked instance.
Preserve the existing registration skip for an already-owned chat.composer and
ensure this component’s cleanup cannot clear another rich-text composer’s API.
- Around line 161-168: Update useDraft so its initial-value ref is refreshed
whenever the derived storageKey changes, ensuring initialValue reflects the
current room or thread draft after navigation. Preserve the existing draft
persistence behavior while resetting the stored initial value for each new
storage key.
- Around line 505-508: Update the Join action wiring in RichTextMessageBox so
onJoin invokes the joinMutation rather than bypassing it. Preserve the existing
join behavior while ensuring joinMutation.isPending reflects the operation and
disables repeated Join clicks.

---

Nitpick comments:
In `@apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx`:
- Around line 104-109: Remove the implementation comments at MessageBoxBase.tsx
lines 104-109, messageBoxHelpers.ts lines 33-35, and wrapSelection.ts lines
69-79. In MessageBoxBase, express the preview condition through a named value or
helper; in messageBoxHelpers, rely on the preventDefault branch and function
naming; and in wrapSelection, rely on the rich-text handler name and a named
comparison predicate.
- Around line 113-114: Replace the any casts passed to ComposerBoxPopupPreview
in MessageBoxBase.tsx by narrowing the preview option or aligning
useComposerBoxPopup with the component’s item and focused prop types; in
messageBoxHelpers.ts, type the stable fallback using the actual formatter
snapshot type instead of any[].

In `@apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx`:
- Line 164: Remove the added implementation comments in RichTextMessageBox,
including the comments around the room-change raw markdown state update and the
referenced locations near lines 249–251, 281, and 290. Keep the surrounding
logic unchanged and track any parser TODO outside the implementation code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb1693a4-b833-476b-8fc3-5f2aa78b9d7d

📥 Commits

Reviewing files that changed from the base of the PR and between fd61b66 and 77135a1.

📒 Files selected for processing (6)
  • apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx
  • apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
  • apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx
🧠 Learnings (6)
📚 Learning: 2026-02-10T16:32:42.586Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38528
File: apps/meteor/client/startup/roles.ts:14-14
Timestamp: 2026-02-10T16:32:42.586Z
Learning: In Rocket.Chat's Meteor client code, DDP streams use EJSON and Date fields arrive as Date objects; do not manually construct new Date() in stream handlers (for example, in sdk.stream()). Only REST API responses return plain JSON where dates are strings, so implement explicit conversion there if needed. Apply this guidance to all TypeScript files under apps/meteor/client to ensure consistent date handling in DDP streams and REST responses.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
📚 Learning: 2026-05-11T20:30:35.265Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 40480
File: apps/meteor/client/meteor/startup/accounts.ts:59-61
Timestamp: 2026-05-11T20:30:35.265Z
Learning: In Rocket.Chat’s Meteor client code, when calling `dispatchToastMessage` with `{ type: 'error' }`, pass the raw caught error object as `message` without manual normalization. `dispatchToastMessage` is designed to accept `message: unknown` for error toasts, so avoid converting errors to strings (e.g., `String(error)`) or extracting `error.message` before passing them.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
  • apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
  • apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts
  • apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts
  • apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx
🔇 Additional comments (7)
apps/meteor/app/ui-message/client/messageBox/createRichTextComposerAPI.ts (1)

6-15: LGTM!

Also applies to: 54-66, 186-189

apps/meteor/client/views/room/composer/messageBox/RichTextMessageBox.tsx (2)

4-40: LGTM!

Also applies to: 73-99, 211-248, 296-316, 429-479, 481-504, 509-533


107-107: 🎯 Functional Correctness

No default cast needed here. useSetting('Message_QuoteChainLimit', 2) already returns number, so this does not violate createRichTextComposerAPI’s contract.

			> Likely an incorrect or invalid review comment.
apps/meteor/client/views/room/composer/messageBox/messageBoxHelpers.ts (1)

1-8: LGTM!

Also applies to: 12-33, 35-75

apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts (1)

1-1: LGTM!

Also applies to: 70-78, 80-103

apps/meteor/client/views/room/composer/messageBox/MessageBoxBase.tsx (1)

1-103: LGTM!

Also applies to: 110-112, 115-184

apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx (1)

4-46: LGTM!

Also applies to: 48-64, 380-400, 405-421

Comment thread apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
Comment thread apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
@MartinSchoeler
MartinSchoeler marked this pull request as ready for review July 17, 2026 19:49
@MartinSchoeler
MartinSchoeler requested a review from a team as a code owner July 17, 2026 19:49

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts Outdated
Comment thread apps/meteor/client/views/room/composer/messageBox/wrapSelection.ts Outdated
@MartinSchoeler
MartinSchoeler merged commit c30ea7d into poc/real-time-composer Jul 20, 2026
84 of 87 checks passed
@MartinSchoeler
MartinSchoeler deleted the chore/real-time-composer-msgbox-split branch July 20, 2026 15:23
MartinSchoeler added a commit that referenced this pull request Jul 22, 2026
MartinSchoeler added a commit that referenced this pull request Jul 22, 2026
MartinSchoeler added a commit that referenced this pull request Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants