Files
buzz/desktop/src
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d 1cdd562619 fix(desktop): keep oldest window on scrollback so the channel head renders
The timeline caps visible content at MAX_TIMELINE_MESSAGES (2000) and always
kept the *newest* window, evicting the oldest. That's correct for live-tailing
but backwards for scrollback: paging back to the start of a channel with more
than 2000 content events evicted the head — the first messages never rendered.
On a non-virtualized list the cap is the only DOM bound, so it can't simply be
lifted.

Make eviction direction-aware. normalizeTimelineMessages / mergeTimelineHistory-
Messages take a `keep` end ('newest' | 'oldest', default 'newest' so cold-load
and live-tail are unchanged). The scrollback merge in useFetchOlderMessages
passes 'oldest', so the head the reader is scrolling toward survives and the
far newer tail (which they've left and which live/cold-load re-seeds) ages off
instead. Same 2000-row DOM bound either way.

Verified against #buzz-bugs (~2104 content events): scrolling to the start now
renders the channel_created genesis row; previously the first ~104 messages were
clipped.

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-06-19 20:26:59 -04:00
..
2026-06-17 18:56:57 +01:00