Conversation
0xSero
force-pushed
the
feat/home-sessions-infinite-scroll
branch
from
September 14, 2026 14:10
1f518c2 to
6ed384f
Compare
Add cursor-paged session loading in the shared Rust store (AppStore::load_threads_page) with retained per-runtime cursors and a sessionListHasMore projection, so the home sessions list loads pages on scroll instead of a fixed top-10. iOS: HomeDashboardModel grows a recentLimit window (10 + 10 per load-more) fed by AppModel.loadThreadsPage, a drag-down UIRefreshControl full reload, and a near-bottom load-more trigger in the UIKit scroll view; topInset bumped 48 -> 56 for extra spacing above the list. Android: HomeDashboardScreen grows the same recentLimit window via AppModel.loadSessionsPage, adds Material3 PullToRefreshBox + snapshotFlow near-bottom load-more, and +8dp top content padding. Connect-time loads use the paged first page instead of a full drain. Android Conversation parity with the iOS infinite-scroll PR: replace the manual 'Load earlier messages' button with scroll-proximity auto-prefetch, stable LazyColumn turn keys for prepend scroll preservation, a 200-item auto-collapse policy, and turn page sizes bumped 5 -> 20. (cherry picked from commit e056c6c)
Sessions were only ever loaded from the (unreachable) sessions screen or search, so a freshly connected server never populated its session list. Fetch the thread list in the post-connect warmup via a shared refresh_thread_list fanout, and pin the alleycat bridges to a fork whose opencode bridge enumerates sessions across all project worktrees (a bare GET /session only returns the default project). Relax update-alleycat-main to treat any rev-pinned git dep as pinned so the fork pin survives. (cherry picked from commit aef6af4)
Restore auth state when needsLocalAuthRestore is true, without the redundant loadSessionsPage call (the Rust post-connect warmup handles thread population). (cherry picked from commit c6c1b0e)
(cherry picked from commit f979349)
clear_thread_page_state after the warmup's full drain wiped session_pages → session_list_has_more = false → infinite scroll never triggered. After a full drain the cursor is naturally None and has_more reflects the server's actual state, so clearing is unnecessary and harmful. (cherry picked from commit 1d921ae)
(cherry picked from commit 4b42379)
(cherry picked from commit 6e6b7d8)
The warmup drained all pages (limit: None) which set session_list_has_more = false immediately, preventing loadMoreSessions from ever firing. Now loads just the first page (limit: 20) so the server's has_more flag is accurate and the home list's infinite-scroll gate works. Also persists cursor state in refresh_thread_list so session_pages is non-empty after the warmup. (cherry picked from commit b9bf872)
The warmup (spawn_post_connect_warmup) is a fire-and-forget Tokio task. refreshSnapshot() in reconnectSavedServers() runs before the warmup finishes, so the Kotlin snapshot always has stale session data and session_list_has_more=false — making infinite scroll impossible. Replace refreshSnapshot() with loadSessionsPage() for connected servers, which synchronously loads the first page via Rust's load_threads_page, sets accurate cursor/has_more state, and then snapshots. (cherry picked from commit 259a153)
(cherry picked from commit 660e859)
(cherry picked from commit fbe6b26)
- iOS: local-only load-more path when server cursors are exhausted, firstPageLoaded/hadVisibleServers guards so the first page loads once runtime kinds are ready, and targetServerIds scoping for servers that still have remote pages. - iOS: fix loadMoreFired reset so a new page can trigger after the in-flight flag flips. - Android: add isLoadingMoreSessions in-flight guard, local-only recentLimit bump path, and LazyColumn listState wiring so the load-more footer reflects the right state. - Bump home session page size 10 -> 20 and fix preview wiring for the new sessionListHasMore field. (cherry picked from commit 4fb130d)
Keep subagent/agent threads off the home session list. The opencode bridge now excludes them at the source (parentID filter + drop), so the list is defense-in-depth on top of that. Re-pins alleycat to d503bfc which contains the opencode-bridge subagent exclusion (thread/list drop + session.created guard). (cherry picked from commit d393140)
The infinite-scroll change added the required session_list_has_more field to AppServerSnapshot; five test files still built it with the old signature and failed to compile under xcodebuild test. Add sessionListHasMore: false to each. (cherry picked from commit 09c3ffc)
(cherry picked from commit 2e5746a)
0xSero
force-pushed
the
feat/home-sessions-infinite-scroll
branch
from
September 14, 2026 16:13
6ed384f to
04d9ad6
Compare
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.
Carried from #331 so it can merge against current main: the original head branch lives in @DatScreamer's fork and could not be rebased here. All 15 home-sessions feature commits are cherry-picked with DatScreamer's authorship preserved (
-xreferences the fork originals).What's included (from #331): infinite scroll + pull-to-refresh on the home sessions list for both platforms, shared Rust cursor-paged session loading (
AppStore::load_threads_page, retained per-runtime cursors,sessionListHasMoreprojection), first-page load on connect/reconnect, default page size 10→20, session-card spacing fixes, and the subagent-session exclusion (client-side filter).Dropped from the original branch, with reasons:
d503bfcis an ancestor of the pinned revision); the client-side filter is kept and pins stay untouched here.Verification: Rust test suite + Android unit tests via CI on this PR; the original feature was device-verified by @DatScreamer on both platforms (see #331).
Closes #331.