fix(frontend): disable 'Altro' Send until non-whitespace text (no empty freetext)

Backlog T2 from the reviewer-gate-ux review: the Send button on the reserved
"Other — specify" textarea emitted control:freetext with an empty payload when
clicked on an empty/whitespace field. Guard with disabled={!text.trim()}.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 18:52:12 +02:00
co-authored by Claude Opus 4.8
parent 78518210a0
commit 25ab37d0fe
2 changed files with 19 additions and 1 deletions
+5 -1
View File
@@ -32,7 +32,11 @@ export function ReservedControls({
value={text}
onChange={(e) => setText(e.target.value)}
/>
<button className="text-sm border rounded px-2 py-1 self-start" onClick={() => onControl("freetext", text)}>
<button
className="text-sm border rounded px-2 py-1 self-start disabled:opacity-50 disabled:cursor-not-allowed"
disabled={!text.trim()}
onClick={() => onControl("freetext", text)}
>
Send
</button>
</div>