Repository navigation
Description
Summary
A nested #Page can reopen with an empty body after its ancestor is restored from Recycle, even though the descendant's saved blocks are still present. The page breadcrumb updates to the live parent correctly. Visiting the restored parent and opening the child through its page icon refreshes the missing content.
This is a rendering/refresh problem, not observed permanent data loss.
Environment
- Logseq DB development build from clean master
8ffbb220938acc00e1c70e8579e7c52ab97c2aa7 - Logseq 2.0.1, Electron 42.3.0, Chromium 148.0.7778.180
- Debian 13, Linux x86_64
- Both loaded renderer and Node DB worker report revision
8ffbb22, build 2026-10-01T14:32:34Z - Local disposable DB graph; no sync, plugins, or direct database edits
- Verified through the actual Electron GUI. Web was not tested
- Latest origin/master still equals this SHA at 2026-10-01 16:46 UTC
Minimal fixture
An ordinary page QA-E-Visibility containing a block QA visibility child tagged with the built-in #Page. Open that child page and save one or more ordinary content blocks, e.g. QA visibility content intact.
Reproduction
- Create the fixture above. Reload while on the child and verify its saved content is visible. Its breadcrumb is
Library / QA-E-Visibility. - Click the parent breadcrumb. Right-click the ordinary parent's title, choose Delete page, and confirm the recoverable deletion. Do not independently delete the child.
- Return to the child through navigation history if deletion has not already returned there. Its breadcrumb now reads
Recycle / QA-E-Visibility. - Press Ctrl+R while on this inherited-recycled child. It shows an empty body.
- Click the Recycle breadcrumb. On the parent's row, click Restore, not Delete.
- Click the application's Back arrow to return to the child.
- Observe that the breadcrumb is live again (
Library / QA-E-Visibility), but the body still appears empty instead of showing the saved content. - Click the parent breadcrumb, then click the child page's icon in the parent. The original content appears again without any content edits or database repair.
Expected
Restoring the ancestor should refresh the descendant's content when the live child is opened, with no intermediate empty view requiring another navigation path.
Actual and frequency
- Observed twice in two ancestor delete/restore cycles on the same parent/child pair in one local graph.
- In the isolated second cycle, two saved blocks were visibly verified after reload before deletion (16:40:09 UTC).
- Reloading the child while inherited-recycled produced the empty view (16:42:53).
- Restore parent -> Back returned to a live-breadcrumb child with no displayed content (16:44:03).
- Parent breadcrumb -> child page icon recovered both original blocks (16:45:06), with no intervening content edit or reload.
- In the first cycle, opening the restored child from All Pages also showed the empty body. Typing an additional sentinel into that apparent empty list and reloading displayed both the original and new blocks. This first recovery combined an edit and reload; the second cycle above isolates a navigation-only recovery.
Controls / related reports
- All Pages visibility itself works: both parent and nested child disappear while the ancestor is recycled (14 -> 12 rows), an unrelated live page remains, and both return exactly once after Restore (14 rows; title filter finds 2). This differs from closed Child page remains visible in All Pages after its parent page is moved to Trash #1333.
- Separately deleting/restoring child and parent in either order passes the hierarchy check; this is not closed Restoring a namespace child before its parent loses the parent #1350.
- No inbound reference rewriting is needed; this differs from Restoring a page from the Recycle leaves the links to it as plain text #1349.
- Closed Forward after deleting a focused node #435 describes navigating a deleted node and seeing empty child pages, but does not include restoring the ancestor and then reopening the now-live child. It may be related context.
Source lead (hypothesis, not a confirmed root cause)
At this SHA, children membership reads consider the full recycled ancestor chain, while incremental membership changes are derived from directly changed entities. Restoring an ordinary ancestor page may therefore leave the previously loaded empty descendant membership view without a refresh. Ready subscription slots can be reused.
Activity
yuxi-liu-wired commentedon Oct 28, 2026
Still on current master (d06ded9971), with the cause the report suggests:
direct-children-membershipreturns no rows while any ancestor is recycled, butmembership-atinsrc/main/frontend/worker/render_delta.cljsonly looks at an entity's owndeleted-at. Restoring an ancestor therefore emits no children patches for the parents inside the restored subtree, and the renderer keeps their cached empty child lists until a reload. A fix is a render-protocol choice: emit children patches for every parent in the restored subtree, or have a restore invalidate the renderer's cache for that subtree.