Skip to content

Skip deleted query table rows instead of Query error - #13538

Merged
tiensonqin merged 3 commits into
masterfrom
logseq/fix-query-table-delete-row-2b91
Nov 5, 2026
Merged

tiensonqin merged 3 commits into
masterfrom
logseq/fix-query-table-delete-row-2b91

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes logseq/db-test#1368.

Deleting a block that a query table lists no longer replaces the table with "Query error: Report issue" or rejects sibling snapshot resources in the same get-render-snapshots batch.

Cause

Query table view-data resolves :query-row-uuids with a fail-fast entity lookup. After delete, view-data reloads immediately (it watches :block/updated-at) while the query resource still lists the deleted UUID for up to 2s. The missing UUID threw Missing renderer resource entity and rejected the whole snapshot batch.

Change

Skip query-row UUIDs that no longer have an entity, the same way a deleted view already renders as empty. Remaining rows stay in the table.

Test

frontend.worker.handler.render-resource-test/query-view-data-skips-stale-query-row-uuids-test deletes one of two query-row UUIDs, then asserts:

  • the live view-data snapshot drops only the missing row
  • a Linked References view-data resource in the same batch still succeeds

UX

Desktop browser flow on a two-row #Project query table:

  • Before: deleting Alpha replaces the table with Query error
  • After: deleting Alpha drops only that row; Beta remains
  • Settled table
Open in Web Open in Cursor 

View-data reloads immediately after a listed block is deleted while the
query resource still carries that row UUID. Skip missing rows instead of
throwing, so the table and sibling snapshot resources stay alive.

Fixes logseq/db-test#1368

Co-authored-by: Tienson Qin <[email protected]>
@devin-ai-integration
devin-ai-integration Bot force-pushed the logseq/fix-query-table-delete-row-2b91 branch from 2ac3a7e to 6c3e64d Compare September 30, 2026 16:41
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review September 30, 2026 16:41

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Before / after UX verification

Before: master a538a9b60c95490c35bf278903e60f3a9f03a330 — deleting Alpha from a two-row Project query replaces the table with “Query error”.

Before video

After: 6c3e64daacb533ae3de04a5586ad86747218cb78 — deleting Alpha removes only that row; Beta remains through the refresh and settled state, without a visible query error or new browser errors.

After video

Remaining query row after deletion

Desktop browser flow passed; loaded revision verified.

yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 1, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 4, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 8, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 11, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 13, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 16, 2026
@tiensonqin
tiensonqin merged commit f110957 into master Nov 5, 2026
@tiensonqin
tiensonqin deleted the logseq/fix-query-table-delete-row-2b91 branch November 5, 2026 09:09
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.

Deleting a block that a query table lists replaces the table with "Query error"

3 participants