From e904fcbaf16b12eb822e95a7a2efec59af3acd08 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 22 Dec 2025 17:00:24 +0000 Subject: [PATCH] fix: prevent command text overflow in spell dialogs Replace `break-all` with `break-words overflow-x-auto` to improve text wrapping behavior in command preview areas. This prevents words from breaking awkwardly in the middle while still allowing long commands to be displayed properly. Changes: - CreateSpellDialog.tsx: Fixed command preview overflow - SpellDialog.tsx: Fixed command display overflow - SpellRenderer.tsx: Fixed detail view command overflow The new approach breaks at word boundaries when possible and provides horizontal scrolling for exceptionally long commands. --- src/components/CreateSpellDialog.tsx | 2 +- src/components/nostr/SpellDialog.tsx | 2 +- src/components/nostr/kinds/SpellRenderer.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/CreateSpellDialog.tsx b/src/components/CreateSpellDialog.tsx index 918d40b..b0aa215 100644 --- a/src/components/CreateSpellDialog.tsx +++ b/src/components/CreateSpellDialog.tsx @@ -601,7 +601,7 @@ export function CreateSpellDialog({ -
+
{generatedCommand}
diff --git a/src/components/nostr/SpellDialog.tsx b/src/components/nostr/SpellDialog.tsx index aa803c4..b3dcc37 100644 --- a/src/components/nostr/SpellDialog.tsx +++ b/src/components/nostr/SpellDialog.tsx @@ -343,7 +343,7 @@ export function SpellDialog({ -
+
{filterSpellCommand( mode === "edit" && existingSpell ? existingSpell.command diff --git a/src/components/nostr/kinds/SpellRenderer.tsx b/src/components/nostr/kinds/SpellRenderer.tsx index 8dabac7..bc53344 100644 --- a/src/components/nostr/kinds/SpellRenderer.tsx +++ b/src/components/nostr/kinds/SpellRenderer.tsx @@ -256,7 +256,7 @@ export function SpellDetailRenderer({ event }: BaseEventProps) { {spell.command}