Commit Graph

1008 Commits

Author SHA1 Message Date
Mega Yu
1ce19817d5 add markdown table test 2026-05-14 21:26:41 +08:00
Mega Yu
f134dea06a fix: update table column group logic to use header column count 2026-05-14 21:26:13 +08:00
Mega Yu
cbbe6830e9 fix: improve markdown table row parsing by refining line trimming logic 2026-05-14 21:23:18 +08:00
Mega Yu
a4497a39c7 fix: handle end-idx check in inline macro parsing 2026-05-14 21:22:26 +08:00
Mega Yu
4807578d35 fix: return empty vector for blank input in inline JSON parser 2026-05-14 21:22:08 +08:00
Mega Yu
c09944870e refactor(mldoc): enhance inline parsing to preserve cell content on failure 2026-05-14 21:02:39 +08:00
Mega Yu
ebb003e51c fix(graph-parser): normalize markdown table cells with escaped/code-span pipes 2026-05-14 18:22:16 +08:00
Cory Donnelly
2169a86f03 fix: honor documented repeater cookie semantics (#12523)
* fix: honor the three documented repeater cookie semantics

Logseq's documented repeater semantics (per docs.logseq.com and
`logseq/docs` `Tasks.md`) define three org-mode-style cookies for
recurring tasks:

  `.+`: repeats from the last completion date
  `++`: advances from scheduled, skipping in whole intervals to future
  `+`:  advances from scheduled by the declared interval (can stack)

The scheduler in `worker/commands.cljs` has been ignoring the cookie
entirely and applying a single, `++`-like semantic for every
recurring task. A user who wrote `.+1w` in markdown — expecting "a
week from when I actually finished" — silently got `++1w` behavior
("a week from the original scheduled date, skipped to future"),
which for a weekly task scheduled 2026-04-01 and completed on
2026-04-05 returns the next occurrence on 2026-04-08 rather than
the documented 2026-04-12.

This change:

  * Adds a closed-values `:logseq.property.repeat/repeat-type` property
    with values `:dotted-plus` / `:plus` / `:double-plus`. Default is
    `:double-plus` so existing recurring tasks see no behavior change
    on upgrade.
  * Rewrites the scheduler to branch on repeat-type and implement each
    semantic: `.+` anchors on now; `+` advances from original once (can
    stack overdue, per org-mode); `++` iterates in whole intervals
    until strictly after now. The `++` path is mathematically
    equivalent to the previous scheduler, so default-path behavior is
    preserved.
  * Guards against frequency <= 0 — the old code would silently produce
    nonsense and, under the new `++` loop, would spin forever. The
    guard short-circuits to `nil`.
  * Extracts `resolve-recur-frequency` and fixes the previous
    `(or [A B] [C D])` pattern in `compute-reschedule-property-tx` —
    any 2-vector is truthy in Clojure, so the default-value branch
    was unreachable and entities without an explicit
    `:recur-frequency` silently fell through to `frequency = nil`.
    `if-let` makes both branches reachable so default-to-1 actually
    works at migration time.
  * Restores the cookie-type selector that was removed from the
    date-time popover in `0a5b88467` (Nov 2020) — in-code support for
    all three cookies has been present but not user-pickable for the
    last ~5.5 years.
  * Adds `docs/recurring-tasks.md` — a technical spec for contributors
    and users that restates and augments the upstream `Tasks.md` text,
    adds decision guidance, and documents the implementation surface.
  * Extends the file-graph → DB-graph migration (built on top of
    `44d6bd49c4` "fix: preserve repeated schedule import") to also
    carry the cookie kind via a new `repeat-types` map in
    `graph-parser/exporter.cljs`, so an imported `.+1w` task lands in
    the DB-graph with `:repeat-type.dotted-plus` rather than picking
    up the `:double-plus` default. Test updated to assert this.
  * Adds deftests covering each cookie's distinctive behavior plus
    boundary cases (non-positive frequency, unknown unit, frequency > 1
    variants, `++` at month/year units, and both branches of
    `resolve-recur-frequency`).

The preexisting `get-next-time-test` passes unchanged under the
`:double-plus` default, preserving the existing regression contract.
Tests pin `t/now` via `with-redefs` for determinism.

Refs #7731, #11260, #6715, #8531. Folds in the small remaining delta
from #12532 (now closed as superseded by `44d6bd49c4`).

* fix: harden recurring task repeat type

* fix: contain repeat type selector

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: handle clamped monthly repeats

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-14 17:53:11 +08:00
megayu
200a6da0d5 deprecated block-ref (#12627)
* feat(graph-parser): convert block-ref syntax to page-ref in titles

* feat(block): deprecate block-ref syntax

* feat(graph-parser): replace block-ref with page-ref in title processing

* fix lint

* chore(i18n): remove deprecated i18n key
2026-05-14 13:21:22 +08:00
megayu
e097ec8cd8 fix(fsrs): cloze macro with superscript/subscript markup and render improvements 2026-05-13 12:00:24 +08:00
Tienson Qin
9c77efda04 [codex] fix import of auto heading pre-blocks (#12612)
* fix(import): handle auto heading pre-blocks (db-test#863, db-test#864)

* fix(import): clean missing OG block refs (db-test#863, db-test#864)

* Revert "fix(import): handle auto heading pre-blocks (db-test#863, db-test#864)"

This reverts commit 08d586a2d8.

* fix(import): propagate missing block ref cleanup

---------

Co-authored-by: Mega Yu <yuhg2310@gmail.com>
2026-05-12 18:07:07 +08:00
ivan-danilov
7c4111b248 Added prettify-url? option to QuickCapture (#12409)
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-05-12 00:16:03 +08:00
Tienson Qin
f42da95204 fix: preserve imported task statuses 2026-05-11 20:42:53 +08:00
Tienson Qin
ee6b38b9d6 fix: import namespaced inline tags 2026-05-11 20:35:29 +08:00
Tienson Qin
44d6bd49c4 fix: preserve repeated schedule import 2026-05-11 20:16:19 +08:00
megayu
1884911cc8 fix(exporter): preserve mixed quote blocks during DB export (#12610) 2026-05-11 18:08:14 +08:00
rcmerci
8a7ba2f665 fix(import): preserve emails in quote blocks 2026-05-05 21:13:39 +08:00
rcmerci
47407a3d8d fix(import): property value has custom format journal page ref 2026-05-05 12:46:41 +08:00
Tienson Qin
c2a1d98aaf Merge branch 'master' into feat/cliable 2026-04-30 12:52:03 +08:00
Tienson Qin
69c4d36a61 fix: :block/name shouldn't be updated for custom date formatter
fixes https://github.com/logseq/db-test/issues/830
2026-04-29 16:44:22 +08: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
e048996880 Merge branch 'master' into feat/cliable 2026-04-22 21:07:00 +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
Mega Yu
69ee9e2f83 chore: change Github to GitHub 2026-04-15 15:43:52 +08:00
rcmerci
40d546a5f7 Merge remote-tracking branch 'origin/master' into feat/cliable 2026-04-04 21:33:53 +08:00
Gabriel Horner
a1b171a20e chore: bump nbb-logseq to feat-db-v34
This bumps to recent version of sci which should allow for upgrading
to malli 0.20+
2026-04-02 13:14:25 -04:00
Tienson Qin
2f3b53a28a Merge branch 'master' into feat/cliable 2026-03-31 23:36:48 +08:00
Gabriel Horner
b513b94026 fix: new property and class idents don't have suffix
when created from app or cli. Moving db-worker to node changed the
js/process exist check in db-ident ns. Brought back env var for
straightforward fix. I checked other process checks and this was the
only one affected this way. Also remove double testing for graph-parser as
it hasn't provided any benefit and yet another place where we kept
juggling this env var
2026-03-25 13:54:14 -04:00
Tienson Qin
e4460bbb56 fix: graph parser tests 2026-03-24 20:41:15 +08:00
Tienson Qin
26fa937b30 Merge branch 'master' into refactor/sync-undo-semantic-ops 2026-03-24 19:14:37 +08:00
megayu
d6403b7746 dependencies upgrade (#12460) 2026-03-23 21:32:28 +08:00
Tienson Qin
2b707c1199 refactor: sync based on semantic ops 2026-03-20 20:40:38 +08:00
megayu
adbaf10abc chore: tech stack upgrade (#12448)
* fix(lint): make worker/frontend separation lint work on Windows

* chore: update cljs:electron-watch script to include test flag

* chore: remove dead root dependencies

* chore(deps): converge better-sqlite3 to 12.6.2 across deps packages

* chore(deps): converge fs-extra to ^11.3.0 across package roots

* fix(test): correct parameters for create-if-not-exists function

* chore(deps): converge cljs-bean to 1.9.0 across deps roots

* fix(tests): escape regex in cljs:run-test script

* chore: pin root packageManager to yarn 1.22.22

* chore(build): replace del with fs.rmSync in gulp clean

* chore(build): replace npm-run-all with npm-run-all2

* chore(security): upgrade dompurify and unify sanitizer path

* chore(observability): upgrade web sentry to 8.x

* chore: remove unused react-draggable dependencies

* chore(ci): fix windows release artifact collection

* fix(build): create static dir before gulp clean scans it

* fix: update nbb-logseq dependency to version feat-db-v33

* fix(test): move start-time initialization after clone repo

* fix(deps): update nbb dependencies and adjust test script paths to compatible with windows path delimiter

* chore(deps): remove dead meander dependency

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-03-13 13:20:49 +08:00
Gabriel Horner
2e8d7c6303 fix: bump nbb-logseq to include datascript fix 2026-03-12 10:21:54 -04:00
Gabriel Horner
ae003f1469 fix: clean up template property handling
When new built-in properties are supported in exporter, all-built-in-names
and file-built-in-property-names should be updated. No need
to handle block/properties-order and block/properties-text-values
as those are ignored
2026-03-11 15:44:12 -04:00
Gabriel Horner
fdf1a8f8cc fix: imported Template blocks
Template blocks were being copied instead of updated in place. Would
feel buggy to user as Template blocks would show up twice in search and
would not be where they had defined them
2026-03-11 15:44:12 -04:00
Mega Yu
df5fb72ed9 fix lint Shadowed var 2026-03-11 15:44:12 -04:00
Mega Yu
371b1d5301 feat(exporter): support template import 2026-03-11 15:44:12 -04:00
Mega Yu
935673a860 update path handling in exporter tests to make it compatible with Windows path 2026-03-11 15:44:12 -04:00
Gabriel Horner
5f7885dff5 fix: outdated docs and misc cleanup
Also added the new option to the import CLI,
improved tests that only test one file to only import 1 file
and cleaned up some hard to read code
2026-03-11 15:44:12 -04:00
Mega Yu
7522a87939 skip heavier parsing if code fences in the title
add split-title-by-code-fences test
2026-03-11 15:44:12 -04:00
Mega Yu
304bc7c9af add trim to the lang in the code snippet 2026-03-11 15:44:12 -04:00
megayu
d8b85171e9 add guard against missing/blank args of cards macro
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-11 15:44:12 -04:00
Mega Yu
ecad45531d feat: add support for Template, Math blocks and Cards in exporter 2026-03-11 15:44:12 -04:00
Mega Yu
309070fda0 fix typo 2026-03-11 15:44:12 -04:00
Mega Yu
e2f98a1507 standalone code blocks and tag them in-place during exporting 2026-03-11 15:44:12 -04:00
Mega Yu
1c351aebff feat: add code snippet extraction functionality in exporter and UI options 2026-03-11 15:44:12 -04:00