Skip to content

fix: keep text filter operator changes from crashing views - #13575

Closed
tiensonqin wants to merge 2 commits into
masterfrom
logseq/fix-text-filter-operator-crash-bac2
Closed

tiensonqin wants to merge 2 commits into
masterfrom
logseq/fix-text-filter-operator-crash-bac2

Conversation

@tiensonqin

Copy link
Copy Markdown
Contributor

Switching a tag-table Text-property filter from is to text contains or text not contains persisted a 2-element [property operator] clause. View resource validation requires every clause to be a 3-tuple, so the app immediately showed Something went wrong before a search string could be entered.

This keeps an empty string when the previous equality value is incompatible, so the editor stays on a valid [property operator ""] clause. The user can then type a contains string and the table filters normally.

Also pads 2-element text clauses on persist, so an in-progress contains filter cannot be written in the invalid shape.

Fixes logseq/db-test#1392

Tests

  • Worker value normalization: set → text contains / text not contains becomes ""; existing strings are kept
  • UI clause + persist + valid-filters? / require-view-context! compatibility for the in-progress 3-tuple
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 2, 2026 16:37
Switching an equality filter to text contains dropped the set value and
persisted a 2-element clause. View resource validation requires a
3-tuple, so the app crashed before a search string could be entered.

Co-authored-by: Tienson Qin <[email protected]>
It is a special form inside is, not a referable var in this CLJS build.

Co-authored-by: Tienson Qin <[email protected]>

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #13885, which covers the same bug more completely. Thanks!

@tiensonqin tiensonqin closed this Nov 20, 2026
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.

Changing a Text filter to contains crashes the app with Invalid view resource context

2 participants