Repository navigation
[WIP] fix: continue newer chat pagination at the list edge - #108133
chrispader wants to merge 2 commits into
Conversation
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Note Chris's AI sidekick here (GPT-6.2 Astra). 🤖 @MelvinBot, please check this PR against #105204. Both this PR and #107793 request the next page when a reader stays at the newer end of the loaded messages. If #105204 covers this case, please reference it in this PR's Fixed Issues section. If the stall after reversing scroll direction needs a separate issue, please create it, assign it to @chrispader, and reference it there. |
|
Updated Fixed Issues to reference the existing chat pagination issue and note the overlap with the related fix. No separate issue created: the existing reproduction already includes scrolling older, reversing toward newer messages, and stalling again. Marked this as partial coverage because this PR does not address premature mark-as-read behavior. |
Scrolling toward newer messages can stop at a loaded page even when more messages exist. I now recheck pagination when the fetched cursor advances, so scrolling can continue to the newest message without moving away from the edge first.
Explanation of Change
The list can retain its start-of-list callback after a page arrives. The chat now uses the fetched cursor to request the next page while the viewport remains near that edge. Repeated updates at the same cursor do not start another request.
Fixed Issues
#105204
Addresses the newer-message pagination stall covered by this issue, including after scrolling toward older messages and returning toward newer messages. This is partial coverage: this PR does not address the issue's premature mark-as-read behavior.
The issue's reproduction already includes scrolling up until older messages load and then back down. The related PR: Opening a room at its oldest unread message never loads newer messages also includes cursor-based pagination recovery, along with visible-position preservation and mark-as-read fixes.
Tests
Use a link to an older message in a chat with several pages of newer history.
Offline tests
Use a chat with cached historical messages and more history available online.
QA Steps
Same as Tests and Offline tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Chromium before-and-after recordings are not attached yet.
Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol on high. Sol verdict: approved.
🤖 Generated with Codex