Repository navigation
fix(MessageList): show one date separator per day when unread messages start mid-day - #3470
Open
MartinCupela wants to merge 1 commit into
Open
MartinCupela wants to merge 1 commit into
MartinCupela wants to merge 1 commit into
Conversation
…s start mid-day
processMessages inserted a second date separator before the first unread
message from another user. DateSeparator ignores its `unread` flag, so the
list showed the date twice ("Today" ... "Today"). UnreadMessagesSeparator
already marks where the unread messages start, so date separators now go
only at the first message and where the day changes.
In VirtualizedMessageList the extra separator also hid the unread marker:
the marker shows when the previous item is the last read message, and that
item was the separator.
Deprecates, in JSDoc only, hideNewMessageSeparator on both lists and
processMessages, DateSeparatorProps.unread and .position, and
DateSeparatorMessage.unread. No public type changes.
Closes #3467
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MartinCupela
requested review from
NikolaGoranNaumovski and
oliverlaz
as code owners
November 26, 2026 14:13
Contributor
|
Size Change: +3.05 kB (+0.27%) Total Size: 1.13 MB 📦 View Changed
ℹ️ View Unchanged
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: https://linear.app/stream/issue/REACT-1628
Closes #3467
🎯 Goal
When unread messages start partway through a day, the message list shows the date twice: "Today" at the start of the day and a second "Today" where the unread messages start.
processMessagesinserted that second separator withunread: true, butDateSeparatorignores the flag, so it looked like an ordinary date separator.UnreadMessagesSeparatoralready marks where the unread messages start.🛠 Implementation details
processMessagesinserts a date separator only at the first message and where the day changes. The unread separator and the "never two separators in a row" check that only guarded it are removed.VirtualizedMessageList: the extra separator also hid the unread marker there. The marker shows when the previous item is the last read message, and that item was the separator. No change in the list itself; the shared fix restores it.UnreadMessagesSeparator:hideNewMessageSeparator(both lists andprocessMessages),DateSeparatorProps.unreadand.position,DateSeparatorMessage.unread.DateSeparatorthat rendered something forunreadno longer receives it, andprocessMessagesoutput no longer contains that separator.AGENTS.md, the v14 → v15 migration guide, and the cookbook's unread recipe (it no longer passeshideNewMessageSeparator).utils,MessageListandVirtualizedMessageList(which also checks the unread marker's position). They fail onmaster.🎨 UI Changes
Checked in the vite example with today's messages seeded locally (read messages, then two unread from other users):
masterMessageListVirtualizedMessageList(date separators on)🤖 Generated with Claude Code