From 79c9b12702376c40cbbccd987a1b536703682b2e Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Sun, 1 Feb 2026 22:27:02 +0100 Subject: [PATCH] fix: parse hashtags only on blur/submit, add tag delete UI - Parse hashtags when content textarea loses focus (blur) - Parse hashtags when QuickCapture form is submitted - Add tag display with delete buttons in expanded entry view - Remove automatic hashtag parsing during typing Co-Authored-By: Claude Opus 4.5 --- src/lib/components/EntryCard.svelte | 53 +++++++++++++++++++++- src/lib/components/QuickCapture.svelte | 17 ++++++- src/routes/+page.server.ts | 62 +++++++++++++++++++++----- 3 files changed, 118 insertions(+), 14 deletions(-) diff --git a/src/lib/components/EntryCard.svelte b/src/lib/components/EntryCard.svelte index 5b48cdb..6c098b1 100644 --- a/src/lib/components/EntryCard.svelte +++ b/src/lib/components/EntryCard.svelte @@ -206,6 +206,32 @@ await invalidateAll(); input.value = ''; } + + async function handleContentBlur() { + // Parse hashtags from content when focus leaves the textarea + const formData = new FormData(); + formData.append('id', entry.id); + + await fetch('?/parseTags', { + method: 'POST', + body: formData + }); + + await invalidateAll(); + } + + async function handleRemoveTag(tagName: string) { + const formData = new FormData(); + formData.append('id', entry.id); + formData.append('tagName', tagName); + + await fetch('?/removeTag', { + method: 'POST', + body: formData + }); + + await invalidateAll(); + }
@@ -394,12 +420,13 @@
Content (use #hashtags for tags) @@ -491,6 +518,30 @@
+ + {#if entry.tags?.length > 0} +
+ +
+ {#each entry.tags as tag} + + #{tag.name} + + + {/each} +
+
+ {/if} +