Skip to content

DB: Zooming a parent block makes :current-page use its title instead of the host page #1383

Description

@tiensonqin

Summary and existing tracking

This is a native-GUI confirmation on current DB master of the zoomed-block problem already described in the unresolved review on merged PR #13034. I found no separate db-test issue for this zoom scenario, so this report provides a reproducible DB fixture and controls rather than claiming a new discovery.

The original db-test#1049 main/sidebar scenario passes in this build. The remaining problem is specifically zooming a parent block: :current-page behaves as though the block's title were a page name.

Historical related issue logseq/logseq#8903 was closed via #8909, for the older file-graph dynamic-variable path.

Minimal reproduction

Use a local DB graph with no page named Milestone initially.

  1. Create a normal page QA-E-Query-Library.
  2. Insert an Advanced Query with the slash menu. Name the query node QA Current page probe.
  3. Hover the query title and click its adjacent Set query gear. Enter this query in the code editor, then press Escape:
{:title "Current page probe"
 :query [:find (pull ?p [:block/title])
         :in $ ?ctx-title
         :where [?p :block/name ?ctx-title]]
 :inputs [:current-page]}
  1. Confirm the query returns QA-E-Query-Library on that page.
  2. Create another page QA-E-Context-Zoom. Add a block Milestone.
  3. Create an indented child beneath Milestone. Use /node embed, search for QA Current page probe, and select the query node from the library, not its code child. Exit editing.
  4. In the full-page view, confirm the embedded query returns QA-E-Context-Zoom.
  5. Click the bullet of Milestone to zoom into that parent block.

Actual: the unchanged embedded query now says No matched result.

  1. Reload with Ctrl+R while zoomed. The empty result persists.
  2. Click the QA-E-Context-Zoom breadcrumb to unzoom. The correct QA-E-Context-Zoom result returns without changing the query or its data.

Same-named page control: this can return the wrong page

  1. Create a separate page named Milestone, with one block unrelated page sentinel.
  2. Return to QA-E-Context-Zoom. In full-page view, the query still correctly returns QA-E-Context-Zoom.
  3. Zoom the parent block Milestone again.

Actual: the query now returns the unrelated Milestone page, rather than its owning QA-E-Context-Zoom page. This wrong result also persists after Ctrl+R.

This control distinguishes incorrect context from a generic missing/failed query render.

Expected

Zooming a block should preserve the owning host page as :current-page, so this query should continue to return QA-E-Context-Zoom. An arbitrary parent-block title should not redirect the query to an unrelated page of that name.

The Advanced Queries documentation distinguishes current viewing-page context from :query-page, the page storing the query. The exact current zoom case is also described in the linked #13034 review.

Frequency and passing controls

  • Reproduced in both zoom trials: initially with no Milestone page, then with the unrelated Milestone page present.
  • Both failure states were checked after reload.
  • Unzooming restored the correct result.
  • The same stored query embedded separately in QA-E-Context-A and QA-E-Context-B returned the respective host correctly.
  • Host B in main plus Host A in the sidebar returned B and A correctly. Navigating main to the query library left the sidebar result anchored to A. Both remained correct after reload.
  • No query/source edits occurred between the zoom/unzoom comparisons.

Environment

  • Logseq Electron development build, version 2.0.1
  • Loaded master SHA: 3c27f1e875d524cfd76e0dc32687cb1f06a0f82e
  • Remote master rechecked at approximately 10:46 UTC on 2026-10-01: same SHA
  • Electron 42.3.0, Chromium 148.0.7778.180
  • Debian GNU/Linux 13, x86_64, Linux cloud desktop
  • Native-created disposable local DB graph; synthetic pages only; sync disabled
  • Tested through actual Electron keyboard/mouse interaction
  • Web app: not tested. The available cloud browser blocks the local development server, so no Web result is claimed

Source pointer, not an implemented fix

On this SHA, page-render-config derives :current-page-title from the rendered entity. page-blocks-cp also uses that configuration for zoomed blocks, and query-current-page-title prioritizes the supplied value. This is consistent with the observed wrong-page control. No fix or source behavior change was applied.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions