Implements offline-first calendar sync infrastructure

Adds IndexedDB and operation queue for robust offline synchronization
Introduces SyncManager to handle background data synchronization
Supports local event operations with automatic remote sync queuing

Enhances application reliability and user experience in low/no connectivity scenarios
This commit is contained in:
Janus C. H. Knudsen 2025-11-05 00:37:57 +01:00
parent 9c765b35ab
commit e7011526e3
20 changed files with 3822 additions and 57 deletions

View file

@ -19,11 +19,12 @@ export const CoreEvents = {
PERIOD_INFO_UPDATE: 'nav:period-info-update',
NAVIGATE_TO_EVENT: 'nav:navigate-to-event',
// Data events (4)
// Data events (5)
DATA_LOADING: 'data:loading',
DATA_LOADED: 'data:loaded',
DATA_ERROR: 'data:error',
EVENTS_FILTERED: 'data:events-filtered',
REMOTE_UPDATE_RECEIVED: 'data:remote-update',
// Grid events (3)
GRID_RENDERED: 'grid:rendered',
@ -36,9 +37,16 @@ export const CoreEvents = {
EVENT_DELETED: 'event:deleted',
EVENT_SELECTED: 'event:selected',
// System events (2)
// System events (3)
ERROR: 'system:error',
REFRESH_REQUESTED: 'system:refresh',
OFFLINE_MODE_CHANGED: 'system:offline-mode-changed',
// Sync events (4)
SYNC_STARTED: 'sync:started',
SYNC_COMPLETED: 'sync:completed',
SYNC_FAILED: 'sync:failed',
SYNC_RETRY: 'sync:retry',
// Filter events (1)
FILTER_CHANGED: 'filter:changed',