Commit Graph

282 Commits

Author SHA1 Message Date
Tienson Qin
1d98f1d214 ensure :block/uuid immutability 2026-04-07 04:17:09 +08:00
Tienson Qin
e85addc933 refactor: rename batch-transact! 2026-03-27 16:15:42 +08:00
Tienson Qin
65a0a7dafd code cleanup 2026-03-26 15:30:01 +08:00
Tienson Qin
2b707c1199 refactor: sync based on semantic ops 2026-03-20 20:40:38 +08:00
Tienson Qin
e3e54eba3f tag/property/closed value should be hard retracted 2026-03-18 06:11:04 +08:00
Tienson Qin
1f30693851 fix: tests 2026-03-18 06:11:04 +08:00
Gabriel Horner
8216e1a177 enhance: export-edn exports nested children of text-property values
Should address https://github.com/logseq/db-test/issues/756
2026-02-26 19:28:15 -05:00
Gabriel Horner
5b1bfeed2b fix: db lint
Also silence noisy successful db test which distracts from actual
failing tests
2026-02-26 12:21:56 -05:00
Tienson Qin
cdc1bc1d32 fix: get-bidirectional-properties perf
Root cause:
get-bidirectional-properties was recomputing
bidirectional-property-attr? for every [e a] match, repeatedly calling
d/entity for the same property attr keyword. That made cost scale with
datom count, not unique properties.

Fix:
Added per-call memoization for property-attr bidirectional checks
using a local volatile! cache, so each attr is resolved once per
invocation.
2026-02-26 14:13:31 +08:00
Gabriel Horner
b18056c910 enhance: export-edn exports property history
also ensure that it is idempotent
2026-02-25 14:52:16 -05:00
Gabriel Horner
8b5407a91d fix: db and frontend lint 2026-02-24 15:05:18 -05:00
Gabriel Horner
f0f5911ca7 enhance: export-edn is idempotent for 3 more keys
For keys with non-ordered collections, use sets to consistently produce
idempotent values. Users can still author with vectors for these keys.
This affects :build/tags, :build/property-classes and
:build/class-extends.  Also remove any hacks around making their values
consistent across import->export cycles
2026-02-24 14:26:02 -05:00
Tienson Qin
e6e61e235a fix: cleanup to process all retracted entities (including pages)
related to https://github.com/logseq/db-test/issues/726
related to https://github.com/logseq/db-test/issues/752
2026-02-24 23:00:35 +08:00
Tienson Qin
3c9dee98da fix: invalid data when deleting closed value
fixes https://github.com/logseq/db-test/issues/729
2026-02-24 22:39:15 +08:00
Gabriel Horner
97835eeeb7 enhance: export-edn :build/class-properties sorts properties
both when building and exporting
2026-02-23 17:04:29 -05:00
Gabriel Horner
5e43f89af2 enhance: export-edn supports :build/properties in property values
no matter how many levels deep a property value has properties
2026-02-20 13:49:10 -05:00
Gabriel Horner
991e38419a enhance: export edn handles assets
Addresses https://github.com/logseq/db-test/issues/656.
Should also address most :entity built in properties
2026-02-19 20:24:23 -05:00
Gabriel Horner
3e1745dca7 chore: DRY up export tests with new test fn 2026-02-18 15:23:41 -05:00
Gabriel Horner
16beb18c92 fix: export tests with large graph have duplicate built-in pages
Fixed the setup of these tests and then was able to confirm that
built-in pages are idempotent with import-export process. Also fixed
related docstrings
2026-02-18 15:23:41 -05:00
Gabriel Horner
f28e001b5a enhance: ensure export EDN is idempotent across import and export
An EDN export should consistently produce the same EDN when imported
into a new graph and re-exported. This adds initial fn, cli option and
test to ensure this. There are some known TODOs. diff-graphs script was
removed as it was being used as a subset of the workflow provided by the
--roundtrip option
2026-02-18 15:23:41 -05:00
Gabriel Horner
1ff8a12d35 fix: export-edn shouldn't add empty :build/properties
This results in exports that aren't repeatable across exports a.k.a. roundtripable
2026-02-17 16:27:24 -05:00
Gabriel Horner
3d88cd1fd6 fix: import of multi word tags
Also fixes quirky editor bug for inline multi word tags. Both bugs
reported in https://github.com/logseq/db-test/issues/724
2026-02-16 14:35:53 -05:00
Gabriel Horner
0d1b997fa9 fix: reaction schema results in invalid nodes 2026-02-11 15:07:00 -05:00
Gabriel Horner
1a1896ba5b fix: internal-ident?
Also fix db test
2026-02-05 09:01:04 -05:00
Tienson Qin
05be455371 feat: reactions 2026-02-01 21:45:31 +08:00
Tienson Qin
729ca7fcbf Merge branch 'master' into feat/worker-sync 2026-01-26 18:52:12 +08:00
Gabriel Horner
173898240e fix: remove most file graph uses in deps
except for graph-parser and publish deps

- Removed most mentions of 'repo' in deps, which cleaned up a lot related
  to export cli and worker
- Removed db-based-graph? checks in deps except for unknown use
  in entity-plus?
- Removing db-based-graph? checks resulted in deleting unused file graph
  code paths e.g. get-pid
- Removed file graph handling in cli list command
- Remove file-based-graph? checks from deps
2026-01-22 13:19:58 -05:00
Tienson Qin
cbece9e29f fix: lint 2026-01-22 00:52:47 +08:00
Tienson Qin
bcb9f84469 add tests 2026-01-22 00:52:47 +08:00
Tienson Qin
c03a5183df refactor: fix data in server instead of client 2026-01-12 23:56:50 +08:00
Gabriel Horner
5748905057 fix ref-property tests pointing to property rule
Also add back property tests as it is still a useful rule
2026-01-05 14:44:49 -05:00
Tienson Qin
0f949b739c fix: tests 2026-01-01 14:20:33 +08:00
Tienson Qin
c21f2c7f4f Ensure local graphs have uuid 2025-12-30 14:48:51 +08:00
Tienson Qin
74d136e49c fix: export tests 2025-12-30 00:34:02 +08:00
Tienson Qin
1ae9e2c496 fix: extends tags query and support eid|title|db-ident
Previously `tags` doesn't return blocks that have children tag(s).

Also, `tags` support both db/ident and block/title to make it easy
to use:
(tags ?b #{144})
(tags ?b #{"Task"})
(tags ?b #{:logseq.class/Task})
2025-12-24 14:37:57 +08:00
Tienson Qin
aea9f09fd1 Simple query performance enhancements (#12262)
* perf: separate scalar from ref property query

* fix: query bindings

* perf: separate default value query from others

* fix: import properties first and then other datoms
2025-12-19 19:37:51 +08:00
Gabriel Horner
529be0496c fix: build and export of property values
for a :many property that has additional attributes
e.g. :build/tags
Another possible fix for https://github.com/logseq/db-test/issues/636
2025-12-11 14:46:21 -05:00
Gabriel Horner
b696a84cac fix: export of property value blocks doesn't
keep its uuid when it's referenced as a property value.
Noticed this with a graph from Tienson where a property value had a
view
2025-12-10 15:46:34 -05:00
Gabriel Horner
1effbdfad7 fix: referenced property value blocks not exported
with their uuid. Possibly affecting
https://github.com/logseq/db-test/issues/636
2025-12-10 15:46:34 -05:00
Gabriel Horner
73f8dfc421 chore: mv db tests to correct project
Also tweak test so that errors aren't printed confusingly when tests
pass
2025-12-09 11:16:39 -05:00
Gabriel Horner
a5875420d1 fix: property value blocks with uuid
don't generate their uuids or their tags correctly.
This should've been handled in ad64632c1b.
Related to https://github.com/logseq/db-test/issues/636
2025-12-08 17:41:25 -05:00
Gabriel Horner
c8f99d1ff3 refactor: make CLI and testing validation consistent
Both have needs that are more for local graphs
2025-12-04 10:30:56 -05:00
Gabriel Horner
3219b827e6 fix: import of existing pages preserves properties and tags
with :build-existing-tx? option. Makes behavior consistent with blocks.
This also fixes built-in pages that weren't re-importing correctly
w/ modified properties
2025-12-03 15:30:54 -05:00
Gabriel Horner
22dbcfb2d6 fix: EDN export of class page
Should fix case described in
https://github.com/logseq/db-test/issues/549.
Still need to QA property page export
2025-11-26 12:24:03 -05:00
Gabriel Horner
487cbb2bc9 enhance: finish making import data form undo/redoable
Add current block support and error handling.
Also update most uses of build-import to call d/transact!  once
afterwards. Previously I think we needed separate transacts because of
new properties but that is no longer the case
2025-10-16 09:43:32 -04: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
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
2d50ca5ce2 Merge branch 'master' into feat/hnswlib+transformer-js 2025-07-11 18:15:33 +08:00
Tienson Qin
e259be0c51 feat: quick add (#11986)
* feat: quick add

* enhance(ux): auto open block for editing for quick add

* enhance(ux): show notification after quick add

* add migration for quick add page
2025-07-07 16:18:53 +08:00