Skip to content

fix(retained): rebuild kid lists after a wholesale invalidation - #234

Merged
tiensonqin merged 1 commit into
feat/ml-backendfrom
fix/retained-resync-kids
Oct 13, 2026
Merged

tiensonqin merged 1 commit into
feat/ml-backendfrom
fix/retained-resync-kids

Conversation

@tiensonqin

Copy link
Copy Markdown
Collaborator

Lui_retained.invalidate (journal overflow past the retained cursor, viewport/scale change, invalidate_paint) reset all fragments, but nothing re-marked kid lists, so the next frame painted childless roots: an empty/blank window.

Repro in Logseq native: g s / Settings → Keymap (one large batch > 8192 journal ops) blanked the entire UI.

Fix: a resync flag set by invalidate; the next paint_retained re-marks every node via mark_rekids. Regression tests: journal overflow resync, invalidate rebuilds kids.

invalidate (journal truncation past the retained cursor, viewport/scale
change, invalidate_paint) reset every fragment, but fresh fragments
start with no kid list and nothing re-marked them, so the next frame
painted childless roots: a blank window. In Logseq, opening the
Keymap settings pane (~2.5k nodes in one batch, > the 8192-op journal)
blanked the whole UI. Re-mark every node's kids on the next paint.

Adds regression tests for journal overflow and explicit invalidate.
@tiensonqin
tiensonqin merged commit e8626b7 into feat/ml-backend Oct 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant