Skip to content

fix: note indexing, wikilink creation, current-file tracking, ripgrep error handling, inbox review, tree refresh, and colon-title links#5

Merged
jonathanchu merged 4 commits into
jonathanchu:mainfrom
guitmz:misc-fixes
May 9, 2026

Conversation

@guitmz

@guitmz guitmz commented May 6, 2026

Copy link
Copy Markdown
Contributor
  • Read full note contents during cache parsing so tags and wikilinks after 4 KB are indexed correctly (see benchmark notes below).
  • Use a shared unique-path helper when creating a missing note from a wikilink, preventing filename-collision overwrites/corruption.
  • Render the "No backlinks" section in inbox review, matching the documented feature.
  • Rebuild expanded tree branches recursively on refresh so the sidebar stays visually consistent.
  • Treat note titles containing : as valid Grove wikilinks instead of misclassifying them as standard org protocol links.
  • Preserve normal handling for real protocol links such as [[https://...]] and [[file:...]].
  • Add real current-file tracking for the tree sidebar so the highlighted note follows normal Emacs navigation across Grove files.
  • Make backlink lookup fail with a user-facing error when rg is missing or ripgrep execution fails, instead of silently returning an empty result set.
  • Preserve normal ripgrep semantics by treating exit code 1 as "no matches" rather than an execution failure.
  • Added tests

Benchmark note: I measured the new whole-file parser against the previous 4 KB limited behavior on synthetic org files. The current parser took about 0.47 ms for a 64 KiB note, 6.48 ms for a 1 MiB note, and 33.88 ms for a 5 MiB note. An initial cache refresh across 50 x 1 MiB notes took 328 ms total. Since cache refresh only reparses files whose mtime changed, this keeps the new behaviour affordable while avoiding repeated full-vault cost on unchanged notes.

@guitmz guitmz changed the title fix: note indexing, wikilink creation, inbox review, and tree refresh fix: note indexing, wikilink creation, colon-title links, inbox review, and tree refresh May 6, 2026
@guitmz guitmz changed the title fix: note indexing, wikilink creation, colon-title links, inbox review, and tree refresh fix: note indexing, wikilink creation, current-file tracking, ripgrep error handling, inbox review, tree refresh, and colon-title links May 6, 2026
@jonathanchu

Copy link
Copy Markdown
Owner

Great work here @guitmz! I went through the fixes - you fixed a bunch of things I missed! The regression tests are are thorough and so very welcomed, too - this helped me track the fixes here.

Can you rebase this PR before it gets merged? Much appreciated!

@guitmz

guitmz commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

@jonathanchu rebase done :) I was early stages in the process of writing a similar package for myself so I had gone already through some design decisions that made a bit easier to find the things in this PR

@jonathanchu

Copy link
Copy Markdown
Owner

Appreciate this! Thank you @guitmz !

@jonathanchu jonathanchu merged commit 8cb33df into jonathanchu:main May 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants