mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 00:37:41 +00:00
The always-on gift-wrap subscription (AccountGiftWrapsEoseManager) had no lower bound on first boot: `since` came purely from the per-relay EOSE cursor, which is null on a cold start, so every DM relay dumped the account's entire NIP-17 history at once — all of which then had to be unwrapped and NIP-44 decrypted before the messages list felt usable. Replace that with a per-account time window: - New `TimeWindowPagination` primitive (commons): tracks a moving `since` floor, opens a small window at boot, widens backward one step per `loadMore()`. The subscription stays open so live messages still stream in regardless of the window. - `AccountGiftWrapsEoseManager` now requests gift wraps from the window floor instead of the EOSE cursor, exposes `loadMore(user)` and a `loadingMore` flag, and clears the flag on EOSE. - The rooms list (`ChatroomListFeedView`) widens the window when scrolled near the end and shows a loading footer while the next window loads. It re-evaluates as the list grows so a near-empty first screen keeps filling. https://claude.ai/code/session_01B1fmmmX8JjQWH3amMLdvcW