Repository navigation
Fill Settings rows at once and repaint frames a batch update held back - #222
Conversation
Two Textual 8.2.8 behaviours left the screen out of date with no error.
Blank Settings screen ("box, no rows"):
- `SettingsList.set_items` mounted empty rows and filled them in a
`call_after_refresh`. Textual queues that callback on the TOP screen
and discards the queue when that screen closes. After a reindex,
`_refresh_open_settings` rebuilds the Settings screens under the
indexer modal, so closing the modal could drop every fill.
- Rows are now filled in the call. A width not yet laid out is corrected
by `on_resize`.
Selection one step behind until the next arrow key:
- While a batch update is open, a visible screen's paint tick skips its
frame, and Textual re-arms only the App when the batch closes. The
frame then waits for the next message to that screen, usually the next
keypress. Markdown opens a batch on every preview build, including
background warming, so both the results pane and Settings were hit.
- `FNDApp._end_batch` now prompts every visible screen, including one
behind a see-through modal, to paint what it is holding.
- Measured in a real terminal with keys 0.3 to 2.5s apart: 3 to 7 stale
frames per run without the fix, none with it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Two Textual 8.2.8 behaviours left the screen out of date, without raising an error.
Blank Settings screen ("box, no rows")
SettingsList.set_itemsmounted empty rows and filled them in acall_after_refresh._refresh_open_settingsrebuilds the Settings screens under the indexer modal, so closing the modal could drop every fill.on_resize.Selection one step behind until the next arrow key
FNDApp._end_batchnow prompts every visible screen to paint what it is holding, including a screen behind a see-through modal.check_idlerather thandelay_update'sscreen.refresh(): it paints only what is already dirty, with no full redraw each time Markdown closes a batch.Evidence
call_after_refreshrestored.make batch-close:Not in this PR
The same
call_after_refreshloss can drop two main-screen callbacks when the indexer modal closes:_do_reflow_sidebarand the filters-panelscroll_to_line. Fixing that needs an app-level change, to be proposed separately.