app: read the history a page at a time and open clips on demand

Every launch parsed all 313 timelines, raw responses and all, which put
2.1 GB of JSON on the heap at startup.

The list now holds `Summary` rows: `history::summaries` parses a file,
keeps the champion, queue, scoreline, LP change and event count, then
drops the timeline. Files are listed by write time, and `poll` reads the
next 20 when the list is scrolled near its end or when the filtered rows
do not fill the screen. Selecting a row hands its id to the review
screen, which reads that one timeline on a thread.

Peak memory over 313 recordings: 165 MB.
This commit is contained in:
vhaudiquet committed 2026-11-16 23:48:58 +01:00
1 parent 4efc2f3968
commit 6584b2f92f
7 files changed
+318 -86

No files matched your search

+6
View File
@@ -646,6 +646,12 @@ impl ScrollBar {
last: std::rc::Rc::new(std::cell::Cell::new(rune::ScrollPos::default())),
}
}
/// Where the viewport is scrolled to, as of the last frame that reported it.
///
/// A screen can read this to load more rows as the end of a long list comes into view.
pub fn position(&self) -> rune::ScrollPos {
self.last.get()
}
/// Make this viewport's scrolling move the thumb, and its key one a drag can scroll to.
pub fn follow(&self, key: &'static str, viewport: El) -> El {