Commit Graph

1926 Commits

Author SHA1 Message Date
Tienson Qin
dbd15f7ed4 enhance: pre-validate when setting block property values 2025-10-10 16:20:53 +08:00
Tienson Qin
6e5399bf47 fix: lint and append_block_in_page 2025-10-10 14:08:03 +08:00
Tienson Qin
d4f7bf22d9 Merge branch 'master' into refactor/plugin-api-properties 2025-10-09 12:28:54 +08:00
Tienson Qin
4800ed2ec6 Add more apis for db graphs
1. get_all_tags
2. get_all_properties
3. get_tag_objects
2025-10-07 22:16:57 +08:00
rcmerci
1292ab4ce8 fix lint 2025-10-07 02:43:57 -07:00
rcmerci
1747e3f1d0 fix: properties stable sort, normalize :block/order of properties
1. When sorting properties, consider cases where values are nil or blocks/orders are identical.
2. If block/order are nil or duplicated in sorted-properties, recalculate and transact them
2025-10-07 02:43:57 -07:00
Tienson Qin
b4c83a7f6a fix(plugin): get_page_linked_references
fixes https://github.com/logseq/db-test/issues/498
2025-10-07 17:30:39 +08:00
Tienson Qin
77baacd24e enhance(plugin): throw more errors
1. expose :json, :page, :string to plugins
2. api supports `schema` to allow authors configure property type and
cardinality
3. support multiple values
2025-09-26 03:17:41 +08:00
Tienson Qin
cfe0b22997 refactor: [WiP] property-related api 2025-09-26 00:09:59 +08:00
rcmerci
c642dabd33 enhance(rtc): err handling improvements
convert several exception types into ex-info, ensuring them transit-writable/readable
2025-09-23 13:58:10 +08:00
Tienson Qin
05272304b4 fix: remove ui-position from :url properties 2025-09-22 16:00:25 +08:00
rcmerci
5ac2f6de10 enhance: read/write-transit-str handle ex-info 2025-09-16 21:06:27 +08:00
Tienson Qin
dd9a32d4de refactor: RTC reuse :db/id for deleted blocks when undo/redo (#12101)
1. reuse old eids for block/uuid when apply-remote-ops

2. enhance: clear undo history when failed to validate db

Also, throw transact error from db worker
3. test(rtc): add timeout for wait-for cloud-idle
4. fix: rtc extra tests
5.  enhance(test): retry new-block once when assert timeout
---------

Co-authored-by: rcmerci <rcmerci@gmail.com>
2025-09-15 22:29:45 +08:00
rcmerci
e27d104e20 fix lint 2025-09-10 17:01:25 +08:00
rcmerci
b12b3f7220 enhance: validate renamed db-idents not random and class entities when migrating 2025-09-10 16:45:27 +08:00
Tienson Qin
b2405291cc Merge branch 'master' into enhance/rtc-migrate 2025-09-09 17:48:52 +08:00
rcmerci
78660f9374 enhance: import-debug-transit support db type 2025-09-09 17:14:28 +08:00
Tienson Qin
1849d7a96a fix: show tag's extends when auto-complete or setting extends
fixes https://github.com/logseq/db-test/issues/466
2025-09-09 16:29:19 +08:00
Gabriel Horner
4075c0d509 enhance: allow users to store any metadata on nodes via :map
property and EDN or API property creation
2025-09-08 13:02:43 -04: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
Gabriel Horner
f93f889f8a chore: bump to latest nbb w/ datascript update 2025-09-03 10:00:45 -04:00
Tienson Qin
6c3e3c344d fix: don't show matched children blocks in view results 2025-09-03 21:22:59 +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
2aee658547 perf: add weak references to reduce memory usage (#12082)
* chore: bump datascript
2025-09-02 19:25:52 +08:00
rcmerci
ceb1603a11 update logseq/datascript 2025-08-28 22:46:26 +08:00
Gabriel Horner
6a84e56984 enhance: working spike for export md command
export namespaces aren't reused yet. Fixed bug w/ get-block-and-children
not invoking correctly in nbb. Bumped all deps to use latest nbb-logseq
2025-08-26 11:27:34 -04:00
Gabriel Horner
a81ca147f6 fix: db lint 2025-08-26 10:57:27 -04:00
rcmerci
92ed692151 enhance: remove usages of macro get-all-defined-kw->config 2025-08-26 21:15:23 +08:00
rcmerci
c385f361af Revert "fix: fix property definitions"
This reverts commit 28b958ff7c.
2025-08-26 21:15:23 +08:00
Tienson Qin
bb1a502806 fix: click on indentation line to unfold nodes not working
related to https://github.com/logseq/db-test/issues/423
2025-08-26 21:04:09 +08:00
Tienson Qin
be2977dd40 fix: t o to toggle open all blocks
related to https://github.com/logseq/db-test/issues/423
2025-08-26 20:31:08 +08:00
rcmerci
28b958ff7c fix: fix property definitions
defkeywords is macro, property-ignore-rtc won't be evaled when compiling
2025-08-26 16:32:52 +08:00
Tienson Qin
6107d75222 fix: ensure page/create returns existing page uuid 2025-08-26 10:55:46 +08:00
Tienson Qin
4b680bb737 fix: datetime values not shown if their journal pages not exist 2025-08-25 21:40:50 +08:00
Tienson Qin
063aec02a7 fix: can't create page with the same name if namespace page exists
fixes https://github.com/logseq/db-test/issues/429
2025-08-25 14:56:05 +08:00
Tienson Qin
77c7412271 fix: references not calculated right
related to https://github.com/logseq/db-test/issues/436#issuecomment-3217902953
2025-08-25 12:49:56 +08:00
Tienson Qin
b2034753aa fix: sort pages by backlinks count
fixed https://github.com/logseq/db-test/issues/441
2025-08-24 13:36:49 +08:00
Tienson Qin
cd13713513 feat: sort groups for views (#12046)
* Add two properties for groups sorting

1. :logseq.property.table/sort-groups-by
2. :logseq.property.table/sort-groups-desc?

* Add ui for groups sort by and order

* enhance: sort by journal day desc by default

* rename to :*.view/sort-groups-by-property to make it clear that

property type is :property.

* suggested by copilot

* fix: name

* Group by Page instead of "Block Page"
2025-08-14 13:14:34 +08:00
Tienson Qin
38e049e1c5 fix: stale embedding check (#12049)
* fix: slow stale embedding check

* fix: mark all blocks for embedding when full embedding

Also, store hnsw index for each batch so that embedding can continue
when aborted by switching graph or closing the app.

* remove embedding/re-embedding-graph-data!

* enhance: mod+c mod+s to rebuild both keyword and semantic search
2025-08-13 13:47:52 +08:00
Gabriel Horner
241c1c104e refactor: have one fn to fetch ~/logseq/graphs dir
Also add deps.edn to cli dep which is needed for reuse with frontend
2025-08-11 17:05:39 -04:00
Gabriel Horner
887d91d2ac enhance: start CLI dep and implement list command
Also move common db graph list to shared ns and move common prefix
constants to common-config
2025-08-11 17:05:39 -04:00
Tienson Qin
12e1f35cc4 enhance(ux): filter by empty and not empty value 2025-08-10 22:53:05 +08:00
Tienson Qin
921d815491 fix: filter datetime rows filter out rows with empty value
fixed https://github.com/logseq/db-test/issues/386
2025-08-10 21:14:53 +08:00
rcmerci
ca4b5c5266 fix(export): ignore :logseq.property/created-by-ref when export-edn 2025-08-08 14:10:05 +08:00
Gabriel Horner
707f49bc4f fix: nbb-logseq bundling and quirky datascript requires (#12032)
* fix: nbb-logseq bundling and quirky datascript requires

* fix: bump nbb-logseq for node version incompatibility
2025-08-06 13:16:50 -04: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
Tienson Qin
1fe46682e4 Merge branch 'master' into feat/hnswlib+transformer-js 2025-08-01 00:14:28 +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
67a0f7cd8c Merge branch 'master' into feat/hnswlib+transformer-js 2025-07-31 20:08:29 +08:00
Tienson Qin
4455dfca8d fix: backlinks context doesn't work for file graphs 2025-07-30 17:31:28 +08:00