Commit Graph

2038 Commits

Author SHA1 Message Date
Tienson Qin
4fe42af3ed fix: preserve markdown tag link aliases 2026-05-14 14:52:08 +08:00
Tienson Qin
562e56e4c5 fix: delete recycled node cleanup 2026-05-12 18:39:37 +08:00
Tienson Qin
1f9c017998 refactor: graph view V2 (#12604)
* feat(graph): rebuild global graph view with Pixi

Summary:

- Replace /graph route with a new Pixi-based global graph implementation in ClojureScript.

- Build graph data from db-worker only (no UI DB writeback) and default to tags+objects with a toggle for all pages.

- Add fast scene rendering for large graphs with indexed hit-testing, zoom/pan, node dragging, and click/shift+click node actions.

- Introduce dynamic label management (zoom hysteresis, viewport culling, overlap control, hover-emphasis) and fix hook lifecycle cleanup issues.

- Refresh graph UI styling to full-container layout, dot-first settings control, and Logseq button usage.

- Add/expand tests for global graph modes, node actions, and Pixi label/visibility logic.

- Update graph-related dependencies/lockfile as part of the new implementation.

* enhance(graph): improve drag exploration and label visibility

- Dragging a node now pulls connected nodes with depth-based weights for easier structure exploration.

- Labels are rendered only for currently visible node dots; hover no longer reveals hidden-node titles.

- Hovered node title remains promoted in foreground while respecting visibility constraints.

- Add logic/test coverage for connected drag weights and updated label text behavior.

* enhance(graph): use d3 force layout

Summary:
- Move Graph V2 node layout into graph pixi logic.
- Use d3-force link, charge, center, collision, and y forces instead of the hand-written ring/spiral layout.
- Add coverage that linked graph nodes settle closer than an unlinked island.

Dependency:
- Verified d3-force is already latest at 3.0.0.

Tests:
- bb dev:test -v frontend.extensions.graph-pixi-logic-test
- bb dev:test -v frontend.common.graph-view-v2-test
- pnpm install --frozen-lockfile --lockfile-only

* fix: graph view interactions

* enhance: speed up large graph view

* enhance: speed up tags graph

* enhance: speed up tags layout

* enhance: bound tags force layout

* enhance: speed up graph opening

* fix: keep graph objects visible when zoomed out

* fix: resize graph with sidebars

* enhance: select graph nodes

* fix: refine graph selection controls

* support icons

* fix: sharpen graph node icons

* enhance(graph): update graph v2 settings

* fix: re-render graph when theme changes

* enhance(graph): remove legacy graph view

* fix: typo

* fix: improve graph view

* test: cover graph view improvements

* enhance: improve graph view

* test: cover graph time travel behavior

* enhance: refine graph time travel

* test: cover graph layout controls

* enhance: add graph layout controls

* test: cover graph highlight controls

* fix: refine graph highlight controls

* test: cover edge label alignment

* fix: align graph edge labels

* test: keep graph lines visible on highlight

* fix: keep graph lines visible on highlight

* fix: show graph lines by default

* test: filter graph lines on highlight

* fix: filter graph lines on highlight

* test: keep graph depth incremental

* fix: update graph depth incrementally

* test: cover graph label link occlusion

* fix: occlude graph links behind labels

* test: cover graph edge visibility defaults

* fix: smooth graph edges on highlight

* test: cover graph arrow toggle

* fix: toggle graph arrows

* test: cover reciprocal graph edge offsets

* fix: separate reciprocal graph edges

* test: cover duplicate graph edge runs

* fix: dedupe graph edge render runs

* test: cover graph tag clusters

* enhance: cluster graph tags layout

* test: cover graph tag cluster colors

* fix: color graph tag clusters by title

* test: cover subdued graph node colors

* fix: mute graph node colors

* feat: grid layout

* add more options

* enhance(graph): drill into tags on zoom

* map-like navigation

* mod+click to preview node

* edge enhancements

* more tweaks

* fix: block preview

* enhance(graph): speed up large graph layout

* fix: improve graph mode switching ux

* fix: speed up graph view switching

* fix: optimize large all-pages graph render

* fix: speed up graph data build

* fix: collapse graph tag settings on mode switch

* enhance: refine graph panel width

* fix: improve graph zoom performance

* fix: satisfy graph lint

* fix: open graph nodes by uuid

---------

Co-authored-by: rcmerci <rcmerci@gmail.com>
2026-05-10 23:26:32 +08:00
megayu
51f0ce261c Enhance breadcrumb display (#12595)
* feat(breadcrumb): enhance breadcrumb functionality and styling

* feat(breadcrumb): enhance breadcrumb label handling and add tooltips

* feat(breadcrumb): add tooltip for breadcrumb search overflow

* fix lint and test

* feat(search): enhance subtitle handling for native search results

* fix doc

* feat(breadcrumb): add accessibility attributes to tooltip button

* fix: no need to pull refs for block parents

* enhance(breadcrumb): remove ref-resolution layer from parent breadcrumbs

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-05-08 17:14:13 +08:00
VictorVow
1423a38062 fix: restore :ref/default-open-blocks-level 0 behavior in DB graphs
Make `:ref/default-open-blocks-level 0` collapse references by default
in the DB version, matching the previous file-graph behavior. The
section fold is scoped to the page-bottom "Linked References" panel
only — the inline "Open block references" popup rendered next to
blocks always shows its references uncollapsed.

1. Collapse the "Linked References" section when the configured level
   is 0, gated on a new `:linked-refs-section?` config flag set only
   by the page-bottom call site in page.cljs. The inline popup at
   block.cljs:3366 passes `{}` and is unaffected.

2. Propagate `:block.temp/has-children?` on the top-level fetched
   block in `get-block-and-children`. The list-view loads linked-
   reference blocks with `:children? false`, so `(:block/_parent ...)`
   is always nil in the client DB and the collapse check in
   `block-default-collapsed?` could never fire. Use a lightweight
   `d/datoms :avet :block/parent` scan that stops at the first match,
   rather than the reverse-ref `(:block/_parent block)` which
   materializes the full child set. Includes a regression test.

3. Fall back to `:block.temp/has-children?` when computing `has-child?`
   in `block-container-inner-aux`. This renders the collapse arrow for
   blocks whose children exist in the worker DB but haven't been
   lazily loaded into the client DB yet (e.g. linked-reference blocks).
   Clicking the arrow calls `expand-block!` which loads them.

The `:ref/default-open-blocks-level 0 → (int? ...)` state.cljs fix
from PR #12228 is already present on this branch.
2026-05-08 11:18:51 +08:00
Tienson Qin
427dbe3f58 feat: export Logseq markdown syntax
Move the Logseq Markdown Mirror syntax/export work out of the two-way sync branch while leaving file-to-DB sync behavior behind.

Details:\n- add docs/logseq-markdown-syntax.md and update ADR 0016 with the one-way mirror syntax contract\n- export mirror files with page id markers, property list items, nested default property values, node page refs, task status markers, and datetime values with time\n- preserve block refs as uuid links where needed while keeping page/node refs readable\n- update focused export and markdown mirror tests

Validation:\n- bb dev:lint-and-test
2026-05-08 10:58:45 +08:00
rcmerci
a610925bca fix(export): ignore legacy-property 2026-05-06 21:03:23 +08:00
Tienson Qin
13779a4047 fix: don't update local tx to 0 except for two cases
1. creating a remote graph
2. uploading a local graph
2026-05-05 13:35:45 +08:00
Tienson Qin
c556ce27ed bump datascript 2026-05-03 12:52:27 +08:00
Tienson Qin
627cb619e1 fix: sqlite db backup on desktop 2026-05-03 12:04:22 +08:00
Tienson Qin
e470dfd5f0 fix: remove legacy properties 2026-05-03 11:19:05 +08:00
Tienson Qin
c2a1d98aaf Merge branch 'master' into feat/cliable 2026-04-30 12:52:03 +08:00
Gabriel Horner
6945771612 fix(regression): export-edn fails on deprecated property
that wasn't migrated when removed in 333f3e10b1
Fixes https://github.com/logseq/db-test/issues/831
2026-04-28 10:54:35 -04:00
rcmerci
eca0ab1a36 Merge remote-tracking branch 'origin/master' into feat/cliable 2026-04-28 18:17:17 +08:00
megayu
79c25837cb Migrate from yarn to pnpm (#12529)
* migrate yarn to pnpm

* chore: update pnpm version to 10.33.0 across all package.json files

* chore: update .npmrc and package.json for improved dependency management

* chore: unify Clojure, Node, and Java version in workflow files

* fix: enable shamefully-hoist for now and add electron, keytar to onlyBuiltDependencies

* feat: add cider/piggieback dependency and update nREPL middleware configuration to silence warnings

* ensure pnpm setup prior to node setup

* fix: update logseq/bb-tasks git SHA

* feat: add pnpm configuration for onlyBuiltDependencies in package.json

* feat: add onlyBuiltDependencies configuration for better-sqlite3 in pnpm settings

* chore: update pnpm lockfile

* fix: resolve merge conflicts

* fix: remove invisible characters from markdown headers

* fix: update .npmrc comments for clarity on lockfile usage

* Revert "feat: add cider/piggieback dependency and update nREPL middleware configuration to silence warnings"

This reverts commit 70a111936f.

* fix: remove invisible characters from various README files and add .editorconfig

* fix: clarify lockfile resolution process in SKILL.md

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-04-24 23:40:25 +08:00
Tienson Qin
94ea551ec4 perf(db): optimize recursive uuid title replacement (#12536)
* perf(db): optimize recursive uuid title replacement

* fix: lint

* fix: don't lower-case for search indexed blocks

* fix: typo
2026-04-24 21:09:47 +08:00
rcmerci
2e4922b60d Merge remote-tracking branch 'origin/master' into feat/cliable 2026-04-23 21:55:05 +08:00
Tienson Qin
3414177805 fix: validate client tx and ensures monotonically increasing 2026-04-23 15:52:03 +08:00
Mega Yu
b9745dbaec fix test 2026-04-23 15:40:11 +08:00
Tienson Qin
12e8cc3d36 fix(db): clear tx-tail after batch-transact store 2026-04-23 02:28:55 +08:00
Gabriel Horner
96367595aa fix(regression): bidirectional properties setup
cdc1bc1d32 made it such that two classes
had to enable bidirectional properties when only one class should be
needed. Using the example from #12296, the bug was requiring the user
to enable bidirectional on #Person and #Book when #Book is all that
should be needed
2026-04-22 13:24:29 -04:00
Tienson Qin
e048996880 Merge branch 'master' into feat/cliable 2026-04-22 21:07:00 +08:00
Tienson Qin
9bd349dfe9 fix: lint and tests 2026-04-21 21:15:39 +08:00
Tienson Qin
b646db6a68 enhance(backup): share sqlite backup flow and trigger via save shortcut 2026-04-21 18:43:13 +08:00
Tienson Qin
85c5a412a4 revert changes from 1bdba92 related to sync 2026-04-20 15:19:33 +08:00
rcmerci
1bdba923eb fix sync test 2026-04-20 10:56:44 +08:00
rcmerci
4b13d67a88 Merge remote-tracking branch 'origin/master' into feat/cliable 2026-04-18 10:25:32 +08:00
Mega Yu
d6bc0b75ec Merge branch 'master' into enhance/i18n 2026-04-17 20:26:15 +08:00
megayu
76285de44b refactor: toolchain upgrade (#12517)
* chore(deps): upgrade Clojure version to 1.12.4 across multiple dependency files

* chore: bump shadow-cljs to 3.3.6

* chore: bump org.clojure/clojurescript to 1.12.134

* chore(deps): upgrade Clojure version to 1.12.4 in workflow files

* chore(deps): upgrade Java version to 21 in workflow files

* chore(deps): upgrade Node.js version to 24 in workflow files

* chore(deps): upgrade Node.js version to 24 in Dockerfile

* feat(updater): migrate electron-forge to electron-builder

* fix wrong android app version

* fix workflow

* feat(dependency-upgrade): add max-update-interval option for dependency audits

* chore(deps): upgrade electron-builder and electron-updater

* fix: update manual verification instructions for Electron shim cache

* chore: update shadow-cljs version to 3.4.4 across all dependencies

* chore: upgrade electron version to 41.2.1

* chore: update metosin/malli dependency to latest

* chore: upgrade cider-nrepl version to 0.59.0 in dependencies

* chore: upgrade clj-kondo version to 2026.04.15 and fix warning

* chore: move Electron windows build configuration from yml to ci

* chore: update Electron signing configuration to extend from base config

* fix: replace icon file for NSIS compatibility

* chore: resolve metosin/malli version conflicts

* chore: upgrade jdk to 21 in e2e workflow

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-04-17 19:40:01 +08:00
Tienson Qin
f53767dfc6 chore: remove both transit-read and transit-write
use write-transit-str and read-transit-str instead
2026-04-17 16:58:18 +08:00
Tienson Qin
12509f58db fix: plugins e2e tests 2026-04-17 15:57:53 +08:00
Mega Yu
92681111b6 Merge branch 'master' into enhance/i18n 2026-04-17 10:35:36 +08:00
Tienson Qin
8606a8b5f0 fix: it's unsafe to invoke d/store in nested batch tx
Switched to use our own `conn-from-db` that doesn't call `d/store`.
2026-04-17 01:36:30 +08:00
Mega Yu
230a2b8296 Merge master into enhance/i18n 2026-04-15 22:30:34 +08:00
Tienson Qin
8058ece6c4 fix(page): gate deferred root reveal by children completion 2026-04-15 17:49:50 +08:00
Tienson Qin
58fdd8aea1 add doc for batch-transact! and batch-transact-with-temp-conn! 2026-04-15 17:49:50 +08:00
Mega Yu
8347708c69 Merge master into enhance/i18n 2026-04-15 10:23:06 +08:00
Tienson Qin
fc76192631 fix: stabilize uuid-based outliner ops and undo/redo replay 2026-04-14 22:11:51 +08:00
Mega Yu
5eda6a8ab6 Merge master into enhance/i18n 2026-04-14 16:42:19 +08:00
Tienson Qin
ff56c143ab continue to improve view performance 2026-04-14 05:37:45 +08:00
Tienson Qin
995d0bf4a9 enhance(view): speed up large-graph get-view-data 2026-04-14 04:52:10 +08:00
Tienson Qin
e3a974947a perf: views 2026-04-14 04:33:46 +08:00
Gabriel Horner
4ab1216303 fix(cli): logseq upsert block --id modifies built-in nodes
it shouldn't be able to. Somes of these bugs are caused by same incorrect
definition of built-in? as found in
22c7736751. --content and --pos could modify all
built-in nodes. *properties and *tags options could modify private
built-in nodes which the app is not able to do and the CLI should be
disallowed from doing as well
2026-04-13 15:15:42 -04:00
Tienson Qin
73bc59857e fix(perf): don't call d/datoms to get all eavt
It's too slow (+8s) for a 500m sqlite file to just insert a new block
2026-04-14 00:27:36 +08:00
Tienson Qin
6e737b78ac fix: db unlisten 2026-04-13 18:25:03 +08:00
Tienson Qin
174fd15c8e fix(sync): stabilize incremental checksum updates 2026-04-12 19:27:05 +08:00
Tienson Qin
30bb4acc27 fix: stabilize undo/redo raw tx replay order 2026-04-12 15:55:52 +08:00
Tienson Qin
9baeee6e49 simplify transact ops 2026-04-12 15:41:22 +08:00
Mega Yu
5a752ef99d fix multiple logic errors caused by date format switching 2026-04-10 22:58:48 +08:00
Mega Yu
1cff73eddd remove deprecated code 2026-04-10 18:17:00 +08:00