Trek_CN/server/tests/integration
jubnl b194e8317d
feat(pwa): implement real offline mode with IndexedDB sync
Add genuine offline read/write capability for trips:

- Dexie IndexedDB schema (trips, places, packing, todo, budget,
  reservations, files, mutationQueue, syncMeta, blobCache)
- Repo layer for all domains: offline reads from Dexie, writes
  optimistically to Dexie and enqueue mutations for later replay
- Mutation queue with UUID idempotency keys (X-Idempotency-Key),
  FIFO flush, temp-ID reconciliation on 2xx, fail-and-continue on 4xx
- Trip sync manager: caches all trips with end_date >= today or null,
  auto-evicts 7d after end_date, fetches bundle endpoint in one request
- Map tile prefetcher: bbox from place coords, zooms 10-16, 50MB cap,
  warms SW cache via fetch
- Sync triggers: network online → flush + syncAll; WS reconnect →
  flush only (rate-limiter safe); visibilitychange/30s → flush only
- WS remoteEventHandler writes through to Dexie on every event
- Server idempotency middleware + idempotency_keys table (migration 100,
  24h TTL nightly cleanup)
- GET /api/trips/:id/bundle endpoint for efficient single-request sync
- OfflineBanner component: amber (offline) / blue (syncing) / hidden
- OfflineTab in Settings: cached trip list, re-sync and clear actions
- usePendingMutations hook for per-item pending indicators

Closes #505 #541
2026-04-14 23:04:25 +02:00
..
admin.test.ts test: add comprehensive coverage for OAuth scopes, MCP, and core services 2026-04-11 14:08:09 +02:00
assignments.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
atlas.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
auth.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
backup.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
budget.test.ts test(mcp): add tests for OAuth 2.1, addon gating, and budget reorder 2026-04-09 23:12:59 +02:00
categories.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
collab.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
dayNotes.test.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00
days.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
files.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
immich.test.ts fix(tests): update test helpers and assertions for migration-98 photo schema 2026-04-14 13:54:48 +02:00
journey.test.ts test: comprehensive Journey test suite — 89.5% new code coverage 2026-04-12 01:19:53 +02:00
maps.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
mcp.test.ts fix(test): bumb default limit to reflect implementation 2026-04-11 02:32:17 +02:00
memories-immich.test.ts fix(tests): fix remaining 3 immich test failures 2026-04-14 13:57:38 +02:00
memories-synology.test.ts Merge pull request #632 from tiquis0290/bug/synology-thumbnail 2026-04-14 20:57:50 +02:00
memories-unified.test.ts fix(tests): update test helpers and assertions for migration-98 photo schema 2026-04-14 13:54:48 +02:00
misc.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
notifications.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
oauth.test.ts security(oauth): harden OAuth 2.1/MCP implementation (Critical + High + Medium findings) 2026-04-10 02:03:27 +02:00
oidc.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
packing.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
places.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
profile.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
reservations.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
security.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
settings.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
share.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
tags.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
todo.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
trips.test.ts feat(pwa): implement real offline mode with IndexedDB sync 2026-04-14 23:04:25 +02:00
vacay.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
weather.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00