Problem
`listPublicRooms()` and `listMyRooms()` both use `.limit(50)` with client-side sorting. When users create more than 50 rooms, the excess are silently dropped.
Suggested approach
- Add cursor-based pagination using Firestore `startAfter` / `endBefore`
- Create a Firestore composite index for `isPublic` + `updatedAt` and `ownerId` + `updatedAt` to enable server-side ordering
- Add "Load more" button or infinite scroll to RoomBrowser
- Consider showing total count in the tab header
Files
- `lib/rooms/room_service.dart` — add pagination params (limit, startAfter cursor)
- `lib/rooms/room_browser.dart` — infinite scroll or load-more UI
Context
Both reviewers flagged client-side sorting and unbounded queries in PR #133. The `.limit(50)` cap was added as a safety measure but pagination is needed for scale.
Problem
`listPublicRooms()` and `listMyRooms()` both use `.limit(50)` with client-side sorting. When users create more than 50 rooms, the excess are silently dropped.
Suggested approach
Files
Context
Both reviewers flagged client-side sorting and unbounded queries in PR #133. The `.limit(50)` cap was added as a safety measure but pagination is needed for scale.