Tag picker matches nested tags (#449) #555

Closed
kayg wants to merge 0 commits from issue/449-nested-tags into dev
Owner

Typing #fitness now also suggests nested tags such as #area/fitness and #goals/fitness/strength.

Match: the path starts with the query, or any path segment starts with it, or (query holds /) the path holds it starting at a segment.
Order: exact, path prefix, exact last segment, other segment, then note count, then A to Z. Full path shown, matched letters bold, count on the right.

  • One matcher (matchTags in packages/editor/src/transforms/tag-rank.ts) serves the # list and the + picker. The sidebar tag list and note search do not match tags by name, so they have nothing to share.
  • Tags are split and lowercased once per tag list; a keystroke keeps only the best 7 rows. Perf test: 10k tags, about 1 ms per keystroke (limit 2 ms).
  • Parents count as tags, so #fitness also lists goals/fitness when goals/fitness/strength exists.
  • Dropped: the old "letters in order" loose match, which the rule does not include.

Tests: editor vitest 139 passed (incl. ranking + 10k perf); e2e tag-picker + tags on chromium-390 and webkit-1440, 13 passed each; svelte-check 0 errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WCcFhwwgMK66k9LMVqogNJ

Typing `#fitness` now also suggests nested tags such as `#area/fitness` and `#goals/fitness/strength`. **Match:** the path starts with the query, or any path segment starts with it, or (query holds `/`) the path holds it starting at a segment. **Order:** exact, path prefix, exact last segment, other segment, then note count, then A to Z. Full path shown, matched letters bold, count on the right. - One matcher (`matchTags` in `packages/editor/src/transforms/tag-rank.ts`) serves the `#` list and the `+` picker. The sidebar tag list and note search do not match tags by name, so they have nothing to share. - Tags are split and lowercased once per tag list; a keystroke keeps only the best 7 rows. Perf test: 10k tags, about 1 ms per keystroke (limit 2 ms). - Parents count as tags, so `#fitness` also lists `goals/fitness` when `goals/fitness/strength` exists. - Dropped: the old "letters in order" loose match, which the rule does not include. Tests: editor vitest 139 passed (incl. ranking + 10k perf); e2e `tag-picker` + `tags` on chromium-390 and webkit-1440, 13 passed each; svelte-check 0 errors. 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_01WCcFhwwgMK66k9LMVqogNJ
Tag picker matches nested tags (#449)
Some checks failed
CI / server (pull_request) Successful in 32s
CI / rust (pull_request) Successful in 2m33s
CI / web (pull_request) Failing after 29s
3c2eda4556
Typing #fitness now also offers area/fitness and goals/fitness/strength.
A tag matches when its path starts with the query, any path segment
starts with it, or (for a query with a slash) the path holds it starting
at a segment. Order: exact, path prefix, exact last segment, other
segment, then note count, then A to Z. The matched letters are drawn
stronger.

One matcher (matchTags) now serves the # list and the + picker. Tags are
split and lowercased once per tag list; 10k tags take about 1 ms a key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Owner

Landed in train y, #565.

Landed in train y, #565.
kayg closed this pull request 2026-10-17 20:10:22 +00:00
Some checks failed
CI / server (pull_request) Successful in 32s
CI / rust (pull_request) Successful in 2m33s
CI / web (pull_request) Failing after 29s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!555
No description provided.