Skip to content

feat(ui-message-list): add the message variants, delete the app copies - #43727

Draft
gabriellsh wants to merge 25 commits into
message-list/05-toolbarfrom
message-list/06-variants
Draft

gabriellsh wants to merge 25 commits into
message-list/05-toolbarfrom
message-list/06-variants

Conversation

@gabriellsh

@gabriellsh gabriellsh commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Adds the message variants to @rocket.chat/ui-message-list (RoomMessage, SystemMessage, ThreadMessage, ThreadMessagePreview, the header, roles, avatar, status and receipt parts, and the hooks and libs they use) and switches every consumer to them: the old room and thread lists, the pinned, starred and mentions tabs, search, the audit, and the threads list. It deletes apps/meteor/client/components/message/**, MessageListContext and MessageListProvider; lib/MessageAction.ts becomes a re-export of the package's types. MessagesProvider gains the editing context, the selection adapter and the data the variants read about a conversation.

Twenty-five commits. Five fixes sit at the bottom, each with a changeset and a spec that fails first; then enabling steps (roles resolved once per place, the editing context fed from the highlight store); then the package variants in three commits, the consumer switches, the deletions and docs. The old lists stay until parts 08 and 09 of the stack, so their jump highlight still comes through the shared highlight store, and the old room list registers what it renders for "Select all" through the rows themselves.

The specs develop added or changed in #43386 for RoomMessage and SystemMessage are ported to the package's specs of those variants.

This is part 06 of the stack (00 to 09). Review it against its base branch message-list/05-toolbar, not against develop.

Stack

Visible changes

  • .changeset/audit-messages-follow-display-settings.md, '@rocket.chat/meteor': minor: the audit shows the time, the roles, the username beside the real name when real names are on, read receipts and URL previews, as the viewer's settings say.
  • .changeset/thread-avatar-click-stays-in-the-message.md, '@rocket.chat/meteor': patch: the user info no longer closes right after it opens from a thread message's avatar.
  • .changeset/messages-draw-no-stray-zero.md, '@rocket.chat/meteor': patch: no stray "0" under a message with empty action links or reactions.
  • .changeset/broadcast-reply-hidden-where-interaction-is-off.md, '@rocket.chat/meteor': patch: no broadcast reply button where messages cannot be acted on, such as the audit.
  • .changeset/edited-message-date-follows-date-format.md, '@rocket.chat/meteor': patch: the tooltip of the "edited" indicator uses the viewer's date and time format.
  • .changeset/message-toolbar-uses-the-room-of-the-message.md, '@rocket.chat/meteor': patch: the toolbar of a message found by search in all rooms uses the message's own room, not the open one.

Known differences from develop

The changes above, and:

  • a place that allows no interaction shows no editing look;
  • the showUserAvatar prop is removed;
  • a conversation is answered from the place's room without a per-message query.

The package records eight behaviors carried over from develop as pinned defects (skipped tests): D2 a revealed ignored message is hidden again when its row remounts; D3 activating the checkbox input toggles twice; D4 a thread preview has no per-message fallback; D5 Space on a thread preview does not prevent the default; D6 a pending encrypted message in a thread keeps its toolbar; D7 system and thread messages have no accessible name; D8 the preview of a reply to a system message writes the text from the reply. D1 (a jump replaces the editing look) is retired in part 09 of the stack.

Issue(s)

Steps to test or reproduce

  • Room: selection mode, select with click and with Space, "Select all" scrolls up and selects, export the selection.
  • Ignore a user and reveal one message.
  • Edit a message (editing look); open a ?msg= link (highlight).
  • In an E2EE room: a pending message.
  • A thread with unread replies, mentions and @all markers.
  • The pinned, starred and mentions tabs, and search: a result from another room has the toolbar of its own room.
  • Audit: no toolbar, no broadcast reply, times, roles and read receipts as the settings say.
  • The threads list: follow and unfollow.
  • Click a thread message's avatar: the user info stays open.
  • Hover the "edited" indicator: the date follows the date format setting.
  • Keyboard focus into and out of a message's toolbar.
  • Message headers with roles, in a room with many authors.

Further comments

Decisions to check

  • The refactor 349d4cc7d1f sits above two feature commits (b4ce5b8bd88, 1ea07c37ad7). Moving it down conflicted in MessagesProvider.spec.tsx, so the order was left.
  • In the audit each header still resolves roles itself: one request per room, one roles-change listener per row. Resolving once per place there needs a multi-room resolution in MessagesProvider, a design change outside the approved spec.
  • message-toolbar R25 was amended: a pending encrypted message in a thread keeps its toolbar (D6).
  • The thread body id <mid>-content is dropped, as on develop, so it is not duplicated when the thread panel is open.
  • The related-data value changes on every room or subscription update, as develop's did; part 08 of the stack makes it stable.
  • Changesets for @rocket.chat/ui-message-list. This PR adds none for the private package; parts 08 and 09 of the stack do. The repo versions private packages (other private packages carry changesets), so 08 and 09 follow the repo, and 03 to 07 may need changesets too. Undecided.

Not run

  • The e2e suites, and the app in a browser.
  • Checks ran on the branch tip only, not commit by commit.
  • The roles of a room an auditor is not in cannot be fetched; the header renders without roles (spec R52), checked by a spec only.

🤖 Generated with Claude Code

@dionisio-bot

dionisio-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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

  • This PR is still a draft
  • 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 Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bb86c64

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.28290% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.57%. Comparing base (b743403) to head (bb86c64).

Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                     @@
##           message-list/05-toolbar   #43727      +/-   ##
===========================================================
+ Coverage                    71.53%   71.57%   +0.03%     
===========================================================
  Files                         5765     5632     -133     
  Lines                       253313   251970    -1343     
  Branches                     47920    47469     -451     
===========================================================
- Hits                        181212   180350     -862     
+ Misses                       67679    67288     -391     
+ Partials                      4422     4332      -90     
Flag Coverage Δ
e2e 62.99% <81.15%> (-0.04%) ⬇️
e2e-api 49.49% <ø> (-0.28%) ⬇️
unit 70.53% <90.48%> (-0.03%) ⬇️

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.

gabriellsh and others added 16 commits November 13, 2026 19:04
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ord the answers

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ements around it

message-variants R14: the user info opened from the avatar of a message in a thread
closed right after it opened, as it did in the room before #43272.

Co-Authored-By: Claude <noreply@anthropic.com>
… empty

message-variants R38: `length && <Part/>` drew a literal 0.

Co-Authored-By: Claude <noreply@anthropic.com>
message-variants R38: the reply button of a broadcast room showed on messages in places
that allow no interaction, where it did nothing.

Co-Authored-By: Claude <noreply@anthropic.com>
…ormat

message-variants R15: the tooltip of the edited indicator used Date.toLocaleString().

Co-Authored-By: Claude <noreply@anthropic.com>
…s open

message-variants R49: the toolbar of a message found by a search in all rooms asked the open chat for
its room and subscription, so it offered the actions of the room that is open.

Co-Authored-By: Claude <noreply@anthropic.com>
…message header

message-variants R49: a header takes the roles the place resolved once for its list, or looks
them up itself, as two components; a hook cannot be called conditionally.

Co-Authored-By: Claude <noreply@anthropic.com>
… provider

message-variants R49, R52: the old list provider resolved them once per list; the provider
for every place that shows messages now does, and answers them to the message header through
usePlaceUserRoles. A request that fails leaves no roles and no error. Nothing reads it yet.

Co-Authored-By: Claude <noreply@anthropic.com>
…mponents

message-variants R47, D1: the editing context follows the store that editing and jumps write to,
in places that allow interaction, until the store is renamed in branch 09. Nothing reads it yet.

Co-Authored-By: Claude <noreply@anthropic.com>
message-variants R9 to R16, R18 to R21, R51: the header with the author's name, username and
roles, the avatar, the status indicators, the read receipt, and the hooks that decide whether a
row is selected or drawn with the editing look. From the reference, with develop's username rule,
roles without a click, and the clicks of the avatar and of a selecting row kept on their element.

Co-Authored-By: Claude <noreply@anthropic.com>
… stores

message-variants R49: one request per message gave way to the room and the subscription the place
already has, as the base did for the broadcast reply since #43471. Nothing changes for the viewer:
a message of another room already reads the client stores for its own (the fix before it).

Co-Authored-By: Claude <noreply@anthropic.com>
message-variants R1, R2, R6, R9, R14, R17 to R21, R23, R27, R30, R31, R33, R37 to R39 and the
known defects D2 and D3: RoomMessage and its content from the reference, compared with develop's:
usernames, the click of the avatar and of a selecting row kept on their element, the thread
metrics and the broadcast reply by the display and the conversation the place gives.

Co-Authored-By: Claude <noreply@anthropic.com>
gabriellsh and others added 9 commits November 13, 2026 19:04
…ead preview variants

message-variants R3 to R5, R10, R11, R12, R22, R24, R28, R29, R32, R34 to R37, R39, R8, R51 and the
known defects D4 to D8: from the reference, compared with develop's: the username next to the
name of a system message, the avatar click of a thread message kept on its element, the plain text
preview of a thread started by a message without markdown, and the Fuselage left container.
A story stacks the four variants.

Co-Authored-By: Claude <noreply@anthropic.com>
message-variants R44, R45, R52: the audit draws the package's room and system messages and follows
the viewer's display settings (time, roles, username beside the real name, read receipts, URL previews),
without a toolbar; a failed request for the roles of an audited room leaves the row as it is. Contact
history draws the package's status indicators.

Co-Authored-By: Claude <noreply@anthropic.com>
…iants

message-variants R25, R26, R40, R46, R48: the room's list draws the package's room message, system
message and thread preview with the room's selection and the date format of the display context.
Each row it renders registers itself for "Select all", as the old variants did, until the list
engine replaces it.

Co-Authored-By: Claude <noreply@anthropic.com>
…e ui-message-list message variants

message-variants R25, R42, R43, R46, R48: the tabs and search draw the package's room message and
system message with the room's selection, their place and the markers of the subscription.

Co-Authored-By: Claude <noreply@anthropic.com>
…iants

message-variants R24, R25, R28, R32, R41, R46: the thread's list draws the package's thread message and
system message and gives them no selection, so they never join the room's; the selection store the
thread kept for that is gone.

Co-Authored-By: Claude <noreply@anthropic.com>
… no longer renders

message-variants R50: the room's list, a thread's list, the pinned, starred and mentions tabs and
search mount the messages provider with their room and subscription, and the room's list, tabs and
search with the room's selection. The app keeps no variant, no old list context and no provider that
fed it; the proofs of the specs of branches 03 to 05 that sat next to them move with their code.

Co-Authored-By: Claude <noreply@anthropic.com>
… read

message-variants R47: the room no longer provides the highlighted message to its lists; the messages
provider reads the store that jumps and editing write to. The store stays until branch 09.

Co-Authored-By: Claude <noreply@anthropic.com>
message-variants R51: the app's lib/MessageAction.ts re-exports the package's types.

Co-Authored-By: Claude <noreply@anthropic.com>
message-variants: Design, code and tests of the spec, the proof table of the plan, and the plan done.

Co-Authored-By: Claude <noreply@anthropic.com>
@gabriellsh
gabriellsh force-pushed the message-list/06-variants branch from 7bf8bd2 to bb86c64 Compare November 14, 2026 14:29

This branch has not been deployed

No deployments
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.

1 participant