Summary
Currently, MUC room MAM catch-up after a long offline period uses forward pagination (oldest → newest from the last cached message). This means users see old messages loading first, and if the archive is very large, may never see the most recent messages before the page limit is hit.
1:1 chat catch-up already uses backward pagination (before: '' with start filter), which loads the most recent messages first. This is a better UX: the user immediately sees today's messages, and can scroll up to fill any remaining gap.
Proposed change
For v0.16.0, change queryRoomArchive() forward catch-up and fetchMAMForRoom() to use backward pagination with a start filter, matching the 1:1 chat pattern. The gap marker infrastructure (added in v0.15.1) already supports filling gaps via a "Load missing messages" button.
Files involved
packages/fluux-sdk/src/core/modules/MAM.ts — queryRoomArchive() pagination direction
packages/fluux-sdk/src/core/roomSideEffects.ts — fetchMAMForRoom() query construction
packages/fluux-sdk/src/core/backgroundSync.ts — catchUpAllRooms() query construction
Summary
Currently, MUC room MAM catch-up after a long offline period uses forward pagination (oldest → newest from the last cached message). This means users see old messages loading first, and if the archive is very large, may never see the most recent messages before the page limit is hit.
1:1 chat catch-up already uses backward pagination (
before: ''withstartfilter), which loads the most recent messages first. This is a better UX: the user immediately sees today's messages, and can scroll up to fill any remaining gap.Proposed change
For v0.16.0, change
queryRoomArchive()forward catch-up andfetchMAMForRoom()to use backward pagination with astartfilter, matching the 1:1 chat pattern. The gap marker infrastructure (added in v0.15.1) already supports filling gaps via a "Load missing messages" button.Files involved
packages/fluux-sdk/src/core/modules/MAM.ts—queryRoomArchive()pagination directionpackages/fluux-sdk/src/core/roomSideEffects.ts—fetchMAMForRoom()query constructionpackages/fluux-sdk/src/core/backgroundSync.ts—catchUpAllRooms()query construction