Repository navigation
fix(drawer): stop repeating and offline transcript reads - #225
Merged
Merged
Conversation
Port of the drawer part of iOS #298 (fd33dc04). Pressing a drawer row now joins a transcript read the drawer already sent instead of cancelling and restarting it (a delayed live-event read is still replaced by one now). While the server isn't connected, drawer reads and prefetch only mark the session dirty for the reconnect's snapshot to drain; losing the connection cancels the speculative reads in flight. Invalidated messages and reverts mark an off-screen cached copy dirty so it's read again before it's shown. Ported iOS tests pressingARowJoinsTheReadTheDrawerStarted, pressingARowStillReplacesADelayedRead, anInvalidatedCopyIsMarkedDirty, speculativeReadsWaitForTheServer and losingTheConnectionCancelsSpeculativeReads, and updated the existing tests' expected state as iOS did. All five fail without the fix. Verified with scripts/check.sh on the Android VM.
Review fixes. CachedTranscriptRefreshed drops the session from fetchingTranscripts before its refreshingTranscripts guard, as iOS does, and deleting a session clears it from both sets. The offline test now also sends AcceptedTranscriptUpdated and checks no prefetch starts (it fails without the prefetch connection check). Parity note says offline prefetch is skipped rather than marked dirty. Verified with scripts/check.sh on the Android VM.
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.
Pressing a drawer row no longer restarts the transcript read the drawer already started; it joins it. While offline, the drawer stops reading transcripts and just marks them for the reconnect to read, and losing the connection cancels the reads in flight. Invalidated messages and reverts now mark an off-screen cached copy dirty, so it's read again before it's trusted.
Ports the drawer part of iOS #298 (fd33dc04), without the 5-minute skip iOS later dropped. Nothing visible changes.
Verified: ported the five iOS drawer tests from RequestWaterfallTests into SelectedTranscriptCancellationTests; all five fail on dev and pass here. Full
scripts/check.shpasses on the Android VM. Not checked on an emulator, since there's nothing to see.