Skip to content

feat(ios): browse and resume existing on-disk sessions from home - #344

Merged
0xSero merged 4 commits into
mainfrom
rebranch/resume-existing-sessions
Sep 14, 2026
Merged

0xSero merged 4 commits into
mainfrom
rebranch/resume-existing-sessions

Conversation

@0xSero

@0xSero 0xSero commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Rebranch of kingbootoshi's #330, stacked on the #329 rebranch. Resolved the ffi/client.rs test-module conflicts between #329 (Claude family tests) and #330 (thread-list hydration budget tests) by keeping both; imports unioned. Supersedes #330 (which was once auto-closed as merged but the push was rejected by branch rules).

@0xSero
0xSero force-pushed the rebranch/claude-model-family branch from 307e7d9 to a15398a Compare September 13, 2026 18:29
@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 rebranch/claude-model-family branch from a15398a to 04ab19c Compare September 13, 2026 20:49
@0xSero
0xSero force-pushed the rebranch/resume-existing-sessions branch from 47a9813 to 7940f23 Compare September 13, 2026 20:53
@0xSero
0xSero changed the base branch from rebranch/claude-model-family to main September 13, 2026 20:53
kingbootoshi and others added 4 commits September 14, 2026 09:53
The server side already surfaces every on-disk CLI session through
thread/list: the alleycat claude bridge hydrates
~/.claude/projects/<encoded-cwd>/<session-id>.jsonl into its thread
index at startup, and codex app-server enumerates ~/.codex/sessions
rollouts directly. SessionsScreen already lists those threads grouped
by workspace with previews and resumes them over the existing
thread/resume path (claude --resume <session-id> under the hood).

What was missing was reachability and persistence: SessionsScreen was
only navigable from inside an open conversation, and the home list
shows pinned threads only, so sessions started on the Mac never
surfaced and never stuck.

Add an All Sessions button to the home toolbar that pushes the
existing SessionsScreen (scoped to the selected server, or all servers
when none is selected), allow the sessions route to carry no server
filter, and pin a thread when it is opened from the browser so a
resumed on-disk session registers as a durable litter thread on the
home list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ot stall the UI

At real scale (thousands of on-disk sessions in ~/.claude/projects and
~/.codex/sessions) the All Sessions screen froze the main thread for
minutes: list_threads drained every thread/list page whenever no limit
was set, and each of the thousands of resulting ThreadUpserted events
pays an O(n) scan plus a full snapshot copy on the main actor, so total
hydration cost grew quadratically while SwiftUI re-diffed the growing
list underneath.

Give list_threads a hydration budget at the fan-out source: page
draining stops once the requested limit (or a 200-thread default for
legacy nil-limit callers such as the pinned-listing repair paths) is
reached per runtime. Cursor, search, and state-db-only queries keep
their existing single-page behavior. The finalize prune now requires
every runtime to have fully exhausted its cursor, since a truncated
drain cannot know the true thread set.

SessionsScreen requests 100 most recent per runtime and grows the
budget only through an explicit Load more row, so worst-case work per
user action is one bounded page instead of the entire session history.
Search stays a local filter over loaded rows and triggers no
hydration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@0xSero
0xSero force-pushed the rebranch/resume-existing-sessions branch from f9345f7 to b4f9c31 Compare September 14, 2026 14:04
@0xSero
0xSero merged commit ac5317c 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.

3 participants