From b27e1bf3eceebf5b30ab50d72e9d613550d48948 Mon Sep 17 00:00:00 2001 From: dtoro Date: Mon, 3 Aug 2026 16:00:01 +0200 Subject: [PATCH] fix(web): coerce chat composer draft to string (input.trim crash) The Send button's disabled={!input.trim()} threw "trim is not a function" when input was initialized from a non-string initialDraft (a Svelte 5 prop-init edge where a null/undefined draft reached $state). Coerce at init so the composer state is always a string. VERSION: 0.15.0 -> 0.15.1 --- VERSION | 2 +- web/src/lib/components/ChatThread.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index a551051..e815b86 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.15.0 +0.15.1 diff --git a/web/src/lib/components/ChatThread.svelte b/web/src/lib/components/ChatThread.svelte index 2f8e15d..5fdf343 100644 --- a/web/src/lib/components/ChatThread.svelte +++ b/web/src/lib/components/ChatThread.svelte @@ -58,7 +58,7 @@ initialDraft?: string } = $props() - let input = $state(initialDraft) + let input = $state(typeof initialDraft === 'string' ? initialDraft : '') let messagesEnd = $state(null) let scrolledUp = $state(false) let container = $state(null)