feat(mobile): offline cache with Drift + stale-data banner#44
Merged
gracefullight merged 2 commits intomainfrom Mar 21, 2026
Merged
feat(mobile): offline cache with Drift + stale-data banner#44gracefullight merged 2 commits intomainfrom
gracefullight merged 2 commits intomainfrom
Conversation
Add offline-first caching infrastructure for contacts using Drift (SQLite) and connectivity detection via connectivity_plus. - Drift schema: CachedContacts, CachedRelationships, SyncMetadata tables - Database provider: Riverpod singleton with lazy SQLite connection - Connectivity provider: stream-based online/offline detection - Contacts repository: API sync + local cache pattern with Dio - Contacts provider: auto-sync when online, serve from cache when offline - StaleDataBanner widget: shows offline status with last sync time - Contacts screen: list view with offline banner and empty states Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # apps/mobile/lib/features/contacts/contacts_provider.dart # apps/mobile/lib/features/contacts/contacts_screen.dart
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.
Summary
CachedContacts,CachedRelationships, andSyncMetadatatables for offline-first data cachingconnectivity_plus-based online/offline detection with Riverpod providersTest plan
flutter analyze— no issuesflutter test— all tests passdart run build_runner build— Drift codegen succeeds without warnings🤖 Generated with Claude Code