Repository navigation
FIX: order the conversation stats last message like the page does - #4286
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Conversation
This branch has not been 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.
Description
Fixes #4281
The last message lookup in the conversation stats query now orders pieces the way the conversation page does: sequence, then timestamp, then id. The timestamp tiebreak decides between pieces that share a turn's sequence number, which is what the page already shows last. On Azure SQL the id tiebreak additionally sorts through the lowered varchar collation the rest of the code base uses, instead of native uniqueidentifier ordering.
Tests and Documentation
A SQLite regression in
test_sqlite_memory.py, failing on main: two pieces share a sequence number with the bigger id on the earlier piece, and the stats preview must name the piece the page orders last. An Azure test pins the compiled lookup to the timestamp ordering and the collated id ordering. Both suites pass (193 tests), and the pinned ORDER BY assertion in the existing indexed lookup test is updated to the new clause. Ruff check and format are clean.No documentation change needed, so I did not run JupyText.