Repository navigation
Description
Summary
After reloading an ordinary page containing a PDF, opening that PDF leaves an empty pane on the left and places the PDF toolbar over the application's header/window controls on the right. The toolbar still reports 1 / 1, but the PDF page is invisible.
Navigating to another page and back, then reopening the same PDF, restores both layout and PDF text without modifying the asset. This also reproduces on an untouched imported PDF, so asset copy/cut/undo is not required.
Reproduction
Use a disposable local DB graph and a simple one-page PDF containing visible text.
- Add the PDF to a normal page, or import a file graph containing a PDF link. In the isolated imported fixture, the Markdown block was
[QA-ALT-PDF-COPPER-OTTER-20261001](../assets/qa-document-20261001.pdf), with that file present underassets/. - Open the resulting page and click the PDF. Confirm that its page and text are visible in the left-hand viewer.
- Close the PDF viewer with Alt+X.
- While still on the ordinary page containing the PDF link, reload the Electron window with Ctrl+R.
- Wait for the page and graph to finish restoring. Do not navigate to another page.
- Click the same PDF link.
Actual: the page content shifts right, leaving a large blank area on the left. The PDF toolbar appears across the upper-right app header and overlaps the normal controls. The PDF page itself is invisible, even though the page counter says 1 / 1.
Expected: the same PDF should render in the normal left-hand viewer, with its toolbar contained within that viewer.
Recovery and controls
- Close the broken viewer with Alt+X.
- Navigate to another ordinary page, then return to the PDF's page.
- Open the unchanged PDF again.
Result: normal left-hand viewer and visible PDF text return.
- Closing and reopening the PDF without navigating did not repair the broken state in the first graph.
- The correct graph and page remained selected in the isolated imported-graph trials. This is not the graph-selection problem in #1361.
- The untouched imported PDF had no copy/cut/undo history. This is separate from the Asset-node paste omission in #1155.
- Imported PDF bytes matched the source, and the same file rendered before reload and after navigation recovery. No file-loss claim is made.
- No source changes or DOM/style patches were applied.
Frequency and fixture
Reproduced after all three reloads checked:
- Native-uploaded PDF in one local DB graph on
3c27f1e875d524cfd76e0dc32687cb1f06a0f82e. - Untouched imported PDF in a separate local DB graph on that same revision.
- The untouched imported PDF again after rebuilding current master
e9fd02c8beb7c63858df5d5cb8667aff24ddd50e.
The synthetic PDF was a single page, 21,339 bytes, containing QA-PDF-TEXT-COPPER-OTTER-20261001; it had no scripts, forms, or external links. SHA-256: 8c11059645f9b2d6889dca8c67126585d38e385a0bc3042e5d03634509e7d244.
Read-only renderer evidence
On current master, while the viewer was visibly broken at 12:10:17 UTC on 2026-10-01:
{:title "QA-20261001-Asset-Import"
:body-data-page nil
:pdf-active true
:container? true
:css {:position "static" :left "auto" :width "0px" :height "0px"}
:rect {:x 1188 :y 0 :width 0 :height 0}}The prior-revision recovery comparison in the native-upload graph showed:
{:title "QA-E-PDF-Source"
:body-data-page "QA-E-PDF-Source"
:pdf-active true
:css {:position "fixed" :left "0px"
:width "498.953px" :height "848px"}
:rect {:x 0 :y 0 :width 498.953125 :height 848}}On current master the PDF was visibly normal before reload at 12:08:51, broken after reload at 12:09:46, and normal again after navigation at 12:11:35 UTC.
The current-master reload log emitted :<invoke-db-worker-error :thread-api/get-route-title twice just before the worker-ready and graph-restore messages. Worker readiness was logged at 12:09:20.093 and graph restoration at 12:09:20.370 UTC.
Source hypothesis
The observed geometry is consistent with the missing body label:
- PDF positioning requires body[data-page], while reserved padding only requires is-pdf-active
- Route handling waits for get-title before assigning body data-page, and page routes call the worker
- The observed worker error marker is emitted when the worker is nil
- The post-restore effect updates document title but does not retry that body-label assignment
This suggests a startup route-label timing problem; it is a hypothesis, not a verified fix.
Environment
- Logseq 2.0.1 Electron development build
- Current tested master SHA:
e9fd02c8beb7c63858df5d5cb8667aff24ddd50e - Both live renderer and Node worker report revision
e9fd02c; build time 2026-10-01T12:05:40Z - Electron 42.3.0 / Chromium 148.0.7778.180
- Debian GNU/Linux 13, Linux x86_64 cloud desktop
- App window 1188 × 848, native keyboard/mouse interaction
- Disposable local DB graphs with synthetic content, no sync
- Web app not tested: the available cloud browser blocks the local development server, so this report makes no Web claim
Related reports checked
No exact DB reload/zero-sized-viewer issue or targeted active PR was found in the fresh search. These older/main-repository reports have related visual symptoms but different recorded triggers:
- #13519: narrow-width toolbar overflow
- #12518: oversized/clipped PDF pages
- #9949, #11265: overlapping window controls
- #10060: blank PDF after resize/zoom
This report is specifically scoped to the current DB reload → open PDF reproduction and navigation-only recovery.
Activity
yuxi-liu-wired commentedon Oct 28, 2026
Fixed in logseq/logseq#13897 (fix: file:// image paths, #alias of a tag, Validate graph report, PDF viewer after reload). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
19 remaining items
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…
fix(route): label the route once the db-worker is up so the PDF viewe…
fix(route): label the route once the graph is open, not when the db-w…