From 0604b260d21f5b9dc539e3400d7aceb97e8940e7 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Tue, 9 Jun 2026 10:10:16 -0700 Subject: [PATCH] cleanup --- js/desktop/src/hooks/use-stream-particles.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/js/desktop/src/hooks/use-stream-particles.ts b/js/desktop/src/hooks/use-stream-particles.ts index b7db180..7be9ff6 100644 --- a/js/desktop/src/hooks/use-stream-particles.ts +++ b/js/desktop/src/hooks/use-stream-particles.ts @@ -10,8 +10,8 @@ export type StreamParticle = Particle & { properties: StreamProperties; }; -const INITIAL_PAGE_SIZE = 3; -const PAGE_INCREMENT = 3; +const INITIAL_PAGE_SIZE = 12; +const PAGE_INCREMENT = 12; // Stable where-constraint references so the Firestore subscription only // re-attaches when the tab actually changes, not on every render. @@ -28,12 +28,7 @@ function useVisibilityScopes(userId?: string, networkId?: string) { } interface UseStreamParticlesOptions { - /** - * Which streams to subscribe to. Open streams are loaded in full (bounded - * by active work — full realtime coverage is needed for autoplay/huddles). - * Closed streams are paginated via `loadMore`. - */ - // TODO: can't we paginate open streams, and if the top set changes then our auto-play would still trigger? + // Which streams to subscribe to status: 'open' | 'closed'; } @@ -41,9 +36,9 @@ interface UseStreamParticlesResult { streams: StreamParticle[]; isLoading: boolean; networkId: string; - /** True when more closed streams may exist beyond the current window. */ + /** True when more streams may exist beyond the current window. */ canLoadMore: boolean; - /** Extend the pagination window. No-op on the open tab. */ + /** Extend the pagination window. */ loadMore: () => void; }