Difficulty: Advanced
Type: feature
Background
"Offline Resilience: Advanced caching layer for viewing memberships without connectivity" is an explicitly unchecked Roadmap item in the README, and the app already uses TanStack Query for server-state management, which has built-in persistence support.
Problem
With no offline caching layer, losing connectivity means the membership dashboard, guild profiles, and role data are entirely unavailable, even though this data changes infrequently and is ideal for offline viewing.
Expected outcome
Core read data (memberships, guild profiles, assigned roles) remains viewable while offline, served from a persisted TanStack Query cache, with a clear "Offline — showing cached data as of [time]" indicator, and automatically refreshes once connectivity returns.
Suggested implementation
- Integrate TanStack Query's persistence (
@tanstack/query-persist-client-core with an AsyncStorage or MMKV persister appropriate for React Native) for the relevant query keys (memberships, guild profiles, roles) — exclude anything sensitive/session-related from persistence.
- Add a network-status listener (
@react-native-community/netinfo or Expo's equivalent) to detect offline state and disable/queue mutations while offline (QR access checks inherently require connectivity and should show a clear "requires internet" state rather than silently failing).
- Add a persistent "Offline" banner with the last-synced timestamp when cached data is being shown.
- On reconnect, trigger a refetch of stale queries automatically.
- Add tests simulating offline/online transitions and verifying cached data renders correctly offline.
Acceptance criteria
Likely affected files/directories
src/ (query client setup, persistence config)
app/ (offline banner, affected screens)
tests/
Difficulty: Advanced
Type: feature
Background
"Offline Resilience: Advanced caching layer for viewing memberships without connectivity" is an explicitly unchecked Roadmap item in the README, and the app already uses TanStack Query for server-state management, which has built-in persistence support.
Problem
With no offline caching layer, losing connectivity means the membership dashboard, guild profiles, and role data are entirely unavailable, even though this data changes infrequently and is ideal for offline viewing.
Expected outcome
Core read data (memberships, guild profiles, assigned roles) remains viewable while offline, served from a persisted TanStack Query cache, with a clear "Offline — showing cached data as of [time]" indicator, and automatically refreshes once connectivity returns.
Suggested implementation
@tanstack/query-persist-client-corewith an AsyncStorage or MMKV persister appropriate for React Native) for the relevant query keys (memberships, guild profiles, roles) — exclude anything sensitive/session-related from persistence.@react-native-community/netinfoor Expo's equivalent) to detect offline state and disable/queue mutations while offline (QR access checks inherently require connectivity and should show a clear "requires internet" state rather than silently failing).Acceptance criteria
Likely affected files/directories
src/(query client setup, persistence config)app/(offline banner, affected screens)tests/