Repository navigation
Conversation
The timeline only updated the view model with what was on screen after a scroll, so in a room that fits on screen it never did, and no read receipt was sent. It is now also updated once placement finishes. An update that arrives while TanStack is still waiting for a scroll it wrote to be read back still describes where a jump started, so it is skipped; the read-back brings another.
A receipt waits half a second before it is sent, and leaving the room within that time dropped it, so the room stayed unread.
The new timeline only sent a receipt for a message with a later timestamp than the last one, so a message from a server with a slower clock was never marked as read. Compare positions in the timeline instead.
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.
Fixes the "rooms stay unread" reports on #35124
This PR fixes 3 cases where the new timeline didn't send a read receipt, so the room stayed unread:
While fixing the first one I found that during a jump (permalink, jump to unread) TanStack's onChange can still report the position from before the jump, which would send a receipt for the wrong message. Commit 1 adds
isScrollPending()to our TanStack patch so the view can skip those updates, plus two small TanStack fixes where it got stuck waiting for a scroll that could never happen. I've opened this upstream as TanStack/virtual#1388.AI assistance