Sorting a tag table by a checkbox gives the same order ascending and descending
@tiensonqin is already working on this.
Since Sep 27, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- clojure
- Domain
- databases, testing-qa
Research direction
Start in deps/db/src/logseq/db/common/view.cljs at sort-eids-by-sorting, especially the value-map construction described in the issue. Run or inspect the model-based property test for table views and compare tag-table sorting with query-table sorting. Done means unchecked checkbox values sort as false, with opposite ascending and descending orders.
Written by the indexing model from the issue text.
Description
Steps
- Create a tag Topic with a Checkbox property "done".
- Tag 2 blocks with #Topic: "checked", with "done" checked, and "unchecked", with "done" checked and then unchecked.
- On the Topic page, sort the table by "done" ascending, then descending.
Expected
The 2 directions give opposite orders: unchecked, checked ascending, and checked, unchecked descending. A query table over the same blocks sorts ascending as unchecked, checked.
Actual
The tag page lists checked, unchecked in both directions. An unchecked box sorts like a block without the property, last in both directions.
Cause
sort-eids-by-sorting in deps/db/src/logseq/db/common/view.cljs builds its value map with (if-let [v (eid-sort-value db schema eid)] (assoc! acc eid v) acc). if-let skips the value false, so an unchecked box counts as a missing value.
Found with a model-based property test of table views (ascending against descending, tag table against query table), replayed on upstream master 16c4ed1a0.
- Dominant language
- No language data
- Stars
- 28
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from logseq/db-test
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialogPossibly taken @tiensonqin claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Disabling Flashcards in Settings does not disable Flashcard shortcuts or tagsPossibly taken @tiensonqin claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Default properties (especially URLs) have the wrong type: string instead of urlPossibly taken @tiensonqin claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
area: tools good first issue priority: low size: S testing
Difficulty 2/5 1-3 hours Newbie friendliness 89/100
cubrid-lab/cubrid-mcp-server#292 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
ai_p2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#125522 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
uberdeveloper/fastbt#20 ·