mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-09-25 14:13:36 +00:00
load_more_messages() (background fill, main loop) ran each batch's metadata reads while holding the LVGL lock. A cold batch is 2+ LittleFS reads; on the degraded device a fill batch measured ~4s in earlier captures, within a hair of the 5s deadlock guard. The fill starts immediately after any conversation open (first page > INITIAL_RENDER), so an open triggered a second under-lock stall right after the first was fixed. Same restructure: guard lock copies the batch's hashes, metadata I/O runs off-lock, the bubble prepend commits under a brief lock. A _fill_generation counter (bumped on every list rebuild: open, prepare commit, refresh) discards a batch whose conversation changed mid-I/O. Display order is preserved (newest-first read order + push_front gives oldest-to-newest, matching the old loop).