Skip to content

Conversation

@rajveermalviya
Copy link
Member

Fixes: #1825

@rajveermalviya rajveermalviya added the integration review Added by maintainers when PR may be ready for integration label Aug 21, 2025
@rajveermalviya rajveermalviya requested a review from gnprice August 21, 2025 15:23
Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks! Generally this revision looks good; just small comments.

Given your timezone you're probably asleep at this hour, and I'll be off on vacation before you start your next workday. So @chrisbobbe please pick up the reviews from here, and go ahead and merge this PR when you consider it ready.

Comment on lines -2955 to +2961
Message streamMessage(int id, int timestamp, User sender) =>
eg.streamMessage(id: id, sender: sender,
Message streamMessage(int timestamp, User sender) =>
eg.streamMessage(sender: sender,
Copy link
Member

Choose a reason for hiding this comment

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

nit:

msglist [test]: Avoid specifying explicit message-IDs in `eg.{*}Message()`

"msglist test", rather than "msglist [test]"

Comment on lines -3230 to +3278
bool forcedShowSender = false;
final bool showSender;
Copy link
Member

Choose a reason for hiding this comment

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

nit: these two commits should get squashed together:

50c8123 msglist test [nfc]: Refactor forcedShowSender evaluation in checkInvariants
b2e9f4e msglist test [nfc]: Rename forcedShowSender to showSender in checkInvariants

for the same reason that motivated the rename (#1815 (comment)): otherwise the intermediate state is confusing in that the name doesn't match the meaning

Comment on lines 3168 to 3170
doTest('2022-01-01 00:30:00', time, false);
doTest('2021-02-01 00:30:00', time, false);
doTest('2021-01-02 00:30:00', time, false);
Copy link
Member

Choose a reason for hiding this comment

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

This is a nice logical sequence. One more case will complete the sequence:

Suggested change
doTest('2022-01-01 00:30:00', time, false);
doTest('2021-02-01 00:30:00', time, false);
doTest('2021-01-02 00:30:00', time, false);
doTest('2022-01-01 00:30:00', time, false);
doTest('2021-02-01 00:30:00', time, false);
doTest('2021-01-02 00:30:00', time, false);
doTest('2021-01-01 01:30:00', time, false);

Copy link
Member

Choose a reason for hiding this comment

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

Let's also have this set of cases exercise the normal situation where the first time is earlier than the second one, instead of the unusual case where it's later. That way these will be exercising cases we expect to happen regularly, rather than cases that can only happen if something's gone wrong somewhere.

(The current implementation will clearly behave the same either way; but that's not something that's evident from looking at the test and the name of the function, and not something that necessarily has to stay true in the future.)

@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Aug 21, 2025
@gnprice gnprice requested a review from chrisbobbe August 21, 2025 21:04
@rajveermalviya
Copy link
Member Author

Thanks for the review @gnprice!

@chrisbobbe, pushed an update, PTAL.

@chrisbobbe chrisbobbe merged commit f304ec4 into zulip:main Aug 25, 2025
1 check passed
@chrisbobbe
Copy link
Collaborator

Thanks, LGTM! Merged.

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

Labels

integration review Added by maintainers when PR may be ready for integration maintainer review PR ready for review by Zulip maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write tests for separating messages after a short time gap

3 participants