Skip to content

OPE-27: Session Cache #389

Closed
Closed

Description

@ivanfenenko

Durable on-disk session caching (Room on Android, SwiftData on iOS) for stale-while-revalidate: instant home session list and instant Session Chat reopen when server is slow or unreachable.

Architecture (locked): deep SessionCache hot path (seedSessions / rememberSessions / openMessages + handle) for Live Store and MessageSync; internal SessionCacheStore (load / commit / retain / evict / report) for Room / SwiftData / in-memory only. Fresh branch from main — do not rebase ivanfenenko/ope-27-session-cache.

Remaining:

  • Implement SessionCache + SessionMessageCacheHandle + versioned JSON codec on both platforms
  • Room database / entities / RoomSessionCacheStore + Hilt + unit tests
  • SwiftData models / SwiftDataSessionCacheStore + AppContainer wiring
  • Wire SessionLiveStore and MessageSync for disk-first seed + remember/note + flush; expose freshness (isFromCache)
  • Integrate purge on worktree removal and clearAll in Clear All Data
  • Settings Session Cache section (size + Clear Session Cache confirmation)
  • Gate composer + server mutations when connectionStatus != Live (reuse existing connection chrome; no cache-only banner)
  • Disk-first home cold start (skip Probing/Loading spinner when worktrees exist)
  • Cache-hit Session Chat: structure/plain-first paint + blank Loading chrome (no spinner wait for Final)
  • Manual offline cold-start verification

Docs: docs/features/session-cache/
ADR: docs/adr/0006-session-cache-stale-while-revalidate.md
Branch: feature/ope-27-session-cache


Imported from Linear OPE-27. Linear status: Done. Priority: High. Created 2026-06-28. Completed 2026-08-06.
Related: OPE-11, OPE-13, OPE-10, OPE-9.

Activity

  1. self-assigned this
    on Oct 11, 2026
  2. added
    enhancement
    ios
    android
    priority: high
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

androidenhancementiospriority: high

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions