This PR implements pagination for closed streams and adds status-based filtering to the stream list. Open streams are now loaded in full with real-time updates, while closed streams are paginated with a "Load more" button to improve performance and UX.
Key Changes
Status-based filtering: useStreamParticles now accepts a status option ("open" or "closed") and filters streams accordingly using Firestore where constraints
Pagination for closed streams: Closed streams are paginated with an initial page size of 50 items, incrementing by 50 on each "Load more" click
Firestore query optimization: Added limit parameter support to useLiveParticleChildren and subscribeToParticleChildren to cap query results
UI updates: Added "Load more" button to ParticleListView that appears when additional closed streams may exist
Tab switching: Closed stream pagination window resets when switching back to the closed tab to avoid ever-growing subscriptions during long sessions
Closes #138
## Summary
This PR implements pagination for closed streams and adds status-based filtering to the stream list. Open streams are now loaded in full with real-time updates, while closed streams are paginated with a "Load more" button to improve performance and UX.
## Key Changes
- **Status-based filtering**: `useStreamParticles` now accepts a `status` option ("open" or "closed") and filters streams accordingly using Firestore `where` constraints
- **Pagination for closed streams**: Closed streams are paginated with an initial page size of 50 items, incrementing by 50 on each "Load more" click
- **Firestore query optimization**: Added `limit` parameter support to `useLiveParticleChildren` and `subscribeToParticleChildren` to cap query results
- **UI updates**: Added "Load more" button to `ParticleListView` that appears when additional closed streams may exist
- **Tab switching**: Closed stream pagination window resets when switching back to the closed tab to avoid ever-growing subscriptions during long sessions
## Implementation Details
- Stable filter references (`OPEN_STATUS_FILTER`, `CLOSED_STATUS_FILTER`) prevent unnecessary Firestore re-subscriptions on render
- Pagination heuristic: if returned items equal the requested limit, assume more may exist
- Open streams maintain full real-time coverage needed for autoplay/huddles functionality
- The filtering logic moved from `NetworkRoot` component into the hook, simplifying the component and improving separation of concerns
https://claude.ai/code/session_01M9w7RQvj5CBQwkn8ZgLpSE
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #138
Summary
This PR implements pagination for closed streams and adds status-based filtering to the stream list. Open streams are now loaded in full with real-time updates, while closed streams are paginated with a "Load more" button to improve performance and UX.
Key Changes
useStreamParticlesnow accepts astatusoption ("open" or "closed") and filters streams accordingly using Firestorewhereconstraintslimitparameter support touseLiveParticleChildrenandsubscribeToParticleChildrento cap query resultsParticleListViewthat appears when additional closed streams may existImplementation Details
OPEN_STATUS_FILTER,CLOSED_STATUS_FILTER) prevent unnecessary Firestore re-subscriptions on renderNetworkRootcomponent into the hook, simplifying the component and improving separation of concernshttps://claude.ai/code/session_01M9w7RQvj5CBQwkn8ZgLpSE