From 570c7eaead43321d2b1cc9a7b421f13f667a2fa2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 24 Aug 2025 22:06:17 -0500 Subject: [PATCH] Add padding around user messages, fix "Stop" button position --- src/components/AIMessageItem.tsx | 32 +++++++++++++------------ src/components/Shakespeare/ChatPane.tsx | 14 ++++++----- src/test/setup.ts | 2 +- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/components/AIMessageItem.tsx b/src/components/AIMessageItem.tsx index 44d53ed7..2d4be62e 100644 --- a/src/components/AIMessageItem.tsx +++ b/src/components/AIMessageItem.tsx @@ -153,7 +153,7 @@ export const AIMessageItem = memo(({ if (message.role === 'user') { // User messages: right-aligned bubble without avatar/name return ( -
+
-
- {isCurrentlyLoading && onStopGeneration && ( -
- -
- )} +
); diff --git a/src/components/Shakespeare/ChatPane.tsx b/src/components/Shakespeare/ChatPane.tsx index cb5be4ad..90b453a9 100644 --- a/src/components/Shakespeare/ChatPane.tsx +++ b/src/components/Shakespeare/ChatPane.tsx @@ -392,8 +392,14 @@ BASE_DOMAIN=nostrdeploy.com`); /> ) : (
-
-
+
+
+ + +
+ + {/* Stop button positioned absolutely to match AIMessageItem */} +
-
- - -
) diff --git a/src/test/setup.ts b/src/test/setup.ts index 4f140f99..bad3aaec 100644 --- a/src/test/setup.ts +++ b/src/test/setup.ts @@ -10,7 +10,7 @@ vi.mock('*.sass', () => ({})); vi.mock('katex/dist/katex.min.css', () => ({})); // Mock Streamdown component that might be importing KaTeX -vi.mock('@soapbox.pub/streamdown', () => ({ +vi.mock('streamdown', () => ({ Streamdown: ({ children }: { children: React.ReactNode }) => children }));