managarten/apps
Till JS c8daa443fc feat(sync): replace WebSocket with SSE client for real-time sync
Client now connects to GET /sync/{appId}/stream via fetch + ReadableStream
instead of WebSocket + HTTP pull. Each app gets its own SSE connection that
delivers initial sync data + live updates in one persistent stream.

Changes:
- Remove WebSocket connection (connectUnifiedWs)
- Add connectSSE() per app using fetch + ReadableStream
- Parse SSE events (changes, heartbeat) from streamed response
- Auto-reconnect on disconnect with WS_RECONNECT_DELAY
- Fallback to polling if SSE endpoint not available
- ensureAppSynced() connects SSE for lazy apps on first visit
- handleOnline() reconnects all active SSE streams
- handleOffline() aborts all SSE connections

Benefits: 1 connection instead of 2 (WS + HTTP), data delivered instantly
without notification → pull round-trip, works through HTTP proxies/CDN.

Push (POST /sync/{appId}) remains unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 22:27:30 +02:00
..
api feat(api): port remaining 12 modules to unified API server 2026-04-02 21:34:08 +02:00
calc chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
calendar chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
cards chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
chat chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
citycorners chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
contacts chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
context chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
docs refactor: rename ManaDeck to Cards across entire monorepo 2026-04-01 11:45:21 +02:00
guides chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
inventar chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
manacore feat(sync): replace WebSocket with SSE client for real-time sync 2026-04-02 22:27:30 +02:00
manavoxel feat(manavoxel): clean up dead code, add portal keys, fix triggers, implement gold economy 2026-04-01 21:04:25 +02:00
matrix feat: add Cmd+K spotlight actions to all 23 apps 2026-04-01 12:11:34 +02:00
memoro chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
moodlit chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
mukke chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
news chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
nutriphi chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
photos chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
picture chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
planta chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
presi chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
questions chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
skilltree chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
storage chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
times chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
todo chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
traces chore: archive 17 standalone app servers (replaced by unified API) 2026-04-02 21:37:45 +02:00
uload chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00
zitare chore: archive 25 standalone web apps, move wisekeep to apps-archived 2026-04-02 20:14:29 +02:00