Skip to content

feat(ios): paginate older turns with infinite scroll - #347

Merged
0xSero merged 2 commits into
mainfrom
revive/ios-conversation-scroll
Sep 14, 2026
Merged

0xSero merged 2 commits into
mainfrom
revive/ios-conversation-scroll

Conversation

@0xSero

@0xSero 0xSero commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Revival of DatScreamer's closed #308 (branch deleted), reworked onto the stacked scroll rework (#339, kingbootoshi's ScrollPosition rebuild). Fixes the iOS half of #306.

Graft strategy: the original #308 and #326 are parallel ScrollPosition-based scroll-follow redesigns. This rebranch keeps the stacked #326 scroll-follow infrastructure (edge-anchored ScrollPosition, onScrollPhaseChange follow state, geometry-driven follow) and grafts only the pagination features:

  • scroll-triggered older-page prefetch via onScrollTargetVisibilityChange + ConversationInfiniteScrollPolicy (no more "Load earlier" button)
  • debounced per-cursor request dedup + loader indicator (requestedOlderTurnsCursor/showOlderPageLoader)
  • older-page loader anchored to the bottom anchor, onLoadOlderTurns now reports whether a page loaded (async Bool)
  • turn auto-collapse policy (ConversationTurnCollapsePolicy in TranscriptTurn.swift)
  • the original's parallel scroll plumbing (duplicate ScrollPosition/native-scroll-view resolver/momentum jump) was dropped in favor of the stacked refactor(ios): rebuild transcript scroll follow on ScrollPosition (-159 lines) #326 implementation

Verification

  • swiftc -parse clean on all touched files
  • PerformanceHelpersTests (+98 lines) run in the iOS test lane
  • Mobile CI (android + ios) runs on the stacked branch

@0xSero
0xSero force-pushed the rebranch/resume-existing-sessions branch from d7d9b1b to 47a9813 Compare September 13, 2026 18:29
@0xSero
0xSero force-pushed the revive/ios-conversation-scroll branch from 7b9cba1 to fc80c0a Compare September 13, 2026 18:29
@0xSero
0xSero force-pushed the rebranch/resume-existing-sessions branch from 47a9813 to 7940f23 Compare September 13, 2026 20:53
@0xSero
0xSero force-pushed the revive/ios-conversation-scroll branch from fc80c0a to 2082a45 Compare September 13, 2026 20:53
@0xSero
0xSero changed the base branch from rebranch/resume-existing-sessions to main September 13, 2026 20:53
Replace the explicit Load-earlier-messages button with scroll-triggered
pagination. Track visible turn IDs and prefetch the next older page as the
user approaches the top, debounced per cursor so concurrent prefetches
collapse. Bump page size to 20, make loadOlderTurns report whether a page
was actually loaded, and re-route the Latest button through a semantic
ScrollPosition with a UIKit scroll-view resolver so the jump executes even
while momentum is decelerating. Anchor merged exploration rows to their
newest constituent turn so prepending older pages keeps scroll identity
stable, and auto-collapse large conversations past a 200-item threshold.
@0xSero
0xSero merged commit 0e84308 into main Sep 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants