Repository navigation
Marking a Tiny message unread counts by time, and a chat hidden without a read marker comes back - #1042
Closed
unRekable wants to merge 1 commit into
Closed
Marking a Tiny message unread counts by time, and a chat hidden without a read marker comes back#1042unRekable wants to merge 1 commit into
unRekable wants to merge 1 commit into
Conversation
…nd a chat forgotten with no read marker comes back
4 of 11 tasks
Collaborator
|
Shipped in the 0.2.94 release via #1046. |
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.
What changed and why
Tiny message ids are UUIDs, so their text is no clock. "Mark unread from here" compared ids as text: on the middle of three messages it found nothing before it and counted all three as unread (#1012). The marker and the badge now go by the order the window reads: time, then the server's sequence, and the id only where both tie. A marker for a message the store does not hold is still compared as text, which is the order of an id that carries its own.
The other half: a hidden conversation came back on a new live message only when its id was a UUID, or when the message was newer than the last one read. A conversation forgotten before anything marked where it was read has no marker, so on a network whose ids sort in order it stayed hidden for good: no Inbox row, no notification. A hidden row with no marker now comes back on the next live message on every network, as it already did on Tiny.
Type
Platforms
Proof
Scenario: e2e/scenarios/tiny-mark-unread-order
The scenario runs the real chatd against the loopback Tiny server in
fixture.py, the waytiny-unread-staysdoes, and speaks chatd's socket. Bea writes three messages into one direct: the oldest has the id that sorts last, and the middle one the id that sorts first. The driver reads the chat and asks chatd to mark it unread from the middle message, as the window does. The Inbox must then count two unread, and the marker must sit on the oldest message. Compared as text, all three are unread and the marker is empty, so this driver fails onmain.Lab run: not made. The driver was not run against the real chatd on a lab host.
Also run on this branch on Windows before this pull request:
cargo build --workspace --all-targets --features tinyclient/gui, thencargo nextest run --workspace --features tinyclient/gui(3682 passed, 28 skipped; among them four new store tests, and one existing test gained the check that the message which brings a chat back notifies), thencargo test --workspace --doc --features tinyclient/gui.Compatibility
No protocol change.
Risk and rollback
This changes what a person sees: a hidden conversation without a read marker reappears in the Inbox on its next live message, on every network. That is how Teams describes its own hide ("until a new message arrives") and how Tiny already behaved. Two store tests used such a row as a fixture and expected it to stay hidden; they now hide it after its message, and their expectations are unchanged. Revert the commit.
Release note
"Mark unread" on a Tiny message counts by time, and a chat hidden without a read marker comes back on its next message.
Part of #1012.