Commit Graph

442 Commits

Author SHA1 Message Date
scheinriese
ac96e59db6 fix(asset-picker): translate Avatar/Image segmented-control aria-label
The asset-picker's segmented control toggling between Avatar and Image
modes carried a hardcoded English `:aria-label "Icon rendering mode"`.
Every other aria-label in this file goes through `(t :icon.*)`; this
one was missed. The two option labels were already translated
(`:icon.asset-mode/avatar` / `:icon.asset-mode/image`) — only the
group label was bare.

Add `:icon.asset-mode/picker-aria-label "Asset type"` (en) / "资产类型"
(zh-cn), mirroring the existing `:icon.color/picker-aria-label`
convention.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:02:45 +02:00
scheinriese
4bf2430b02 Merge origin/master into feat/unified-icon-picker
Three manual conflict resolutions, applied via Python to bypass the
auto-formatter (which corrupts cond-> map literals when invoked on
files containing conflict markers):
- block.cljs: take master's nil-safe `(when ext ...)` guard on the
  electron asset-ref path and master's `:class "ls-block-content-indent"`
  in place of the inline `:style {:padding-left ...}`. Our prior
  20-default icon-size fix is preserved (auto-merged cleanly).
- cmdk/core.cljs: take master's `:block.temp/unique-title` worker-
  precomputed field for `page-item` and `block-item`; drop our dead
  `:ignore-current-icon?` opt.
- content.cljs: take master's new "Copy block URL" + "Show asset in
  folder" dropdown items (the `(when (util/electron?))` block was
  refactored to use `get-logseq-web-block-url` + `current-graph-id`).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 13:39:50 +02:00
megayu
b3c200206d Enforce strict page alias ownership and improve alias search (#12662)
* feat(search): add support for page aliases in search results

* enhance(alias): enforce strict alias ownership invariants

* fix(exporter): streamline page extraction and alias sanitization

* fix(search): add alias support to search result mapping

* fix(exporter): handle self-alias in page alias sanitization

* feat(outliner): enhance alias handling in set-block-db-attribute!

* fix(outliner): remove redundant db reference in set-block-property

* fix(search): keep canonical page title for alias-indexed results

* feat(property): enhance alias handling for source page identification

* feat(search): improve alias handling for snippet display in search results

* fix: correct alias assignment in block processing

* feat: add validation for batch alias assignment to prevent multiple owners

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-05-21 21:04:48 +08:00
Tienson Qin
4ae733b65d fix: mobile toolbar action width 2026-05-21 16:23:46 +08:00
Tienson Qin
ec0c01fd97 enhance: use graph identity in URLs (#12693)
* enhance: use graph identity in URLs

* fix: resolve graph identity URLs

* fix: satisfy graph url lint

* fix: resolve graph id from hash urls

* fix: preserve tab graph on reload

* fix: initialize tab graph before render

* enhance: open graph in another tab

* fix: open graph tabs by graph id

* fix: open local graph tabs by registry id

* fix: avoid duplicate rtc graph id

* fix: open electron graph window on shift click

* fix: address graph identity review
2026-05-21 14:52:28 +08:00
Tienson Qin
469bb1825c fix: improve mobile flashcards layout 2026-05-20 16:36:43 +08:00
scheinriese
e3d9c54651 Merge remote-tracking branch 'origin/master' into feat/unified-icon-picker
# Conflicts:
#	deps/db/src/logseq/db/frontend/schema.cljs
#	src/main/frontend/components/block.cljs
#	src/main/frontend/components/content.cljs
#	src/main/frontend/components/selection.cljs
#	src/main/frontend/worker/db/migrate.cljs
2026-05-20 02:17:43 +02:00
Tienson Qin
8e48079bfb fix: comment issues 2026-05-20 02:33:06 +08:00
scheinriese
041b63675b feat(icon): :suppress mode for single-click hide of inherited icon
When an entity inherits a class default-icon but has no own override,
the trash button now writes `{:type :none}` directly with one click,
labelled "Hide inherited icon". Recovery is via the page-title Restore
affordance. Previously the trash button disappeared in this state,
leaving no way to opt out of inheritance.

Also fixes the icon-picker on-chosen wrapper to be variadic and forward
the action keyword — without this, asset-picker / text-picker delete
clicks silently dropped `:remove-entirely` and the entity wrote `nil`
instead of `:none`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 17:57:52 +02:00
scheinriese
575fd5e916 i18n(icon): add keys for delete dropdown + restore affordance
5 new keys for the two-option delete UX:
- :icon/remove-icon          "Remove icon"           ; immediate-delete tooltip
- :icon/remove-icon-options  "Remove icon…"          ; dropdown trigger tooltip
- :icon/revert-to-default    "Revert to default"     ; dropdown item #1
- :icon/remove-entirely      "Remove entirely"       ; dropdown item #2
- :icon/restore-icon         "Restore icon"          ; page-title affordance when :type :none

Both en.edn and zh-cn.edn updated per logseq-i18n skill Rule 3.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 16:11:27 +02:00
Tienson Qin
0e87a830a4 feat: comments (#12672)
* feat: comments

* comments ux enhancements

* fix: skip comments during cursor navigation

* enhance: support comments on selected blocks

* fix: store comment range targets by uuid

* fix: delete orphaned range comments

* fix: navigate across comments blocks

* refactor: move comments to its own namespaces

* fix lint and tests

* fix: polish block comments

* enhance: add related property to #Comments

* fix: align comments migration test

* fix: non logged in user can't edit or delete comment

* fix: keep comments in place on outdent

* enhance: put comments at top of page

* fix: remove empty comments area

* refactor: split move blocks transaction
2026-05-19 20:04:30 +08:00
scheinriese
b1685ea6bc i18n: drop 89 orphan en.edn keys with no callers
Cleanup pass following the icon-picker i18n migration. Removes 84 keys
in :settings-page/*, :content/*, :linked-references/*, :text/* that
were imported from a sibling branch but have no (t ...) call sites in
the current codebase, plus 5 stale bare-form shortcut keys
(:editor/copy, :dev/show-{block-data,block-ast,page-data},
:asset/confirm-delete) whose dynamic shortcut-desc lookup goes through
the decorated form :command.<ns>/<leaf> instead.

Verified via:
- ripgrep across src/ and deps/ for each key (no static call sites)
- inspection of shortcut-desc-by-id + decorate-namespace path
- bb lang:validate-translations: down from 94 unused → 5 unused
- 5 remaining unused are master-owned :icon/icons-count,
  :icon/matched-count, :icon/search-{all,emojis,icons}; left in place
- bb lang:lint-hardcoded -w: still 0 hardcoded strings
- shadow/compile :app: 0 warnings

Keys existed only in en.edn — no other locale files affected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 13:17:20 +02:00
scheinriese
0274af211d i18n(icon-picker): replace 129 hardcoded UI strings with translation keys
Move icon picker + property default-icon-row + selection action-bar text
through frontend.context.i18n/t per .agents/skills/logseq-i18n. Adds
~93 new keys across :icon/*, :icon.{asset,asset-mode,asset-search,
avatar-band,avatar-fallback,avatar-scope,avatar-tab,clipboard,color,
fallback,mode,section-header,shape,text-picker,text-tab,upload,
web-images}/*, :class.default-icon/* namespaces. Each new key is
defined in both en.edn (source) and zh-cn.edn (required second locale
per skill Rule 3).

Compound sentences kept whole via interpolate-rich-text-node (Rule 4);
dynamic-count messages use Tongue function values (Rule 6); existing
generic keys reused where semantics matched (:ui/cancel, :ui/reset,
:ui/empty, :ui/untitled, :property.status/done, :context-menu/set-icon).

Verified:
- bb lang:lint-hardcoded -w → 0 hardcoded strings
- bb lang:validate-translations → all referenced keys defined
- shadow/compile :app → 0 warnings

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 13:12:05 +02:00
scheinriese
5329e52402 Merge origin/master into feat/unified-icon-picker
Brings 99 new master commits forward. 5 file-level conflicts resolved:

- deps/db/src/logseq/db/frontend/schema.cljs — bumped version to "65.32"
  to accommodate both sides' migration chains
- src/main/frontend/worker/db/migrate.cljs — both branches defined a
  65.26 migration; renumbered master's :logseq.property.repeat/repeat-type
  to 65.32 after my 65.26..65.31 chain
- src/main/frontend/components/content.cljs — dropped master's debug
  prn (commit "remove debug print"); kept HEAD's indentation
- src/main/frontend/components/icon.cljs — kept HEAD's refactor of
  emoji-cp into type-dispatched emoji/icon/text/avatar components
  + render-item dispatcher; master's simpler emoji-cp would break
  the item-render call site
- .agents/skills/logseq-task-on-lambda/SKILL.md — took master's
  updated skill doc verbatim (not my work area)

Re-added /.claude/plans/ to .gitignore after auto-merge picked
master's rewrite of /.claude → /.claude/settings.local.json and
dropped my prior ignore rule.

Compile verified clean against shadow-cljs :app and :test builds
(0 new warnings). App loads in browser without runtime errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 12:28:05 +02:00
Tienson Qin
7efb9aa0a7 enhance(mobile): improve flashcards tab 2026-05-19 08:42:43 +08:00
Tienson Qin
466647ef3d [codex] improve sync onboarding (#12676)
* enhance: improve sync onboarding

* chore: update sync onboarding local changes

* fix: show sync upload in native header

* fix: route native local sync taps

* fix: use upload icon for native local sync

* chore: remove debug log

* fix: compile cljs tests

* test: remove header compile dependency

* test: remove mobile header compile dependency
2026-05-18 23:27:44 +08:00
Tienson Qin
e9d66de128 fix(electron): install CLI launcher in local bin (#12664)
* fix(electron): install CLI launcher in local bin

* Potential fix for pull request finding

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-18 10:28:29 +08:00
Tienson Qin
18c69fe1a8 fix: handle desktop sqlite binary export
Fixes logseq/db-test#873
2026-05-15 16:11:38 +08:00
A. S.
ce61af1483 feat: add :asset property type with thumbnail picker (#12506)
* feat(property): add :asset property type with thumbnail grid picker

Introduces a new user-facing "Asset" property type, modeled on :node but
restricted to blocks tagged with :logseq.class/Asset. Unlike :node's text
search dropdown, the :asset picker opens a 4-column thumbnail grid popup
populated from db-async/<get-tag-objects, filtered to image assets via
common-config/img-formats.

Once a value is set, the property cell renders an inline asset-cp preview
alongside "View" and "Swap" action buttons. View dispatches a new
:asset/show-preview event that opens the image lightbox for images, the
PDF viewer for PDFs (same path as the inline open-pdf-file handler), and
falls back to redirect-to-page! for other asset types. Swap reopens the
grid popup so the user can pick a different asset.

- Register :asset in user-built-in-property-types, user-ref-property-types,
  and property-types-with-db; add asset-entity? validator that requires
  :block/title and :logseq.class/Asset in :block/tags.
- Label the type as "Asset" in property-type-label so it appears in the
  property type sub-pane.
- Add asset-grid-popup-content and asset-value-picker components in
  property/value.cljs, dispatch :asset ahead of the generic select branch
  in property-scalar-value-aux, and include :asset in the reference
  display set used by select-item.
- Wire :asset/show-preview in handler/events/ui.cljs using the existing
  lightbox, pdf-assets, and assets-handler plumbing.

* fix(property): refresh asset thumbnail after Swap

asset-cp captures the asset block in :will-mount, so React reconciling
the same component in place across re-renders left the old thumbnail
rendered even though the underlying property value had been updated
(visible because the View button opened the newly chosen asset).

Keying asset-cp on (:block/uuid value) forces React to remount it on
swap so :will-mount re-runs with the new block.

* fix(property): let image clicks select the asset in picker grid

asset-cp renders an <img> with its own click handler that opens the
image preview lightbox, which swallowed clicks before they could reach
the grid cell's select-this-asset handler. Users had to click the
padding around an image to pick it. Disabling pointer events on the
thumbnail wrapper lets the click bubble straight to the parent button.

* fix(property): fit asset thumbnails without cropping any aspect ratio

asset-cp emits the <img> with explicit width/height attributes (default
250px) wrapped in a div.asset-container that has no size constraint of
its own, so neither square nor tall images respected the thumbnail
bounding box: max-h-full on the img resolved against an auto-sized
parent and tall images overflowed the property row.

Constrain every descendant with !important max-w-full / max-h-full and
force the img to w-auto h-auto object-contain, and give the block
property thumbnail a fixed 80x80 bounding box instead of the previous
120x80 max that let the asset-container stretch. Same override is
applied to grid picker cells so they stay uniform regardless of source
aspect ratio.

* fix(property): stop tall images cropping in asset picker grid

The previous fix applied max-w/max-h-full to all descendants, but
div.asset-container's own height stayed auto, so max-height: 100% on
the img resolved against an auto-sized parent and tall images still
overflowed their grid cell.

Force div.asset-container itself to w-full h-full (and flex-center) so
the img's max-h-full resolves against a real bounded height. Same fix
is applied to the block property thumbnail for consistency.

* feat(property): show all asset types in picker grid with title bar

Drop the image-only filter so the asset picker grid lists every block
tagged :logseq.class/Asset, not just images. Non-image assets render as
a centered tabler icon + uppercase extension label chosen by a new
asset-icon-for-type helper (photo / music / movie / file-type-pdf /
file fallback); image assets keep the existing asset-cp thumbnail.

Each grid cell is now a vertical flex with a small title strip at the
top showing :block/title (truncated) and the thumbnail body filling
the rest of the square. min-height: 0 on the body lets the flex child
shrink inside the aspect-ratio box so square images still fit without
pushing the title off screen.

* feat(property): skip image sizing constraints for non-image asset values

The filled asset-value-picker used to force every asset-cp render into
a fixed 80x80 box with img overrides meant for bitmap thumbnails. That
mangled PDF link icons, audio <audio> controls and video <video>
players because those elements have their own intrinsic layout.

Branch on (:logseq.property.asset/type value): image assets keep the
80x80 constrained box so square/tall/wide bitmaps still fit without
cropping, while every other asset type renders asset-cp in a plain
flex-shrink-0 wrapper at its natural size.

* feat(property): preview video assets in a modal instead of inline

Inline asset-cp for videos rendered a full <video> player in the
property row, which was oversized and awkward next to the View/Swap
buttons. Replace it with a compact shui button showing a movie icon
plus the truncated asset title; clicking the button dispatches the
existing :asset/show-preview event.

The :asset/show-preview handler grows a video branch that resolves the
asset URL via <make-asset-url and opens a centered shui dialog with an
autoplaying <video controls>, capped at 80vh so it never exceeds the
viewport. Image lightbox and PDF viewer paths are untouched.

* refactor(property): drop redundant View button on asset property values

Every asset type already has a native click-to-preview path: image
thumbnails open the lightbox via resizable-image's handler, PDF links
open the PDF viewer via asset-link, audio/video players are clickable
in place, and the video-asset fallback button itself dispatches
:asset/show-preview. The separate View button just duplicated those
actions, so remove it and leave only Swap next to the thumbnail.

* fix(property): let video asset button grow to fit title

The video preview button capped itself at max-w-[240px] with a
truncated title span, cropping any video whose name was longer than
the cap. Drop the cap and truncation so the button sizes to its
content, and add h-auto whitespace-normal text-left so titles that
wrap onto multiple lines stay visible instead of being clipped by
shui's fixed button height.

* refactor(property): review cleanups for :asset property type

Addresses review feedback from the branch self-review:

- Extract the asset-cp-fit CSS escape hatch into an asset-thumb-fit-class
  def with a docstring explaining why .asset-container needs forced
  sizing, and reuse it in both the grid cell and the filled-state
  thumbnail instead of duplicating the 60-char tailwind arbitrary
  variant soup in two places.
- Simplify the two-clause cond in asset-value-picker's filled branch
  to an if now that the :else is the only fallthrough.
- Wrap set-block-property! in the grid picker on-click with p/catch so
  transact failures log and surface a notification toast instead of
  being silently swallowed after the popup hides.
- Replace the bespoke :content-props {:class "max-w-[min(90vw,1200px)]"}
  on the video preview dialog with shui's supported :auto-width? true
  option, which applies max-w-[90vw] w-max sm:max-w-[960px] via the
  data-auto-width CSS hook.
- Add a new logseq.db.frontend.property.type-test ns covering both the
  :asset property type registration (present in user-built-in /
  user-ref / all-ref / property-types-with-db, absent from
  cardinality / closed-value) and the asset-entity? validator against
  a real datascript db built via db-test/create-conn-with-blocks.
- Add a comment above asset-entity? documenting that :logseq.class/Asset
  lives in ldb/private-tags, so the class is used programmatically for
  scoping rather than via #Asset inline tagging.

* fix(property): satisfy CI lint checks for :asset property type

Address two lint failures on PR #12506:

- Drop the unused datascript.core require in property/type_test.cljs
  (clj-kondo unused-namespace warning failed the deps/db lint job).
- Replace four hardcoded user-facing strings in the asset grid picker
  with i18n keys, adding :asset/picker-empty, :asset/picker-fallback-type,
  and :asset/picker-set-failed to the English dictionary; reuse
  :ui/loading for the loading state.

* fix(property): address upstream review on :asset property type

Two follow-ups from the copilot-pull-request-reviewer review on PR #12506:

- Guard :asset picker against edits in publishing mode. show-grid!
  short-circuits when config/publishing? is true so the empty-state click
  and the Swap button can no longer open the picker, and the
  Backspace/Delete branch of the keydown handler no longer fires
  delete-block-property! Mirrors how single-value-select gates its
  popup. Read-only paths (image lightbox, video preview dialog) are
  left intact so published readers can still view embedded assets.

- Localize the Swap button label. Adds :asset/swap "Swap" to en.edn
  and replaces the hard-coded literal with (t :asset/swap), matching
  the other strings in asset-value-picker (picker-empty,
  picker-set-failed, picker-fallback-type).

* fix(property): use letter-a icon for :asset property type

Without an entry in property-icon's case form, :asset properties fell
through to the default "letter-t" glyph, which collides visually with
the Text type. Map :asset to "letter-a" so the column header reads as
"A".

* fix: improve asset property picker

---------

Co-authored-by: Victor239 <12621257+Victor239@users.noreply.github.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-05-14 22:00:00 +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
scheinriese
c438798984 Merge origin/master into feat/unified-icon-picker
Brings 1,081 master commits forward. 19 file-level conflicts resolved.
Major master-side changes integrated:

* Migrate yarn → pnpm (package.json + pnpm-lock.yaml)
* Closure compiler upgrade → requires Java 21 runtime
* Recycle-bin properties + delete embedding properties (migrations 65.24/65.25)
* block-renderer plugin replacement infrastructure (block.cljs ~3600-4150)
* Enhanced breadcrumb display (commit 51f0ce261c)
* Heading icon alignment + menu active state (755840c474)
* Scoped choice + sanitize-property-values-for-display in property/config
* Sub-menu Set-icon context menu items
* TooltipArrow / electron handler refactor

Migration renumber: our 65.24-29 → 65.26-31 (after master's 65.24-25).
Schema version bumped to 65.31.

Post-merge fixes (build cleanliness):
- hsl2hex: re-add to util.cljc (master removed; colors.cljs still uses it)
- <unlink-asset: re-add to handler/assets.cljs (master removed; outliner
  pipeline's asset-file unlink still uses it)
- en.edn: dedupe 25 identical keys that survived the conflict resolution
- icon.cljs: drop the duplicate get-used-items / add-used-item! that
  master added (HEAD has v2-storage versions further down with type-aware
  dedup + renderable filtering — preferred)
- block.cljs: restore the inline page-ref avatar size default for
  non-heading contexts (master commit 755840c474 forced 14px via
  ; revert so photo-icons keep their 20px default
  while headings still get heading-aware sizing)
- left_sidebar.cljs: keep master's left-sidebar-resized-at as a real
  binding (not _-prefixed) since the page-title-content fn uses it

Smoke-tested: theme toggle, icon picker, asset delete, page-title
icons, sidebar refs. Outstanding visual issues from master's CSS
changes (icon alignment drift in inline refs, breadcrumb [[]] raw
brackets) tracked as separate follow-up commits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 17:54:31 +02:00
Tienson Qin
9318205c32 fix: improve graph view interactions 2026-05-13 21:38:19 +08:00
megayu
7cb9144422 enhance(editor): support dollar autopair for markdown math (#12618)
* feat(editor): add support for dollar sign in autopair feature

* fix(editor): handle dollar autopair for markdown math

* feat(help): add inline math example

* fix(editor): double dollar autopair behavior
2026-05-12 16:09:06 +08:00
Tienson Qin
e03e019a19 fix: export sqlite db as binary 2026-05-11 18:18:33 +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
Charlie
4970a83a1e enhance(plugins): uninstall unused plugins (#12603)
* feat(plugin): add bulk removal of disabled plugins and related UI components

* enhance(plugin): add bulk removal feature for disabled plugins and themes

* Potential fix for pull request finding

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

* enhance(plugin): update bulk remove disabled plugins and themes messages

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-09 15:22:37 +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
charlie
7306cc8916 feat(ui): add open folder action for repository context menu 2026-05-07 20:14:07 +08:00
Tienson Qin
8bc8c435ba Merge branch 'master' into feat/markdown-mirror 2026-05-06 20:47:32 +08:00
Tienson Qin
0980e63711 fix: improve rtc asset sync status
Normalize browser asset paths through the same memory URL flow used by renderer asset IO so graph names with spaces resolve correctly during RTC upload.

Handle async asset read failures in upload as read-asset failures, and surface queued asset uploads plus active asset upload/download counts in the RTC indicator.

Tests cover browser asset path normalization and RTC asset transfer summaries.
2026-05-06 17:40:49 +08:00
Tienson Qin
9189755b3a fix: update markdown mirror 2026-05-06 16:06:37 +08:00
Tienson Qin
06dbef8715 feat: add markdown mirror
Add markdown mirror generation for DB graphs, including page and journal paths, regeneration, debounced write handling, and settings UI.

Serialize page and block property values into mirrored Markdown by resolving property-value entities to their display content.

Persist mirror files through the node worker platform and make browser worker mirror storage fail fast as unsupported.

Fix Electron userAppCfgs writes to avoid returning unserializable Electron state over IPC.

Add ADR and targeted tests for mirror generation, worker wiring, platform storage, and graph path handling.
2026-05-06 16:06:37 +08:00
rcmerci
7488b92407 fix: switch graph if db-worker-node server unreachable 2026-05-04 14:07:03 +08:00
Tienson Qin
d1ac0836be enhance(ux): add block content conflicts notice 2026-05-01 12:12:55 +08:00
Tienson Qin
46ab697178 fix(property): refine scoped choice actions for tag configs
fixes https://github.com/logseq/db-test/issues/812
2026-05-01 03:16:08 +08:00
Gabriel Horner
cecabbf157 fix: capitalize paid feature consistently like we do with Sync 2026-04-28 09:03:30 -04:00
TechnoHouse
80344840c4 feat: configurable publish server URL (#12520)
* feat: configurable publish server URL

Mirror the Custom Sync Server URL pattern (#12459) for the single-page
publish service. Settings -> Advanced -> Publish server URL opens a
dialog that writes the URL to localStorage; frontend.config/publish-api-base
reads it on each call so URL changes take effect without a restart.

Unlike sync, publish does not need a push-config-to-worker step because
the handler is purely HTTP request-response with no long-lived connection.

* fix(i18n): resolve en.edn merge after master sync

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-04-28 15:44:55 +08:00
Charlie
cfa90139b4 enhance(plugins): custom block renderer (#12533)
* enhance(plugins): add block properties and block renderers with conditional rendering

* chore(libs): bump version

* enhance(docs): update Experiments API guide with detailed usage examples and best practices

* enhance(ui): implement plugin renderer effects and enhance action bar visibility

* enhance(plugin): improve router refresh mechanism for dynamic plugin routes

* chore(libs): rename development notes and add SKILL.md for plugin SDK

* enhance(plugin): enhance PluginLogger with structured log entries and UI for viewing logs

* fix: lint

* Update src/main/frontend/components/block.cljs

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

* Update src/main/frontend/handler/plugin.cljs

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

* Update src/main/frontend/handler/plugin.cljs

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

* Update libs/src/modules/LSPlugin.Experiments.ts

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

* Update src/main/frontend/handler/plugin.cljs

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

* enhance(plugin): add rich text interpolation to i18n translation

* fix: lint

* fix: lint

* fix: remove unnecessary newlines and clean up code formatting

* fix: lint

* fix(libs): incorrect entry path for js mode

* enhance(docs): add custom theme plugin guide and update SKILL.md

* enhance(plugin): add 'open logs' option in multiple languages

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-28 15:17:55 +08:00
Mega Yu
7c7f523cdb update i18n 2026-04-23 18:03:11 +08:00
Tienson Qin
da78094cb8 fix(electron): warn on x64 release on Apple Silicon 2026-04-22 18:41:49 +08:00
eliovir
1da2104f1e Update fr.edn (#11077)
Typography
2026-04-21 17:26:30 +08:00
Mega Yu
59e599ec9f refactor(i18n): refine naming standard and skill, sync review/dev workflow, and align related keys 2026-04-18 16:55:00 +08:00
Mega Yu
1f29696e7c feat(i18n): update translation strings 2026-04-17 22:34:59 +08:00
Mega Yu
92681111b6 Merge branch 'master' into enhance/i18n 2026-04-17 10:35:36 +08:00
Gabriel Horner
eb1d921d5d enhance: add block context menu option to open an asset file
Addresses 2nd issue in https://github.com/logseq/db-test/issues/792
of not being able to download an asset that doesn't have a special
block view
2026-04-16 15:57:39 -04:00
Mega Yu
950b4d36ae Merge 'master' into enhance/i18n 2026-04-16 15:30:25 +08:00
Mega Yu
df2890396f fix(i18n): replace pseudo-translations copied from English across locales 2026-04-16 12:18:19 +08:00
Mega Yu
620fbadca2 chore(i18n): remove common ui label from dicts 2026-04-16 11:37:06 +08:00
Mega Yu
0c6d08acd9 fix(i18n): replace copied English locale entries with real translations 2026-04-16 11:25:34 +08:00