From 07a83b2e3db40f4a380092d6566500799b340dcd Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 21 Aug 2026 16:13:12 +0200 Subject: feat: fuzzy autocomplete for add-item input Replace the native with a custom fuzzysort-driven component (FuzzyAutocomplete) with keyboard nav and highlighted matches, preserving exact-match auto-add. Extract a unit-tested fuzzy-search helper, and gitignore .juggler/. Fix the dev DB boot failure caused by a sibling project's ambient DATABASE_URL leaking in by overriding it (file:./data.db) in mise.toml. --- src/lib/components/FuzzyAutocomplete.svelte | 159 ++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 src/lib/components/FuzzyAutocomplete.svelte (limited to 'src/lib/components/FuzzyAutocomplete.svelte') diff --git a/src/lib/components/FuzzyAutocomplete.svelte b/src/lib/components/FuzzyAutocomplete.svelte new file mode 100644 index 0000000..f5bef94 --- /dev/null +++ b/src/lib/components/FuzzyAutocomplete.svelte @@ -0,0 +1,159 @@ + + +
+ { + open = true; + }} + onkeydown={onKeydown} + onfocus={() => { + open = true; + }} + onblur={() => { + // hide after a tick so click on an option still registers + setTimeout(() => { + open = false; + }, 150); + }} + /> + {#if open && results.length > 0} + + {/if} +
+ + -- cgit v1.3