managarten/services/mana-sync
Till JS fed38efb8b fix(sync): fix SSE live updates — 2 bugs found during E2E testing
Bug 1: NotifyUser() early-returned when no WebSocket clients existed,
skipping SSE subscriber notifications entirely. Fixed by restructuring
to check WS clients and SSE subscribers independently.

Bug 2: SSE stream cursor defaulted to client's `since` parameter when
no initial data existed. If `since` was in the future (or very recent),
live updates had created_at < cursor and were silently filtered out.
Fixed by defaulting cursor to now() when no initial data is returned.

Bug 3: NotifyUser used original sseSubs slice instead of sseSubsCopy
after releasing the read lock (race condition).

Verified E2E: Push from client A → SSE stream on client B receives
live change event with correct data within ~1 second.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 23:39:46 +02:00
..
cmd/server feat(sync): add SSE streaming endpoint for real-time sync 2026-04-02 22:24:10 +02:00
internal fix(sync): fix SSE live updates — 2 bugs found during E2E testing 2026-04-02 23:39:46 +02:00
test refactor: rename ManaDeck to Cards across entire monorepo 2026-04-01 11:45:21 +02:00
CLAUDE.md feat(mana-sync): unified WebSocket — one connection per user instead of 27 2026-04-02 13:09:10 +02:00
Dockerfile feat(local-first): add local-first architecture with Dexie.js, Go sync server, and Todo pilot 2026-03-27 11:17:58 +01:00
go.mod refactor(shared-go): extract shared auth package from 3 Go services 2026-04-02 13:27:44 +02:00
go.sum refactor(shared-go): extract shared auth package from 3 Go services 2026-04-02 13:27:44 +02:00
package.json feat(local-first): add local-first architecture with Dexie.js, Go sync server, and Todo pilot 2026-03-27 11:17:58 +01:00