From 9534d2996748fda636d3e1243629bc6206b7cccf Mon Sep 17 00:00:00 2001 From: Till JS Date: Fri, 3 Apr 2026 12:31:53 +0200 Subject: [PATCH] fix: revert client sync from per-app SSE to HTTP polling Per-app SSE connections exhaust the browser's 6-connection-per-origin limit, causing the app to hang on load. Reverted to HTTP polling for both eager and lazy apps. SSE server endpoint remains available for future use as a single unified stream (one connection for all apps, similar to the old unified WebSocket). Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/manacore/apps/web/src/lib/data/sync.ts | 31 ++++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/apps/manacore/apps/web/src/lib/data/sync.ts b/apps/manacore/apps/web/src/lib/data/sync.ts index 5f2720be8..1a9e885bd 100644 --- a/apps/manacore/apps/web/src/lib/data/sync.ts +++ b/apps/manacore/apps/web/src/lib/data/sync.ts @@ -78,7 +78,7 @@ export function createUnifiedSync(serverUrl: string, getToken: () => Promise Promise {}); + channel.pullTimer = setInterval(() => pull(appId).catch(() => {}), PULL_INTERVAL); } - // Lazy apps: no SSE until ensureAppSynced() is called + // Lazy apps: no pull until ensureAppSynced() is called } // Listen for online/offline @@ -495,10 +497,11 @@ export function createUnifiedSync(serverUrl: string, getToken: () => Promise {}); } } } @@ -506,11 +509,6 @@ export function createUnifiedSync(serverUrl: string, getToken: () => Promise Promise {}); + channel.pullTimer = setInterval(() => pull(appId).catch(() => {}), PULL_INTERVAL); } return {