Stream the media grid with a scroll buffer

This commit is contained in:
Fisto
2026-09-17 10:47:52 +02:00
parent efd721e83b
commit cc14140f34
6 changed files with 291 additions and 59 deletions
+8 -3
View File
@@ -175,9 +175,14 @@ that deletion is irreversible. The delete button is disabled for a 5 second coun
can take its place while the hidden one stays resumable. The strip text turns red and reads
`API limited, retry in Ns` while Discord throttles media traffic, and a translucent
`N scrapes completed` line appears when scrapes finish — it lives until the tab is reloaded. Each
row shows `X/Yp (~Z%)` when the search total is known. The grid scrolls infinitely
(a **Load more** button appears as a fallback). Media whose source answers `403` shows a
**PRIVATE** tile and `404`/`410` shows **GONE**, with the reason in the tooltip. Some channels deny the bot the search endpoint (`Missing Access`) even though history
row shows `X/Yp (~Z%)` when the search total is known. The grid streams: appending a page inserts
only the new cards, so loaded images never rebuild or flash, and a stream **buffer** below the last
row keeps the scroll alive while the next page is in flight. The buffer is capped at 1.5 viewport
heights, shrinks as the filtered results run out, and says `Loading more…` / `Scroll for more` /
`End of results`; auto-fill cascades pages while the buffer is still in view, so a filter that
returns few items does not dead-stop at one page. At the very bottom while a page loads, an
elastic nudge replaces the hard stop. Media whose source answers `403` shows a **PRIVATE** tile
and `404`/`410` shows **GONE**, with the reason in the tooltip. Some channels deny the bot the search endpoint (`Missing Access`) even though history
reads work, so the total is optional.
**New scrape…** (rightmost) opens a popup with Server and Group chat trees (servers expand to
channels; each row has Links and Download). Every scrape button asks for confirmation; the