Commit Graph

17115 Commits

Author SHA1 Message Date
rcmerci
ca4cb121e3 fix test 2026-03-20 16:54:19 +08:00
rcmerci
2cc0735e3a enhance(cli): migrate non-sync integration coverage to cli-e2e shell suite 2026-03-20 16:34:54 +08:00
Gabriel Horner
721225ba00 fix: upsert --update-tags|remove-tags NON-TAG silently passes
even though no tag is added. Should error instead. Also improve
nonexistent tag error to include name and improve wording
on two upsert options
2026-03-19 19:24:57 -04:00
Gabriel Horner
029194e6f6 fix: undo + redo and possibly more in desktop
Electron app wasn't setting up transact fn like browser does
2026-03-19 15:39:25 -04:00
Gabriel Horner
a7469bcd36 fix: search not starting or working
Per Claude this may have been triggered by adbaf10abc
2026-03-19 14:08:48 -04:00
Gabriel Horner
bb7f3b9dde enhance: sort cli options alphabetically 2026-03-19 13:38:14 -04:00
Gabriel Horner
317d3b583c fix: invalid target-uuid option gives wrong error
about unknown command. Source of bug was that uuid options
are being validated downstream and can throw codes that aren't
recognized later. This is needless complexity so fix by validating
the option at cmdline parse time. Also change this for all
other uuid options to simplify them. Also tweaked cli.main which
swallowed daemon error codes instead of reporting them
2026-03-19 12:17:32 -04:00
rcmerci
23e42c77f6 063-logseq-cli-upsert-block-custom-many-property.md 2026-03-19 16:36:11 +08:00
Gabriel Horner
6490c9d853 fix: cli completion of graphs, pages and queries
Wasn't reading json output correctly, didn't have a correct
_logseq_current_graph and caching was causing verification issues
2026-03-18 23:11:12 -04:00
Gabriel Horner
6d2b75d8f0 enhance: all cli options with allowed values validate
those values. We didn't validate some of them as we were relying on
home-rolled validations when we could be using babashka.cli's built-in
validation. Switch to using :validate SET by default and allow for
optional :values
2026-03-18 14:19:15 -04:00
Gabriel Horner
fec5b82b42 fix: existing mcp updates intermittently failing
The new cli uses :db/id as its primary id while the existing mcp uses
:block/uuid. These changes on list tools cause slow and sometimes breaking interactions
for updates. It also causes buggy/inconsistent mcp behavior b/n mcp cli and server as there
are different implentations being called. The new cli should use its own
thread-api/* fns and replace MCP when it can meet existing functionality - working
updates and provide a CLI interface.
Also fix mcp.tools dissoc bug which had been fixed in the newer list fns
2026-03-18 13:51:17 -04:00
Gabriel Horner
e2ec7660f4 enhance: allow all list fields to be sorted
Removes needing to maintain a separate config
just for sorting and allows for more sorting.
Also remove needless home-rolled validation
when babashka.cli already provides it
2026-03-17 15:08:55 -04:00
Gabriel Horner
e6e8a945e8 fix: cli completion of aliases
babashka.cli doesn't support -o=val completion for alias options e.g.
'-f=created-at'. Instead they now correctly complete '-f created-at'
2026-03-17 13:40:16 -04:00
Gabriel Horner
d7d0e939a5 enhance: add cli completion for comma separated options like --fields
Simply add a :multiple-values key to an option spec
2026-03-17 13:34:13 -04:00
Gabriel Horner
02fbd94d1d fix: overlapping cli option user-only
I introduced this not realizing --include-built-in is the opposite.
Now that --no-include-built-in autocompletion is available, there's
no reason to have confusing, opposite options of each other
2026-03-17 12:27:00 -04:00
Gabriel Horner
9a9504b9b5 enhance: cli completion for negating command boolean options
with '--no-'. Don't do global options as most global options don't
apply to all commands and are already turned off by default
2026-03-17 11:56:03 -04:00
rcmerci
209b499494 062-cli-list-default-sort-updated-at.md 2026-03-17 17:30:17 +08:00
rcmerci
5db3a3086c 061-graph-dir-space-preserve-canonical.md 2026-03-17 16:45:36 +08:00
Gabriel Horner
43a6e9f853 fix: multiple fields not visible for list commands
* uuid, classes, properties, extends and description fields not visible
  for human output even though data is available and users are asking
  to display it with --with-* or --fields
* Also fix recent regression for property types no longer displaying by
  default
* Also fix --with-extends, --with-properties and --with-classes
  depending on undocumented --extra option. Options should be declarative and
  not have hidden dependencies
2026-03-17 00:14:08 -04:00
rcmerci
7575c6b533 enhance(cli): sync subcommand checks corresponding config vars 2026-03-16 20:43:30 +08:00
rcmerci
f7d624c256 fix: sync download 2026-03-15 21:52:22 +08:00
rcmerci
e6d5228923 fix test 2026-03-15 16:57:24 +08:00
rcmerci
b87aac8a22 Merge remote-tracking branch 'origin/master' into feat/cliable 2026-03-15 16:42:36 +08:00
rcmerci
ae93a633ad 060-cli-graph-list-legacy-graph-dir-rename-command.md 2026-03-14 23:15:32 +08:00
rcmerci
097ddd42f3 enhance(cli): add examples in --help 2026-03-14 17:58:16 +08:00
rcmerci
3a547c6169 fix(cli): subcmd --help 2026-03-14 16:44:30 +08:00
charlie
f023071ac3 fix(ui): improve dropdown menu for the choices values 2026-03-14 15:44:46 +08:00
Gabriel Horner
e901c2323f fix: --expand option drops fields for list commands 2026-03-13 18:21:52 -04:00
Gabriel Horner
fbfb589c52 enhance: list commands can sort by all visibile fields
Remove outdated name field which had no effect. Also remove duplication
of these values in option declaration, completion declaration and
completion tests
2026-03-13 17:45:22 -04:00
Gabriel Horner
0a32fc18fe enhance: add user-only option to list commands 2026-03-13 17:14:13 -04:00
Gabriel Horner
eec5b4a060 fix: multiple issues with --fields option for list* commands
- 4 visible fields couldn't be used with --fields
- Only print selected fields/columns. Previous behavior didn't make
  sense as unspecified fields were still listed and took up horizontal space
- Allow --fields to work when --expand isn't used. Previous behavior
  wasn't explained to user and needlessly limiting
2026-03-13 16:17:27 -04:00
Gabriel Horner
bad750c173 fix: integration test leaves hanging processes
Hanging db-worker-node.js processes left after running
tests because servers weren't shut down
2026-03-13 13:41:46 -04:00
rcmerci
cde0571e65 fix(cli): treat id-only show targets as missing entities
Make `show` treat id-only pull results as non-existent entities so deleted ids no longer render as empty blocks, and add regressions for deleted block/page lookups.

🤖 Generated with [eca](https://eca.dev)

Co-Authored-By: eca <noreply@eca.dev>
2026-03-13 23:27:21 +08:00
rcmerci
78de33bf68 enhance: 'upsert block' support update --content and --status 2026-03-13 22:30:06 +08:00
scheinriese
e8bddda236 fix(shortcut): limit prefix-conflict detection to same-handler only
Cross-handler prefix overlaps don't cause chord dormancy because each
Closure KeyboardShortcutHandler instance has its own independent key
tree and state machine. Only same-handler prefix conflicts (where
Closure's tree can't have a node be both leaf and branch) cause
actual chord dormancy.

- Change binding-match? to use same-handler? instead of handler-match?
  for prefix overlaps (exact matches still use handler-match?)
- Update test to verify cross-handler prefixes are NOT detected

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:10:35 +08:00
Tienson Qin
32d5aaf29d fix: don't show upload-temp graph 2026-03-13 21:00:57 +08:00
Tienson Qin
33b2bc0c14 chore: remove unused dict 2026-03-13 20:59:00 +08:00
Tienson Qin
3f6788410a fix: lint 2026-03-13 20:58:36 +08:00
Tienson Qin
088b7be0b0 adjust keymap space 2026-03-13 20:45:58 +08:00
scheinriese
a3471e0406 refactor(shortcut): defer prefix-conflict banner to post-reassign state
Show the amber "Deactivates" banner only after the user confirms
Reassign, not alongside the red "Used by" prompt. Reduces visual
noise during the decision step and shows consequences after the action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
22a165472a feat(shortcut): inline compact keycaps in prefix-conflict banners
Show chord keycaps alongside action names in the amber "Deactivates"
banner so users can see both the chord pattern and what it does.

- n=1: inline keycap + quoted name
- n=2-3: vertical list with keycap + name per row
- n≥4: count-only fallback
- Proportional auto-fade: 6s/8s/10s based on item count
- Chord strokes visually grouped with 6px gap between strokes
- Compact keycaps tinted amber-12 inside warning banners

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
1cd7cad8ae feat(shortcut): tiered prefix-conflict banners and cross-handler detection
Prefix conflicts (chord shortcuts that go dormant when a simple key
shadows their leading stroke) are now shown as amber warnings instead
of red blocking errors.  Exact-match conflicts remain red with
Reassign.

Key changes:
- Extend binding-match? from same-handler? to handler-match? so
  cross-handler prefix overlaps between co-active handlers are detected
- Add partition-conflicts-by-type and conflict-has-exact? helpers in
  data_helper to split conflicts into exact vs prefix sub-maps
- Three-way debounce in shortcut dialog: exact → red blocking,
  prefix-only → amber auto-save with undo, mixed → stacked banners
- Widen Closure error catch to handle both chord-prefix conflict
  directions ("shortcut: null" and "shortcut: <id>")
- Add CSS color override for undo link inside amber warning banner
- Add i18n keys: deactivates-chord, deactivates-chords
- Add tests for partition-conflicts-by-type and cross-handler detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
Tienson Qin
b3c9f75eec fix(shortcut): handle prefix conflicts and disabled edits
Cover the three regression cases from review.

- block same-handler leader/chord prefix collisions in keymap conflict detection so bindings like mod+c cannot silently leave mod+c mod+s or mod+c mod+c dormant at runtime
- collapse canonical-equivalent bindings back to default when saving so recorded meta/cmd variants do not linger as redundant custom overrides
- allow disabled shortcut rows to reopen the customize dialog and normalize false defaults into editable empty bindings
- add focused regression tests for conflict detection and shortcut persistence/editability
2026-03-13 20:45:58 +08:00
Tienson Qin
4956f6aef6 wrong comments
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-13 20:45:58 +08:00
scheinriese
57adfb144a Assorted code quality cleanups
- Remove unused clojure.string require in core_test.cljs
- Replace promesa.core p/delay with js/setTimeout, remove import
- Remove redundant final-result binding in print-shortcut-key
- Flatten nested if chain to cond for raw-binding
- Fix nested button inside button (keystroke-active → div)
- Remove dead .cp__shortcut-table-wrap CSS
- Align global-handlers set in get-cross-context-conflicts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
6502bb53f6 Suppress shortcut-row-sweep animation for prefers-reduced-motion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
e7eb6f3241 Add role and aria-expanded to category header toggles in keymap list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
01f9904062 Fix conflict detection between block-editing and editor-global handlers
block-editing-only was missing from the global-handlers set in
get-conflicts-by-keys, so conflicts between block-editing-only and
editor-global shortcuts (e.g. assigning ⌘X to Create new block vs Cut)
showed as amber warnings instead of red blocking conflicts. Also remove
dead chord-prefix code from same-leading-key? and add a comment about
the brittle Closure error string match for chord-prefix detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
aaa7b566ad Remove console debug block in favor of existing log/error call
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
4fa8b43c84 Extract max-key-sequence-length constant for magic number 5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00