This commit is contained in:
jarek committed 2026-03-02 07:59:58 +01:00
1 parent 4b430340db
commit 9c451aedf9
120 files changed
+7777 -6046

No files matched your search

+7 -6
View File
@@ -521,16 +521,12 @@
// Add to beginning of events (prepend new events) - use Set for fast duplicate check
if (!eventIds.has(newEvent.id)) {
eventIds.add(newEvent.id);
// Use unshift() for in-place mutation instead of spread for O(n) copy
events.unshift(newEvent);
events = events; // Trigger Svelte reactivity
events = [newEvent, ...events];
total = total + 1;
// Add container to list if not already there
if (newEvent.containerName && !containers.includes(newEvent.containerName)) {
containers.push(newEvent.containerName);
containers.sort();
containers = containers; // Trigger Svelte reactivity
containers = [...containers, newEvent.containerName].sort();
}
}
} catch {
@@ -624,6 +620,11 @@
}).then(() => {
connectSSE();
initialLoadDone = true;
}).catch((err) => {
console.error('[Activity] Init chain failed:', err);
// Connect SSE anyway so live events still work
connectSSE();
initialLoadDone = true;
});
// Note: In Svelte 5, cleanup must be in onDestroy, not returned from onMount
});