Commit Graph

1016 Commits

Author SHA1 Message Date
Tienson Qin
20a477c35b refactor: move db graph page operations to outliner dep 2025-09-25 21:35:50 +08:00
Tienson Qin
ea057fcc36 fix: api test on file graphs 2025-09-24 22:05:39 +08:00
Tienson Qin
8039054e75 enhance(api): add fullTitle and remove temp properties 2025-09-24 21:49:43 +08:00
rcmerci
6ff7d14f3a chore: print too much in testcase 2025-09-10 15:18:54 +08:00
rcmerci
5f626093ff fix lint 2025-09-09 17:25:39 +08:00
rcmerci
78660f9374 enhance: import-debug-transit support db type 2025-09-09 17:14:28 +08:00
rcmerci
c139e6be93 Merge remote-tracking branch 'origin/master' into enhance/rtc-migrate 2025-09-09 15:38:41 +08:00
rcmerci
894a52f425 fix test 2025-09-08 21:53:34 +08:00
Tienson Qin
fa7cd07192 fix: :and ref query should return nodes that having at least one ref (#12085)
This commit also adds a new :self-ref rule.

`[[page]]` will uses :self-ref,
`(or [[page1]] [[page2]])` will be `(or [:self-ref page1] [:self-ref
page2]`.
`(and [[page1]] [[page2]])` will be `(and [:page-ref page1] [:page-ref
page2] (or [:self-ref page1] [:self-ref page2]))` to ensure the query
result nodes to have at least one page reference.
2025-09-04 17:08:03 +08:00
Tienson Qin
248d8c33f2 refactor: remove block/path-refs (#12081)
1. refactor: use :block/refs and has-ref rule instead of path-refs
2. remove block/path-refs
3. removes :block-parent rule since there's already :parent
4. enhance: skip pipeline calculation for rtc initial download tx
5. refactor(rtc): remove memoize

---------

Co-authored-by: rcmerci <rcmerci@gmail.com>
2025-09-03 20:33:33 +08:00
Tienson Qin
61b862d88a fix: remove inline page tags when saving or inserting blocks
Page tags here means db-class/page-classes.
2025-08-27 13:47:27 +08:00
rcmerci
96ecab44fc test(rtc): update ut migration-results=>client-ops 2025-08-15 16:18:05 +08:00
rcmerci
84f732b4d5 enhance: update :rename-db-idents type migration 2025-08-13 22:24:51 +08:00
rcmerci
804b58bb10 chore: lint 2025-08-12 23:59:48 +08:00
rcmerci
e4f064fc0c Merge remote-tracking branch 'origin/master' into enhance/rtc-migrate 2025-08-12 23:55:19 +08:00
Gabriel Horner
c67e254b4a enhance: search cmd highlights search term and
allows for user specified limit of results.
Also enabled nbb-logseq tests for cli since first
test was introduced
2025-08-11 17:05:39 -04:00
rcmerci
e69f652041 enhance(rtc): generate rtc ops from migration-updates&tx-data 2025-08-07 23:12:23 +08:00
rcmerci
5630d9fd93 enhance: add :rename-db-idents migration type 2025-08-06 22:52:13 +08:00
Tienson Qin
d84d3f9652 enhance(ux): set/unset #Page to convert between page and block (#11970)
* enhance(ux): add/remove #Page to toggle page/block

* enhance(ux): "p t" to set tags for selected blocks

Updated "p a" to toggle displaying all properties including hidden ones.

* feat: cmd+k move blocks

* fix: block could be converted to page and create invalid nodes

Pages with block namespace parents is nonsensical and pages in
property values led to multiple validation errors. Also guard
against class and property pages as namespace parents

* fix: warn on failed cut+paste or indent/outdent of page blocks. Better to warn than silent failure which leaves user confused on
what happened. 

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2025-08-05 17:45:57 +08:00
rcmerci
0a36006288 feat(rtc,wip): migration support in rtc 2025-08-01 14:18:20 +08:00
Tienson Qin
8c402676a9 fix: page references with same name in one block (#12017)
* fix: page references with the same name in one block

* fix: empty :block/name for Library pages

* fix: invalid call to uuid-string?

trace suddenly showing up in multiple CLI calls

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2025-08-01 00:09:31 +08:00
Tienson Qin
d8a07234c1 perf: linked references
1. don't use recursive rule `block-parent`
2. using `:block/path-ref` to get both parent and children
3. run `hidden-ref?` check for refs only (not path-refs)
2025-07-01 22:50:19 +08:00
Gabriel Horner
268889d0b7 chore: rename sqlite.build :build/class-parent to :build/class-extends
Matches new property name and its arity. :build/class-parent deprecated
2025-06-29 15:21:09 +08:00
Tienson Qin
ded9c8e517 fix: update :build/class-parent to multiple values 2025-06-29 15:21:09 +08:00
Tienson Qin
9bede53a34 fix: tests 2025-06-29 15:21:09 +08:00
Tienson Qin
e443bbca9c fix: lint 2025-06-25 18:41:34 +08:00
Gabriel Horner
1b3a9cdd53 fix(dev): test build can't be watched
With last shadow-cljs upgrade, can no longer start a separate test watch
so instead start one with `npx shadow-cljs watch test`
2025-06-24 08:40:33 -04:00
Tienson Qin
33331cc3e6 enhance(perf): avoid re-run built-in queries when collapsed 2025-06-22 18:26:18 +08:00
Tienson Qin
9bb6842b1e fix: missing db/ident for inline tags 2025-06-18 21:57:57 +08:00
Tienson Qin
53e0d1a4ca enhance: put library page name to config to make it easier to rename 2025-06-18 08:25:47 +08:00
Tienson Qin
3759046885 Merge branch 'master' into refactor/page-parent 2025-06-17 08:09:57 +08:00
Gabriel Horner
b48dfce552 fix: migrated properties not migrating :logseq.property/type or
most of the property-only properties that a user could have set
2025-06-17 06:29:01 +08:00
Tienson Qin
d775a3dba9 fix: test 2025-06-17 06:29:01 +08:00
Tienson Qin
db18543383 Add migration test 2025-06-17 06:29:01 +08:00
Tienson Qin
92ec65d61d Merge branch 'master' into refactor/page-parent 2025-06-15 08:27:33 +08:00
Tienson Qin
88216d2992 fix: able to convert an existing page to a property (#11940)
* enhance: use page as property

* fix: ensures block/uuid doesn't change after converting to property
2025-06-14 13:17:33 +08:00
Gabriel Horner
7cc9ddc26b chore: bump docs graph being tested
Hadn't been updated in over a year
2025-06-13 10:43:42 -04:00
Tienson Qin
00f6662f73 fix: lint 2025-06-12 03:06:17 +08:00
Tienson Qin
4abbdd0fce fix: lint 2025-06-12 02:59:44 +08:00
Tienson Qin
3605a82483 Add repeat task get-next-time tests 2025-06-12 02:50:00 +08:00
Tienson Qin
be66270a49 fix: filters not work for linked references (#11937)
* fix: linked references

* Using datascript query for linked references

* don't render blocks children that have excluded refs

* fix: set persistent width for reference filter

* fix: duplicated refs

* fix: separate queries for children refs and non-children refs

* refactor: move reference fns to logseq.db.common.reference

* fix: set matched children ids even if it's empty

* add tests

* add unlinked reference test

* add transit files to typos ignore

* don't memoize on node

* add comment
2025-06-12 01:56:13 +08:00
Tienson Qin
8eee397b45 fix: rtc creates duplicated first blocks for new journal pages (#11913)
* fix: rtc creates duplicated first blocks for new journal pages

The root cause is that those blocks from different clients have
different ids. Instead of using persistent block id, this fix avoids
generating the first block until users really start editing it.

* fix: add button not displayed when the last block is not empty

* fix: e2e tests

* enhance: remove dummy block

* fix: open-last-block
2025-06-02 14:19:19 +08:00
Gabriel Horner
f846ec9dae fix: repo test
need to stub worker-state config instead of state config. Also removed
unused async code in test fn
2025-05-29 00:39:51 +08:00
Tienson Qin
33b6433dc9 wip: move file parse to worker 2025-05-29 00:39:51 +08:00
Gabriel Horner
b55c55831f chore: add test for migration bug
in f4d3dca19c. Put the fix in feat/db
since it should be deploy asap and test in this branch
since only this branch has the ability to test migrations
2025-05-21 16:11:53 -04:00
Gabriel Horner
a350aa4cc3 fix: remove unused :node-class? option on fn
Only classes will use this fn so it's no longer needed. The option was
also missing on a couple fns which could've lead to buggy behavior
2025-05-21 10:05:20 -04:00
Tienson Qin
42163df4b3 Merge branch 'feat/db' into refactor/page-parent 2025-05-17 05:36:58 +08:00
Gabriel Horner
6c07d8838e fix: invalid keywords can be created by user
In https://github.com/logseq/db-test/issues/278, user has graph that
contains invalid edn keyword caused by name part of keyword starting
with a number e.g. :user.property/2ndsomething. Added thorough tests
based on reference doc for both nbb and cljs versions of buggy fn. For
cljs version, allowed a few more special characters in as they've
all been confirmed to be valid edn
2025-05-16 14:02:17 -04:00
Tienson Qin
337db306c8 fix: tests 2025-05-17 01:07:08 +08:00
Tienson Qin
c0e3a5f81c fix: lint 2025-05-16 23:34:14 +08:00