summaryrefslogtreecommitdiffhomepage
path: root/src/features/chat/ui.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-07 15:27:58 +0900
committerAdam Malczewski <[email protected]>2026-06-07 15:27:58 +0900
commit88d2fbfee9fb55fa3bbb5c8708cfba82720c1fba (patch)
tree39f42cea3eb152660640735c953ae2f743aa2b84 /src/features/chat/ui.test.ts
parent56d4841ef1b4e3c5b940b23562f54c9858d35636 (diff)
downloaddispatch-web-88d2fbfee9fb55fa3bbb5c8708cfba82720c1fba.tar.gz
dispatch-web-88d2fbfee9fb55fa3bbb5c8708cfba82720c1fba.zip
feat(chat): restyle transcript — left-aligned, bubbleless assistant, tool cards
All messages flow left in one column via the DaisyUI chat-start grid: - user keeps a primary speech bubble; - assistant/system/error render in a transparent (invisible) chat-bubble so they read as plain prose yet inherit identical left spacing, capped to a readable max-w-5xl column; - tool call/result render as regular (non-speech) rounded cards, nested in the same grid so they line up too; - role header labels dropped; chat-wide left padding added. Alignment uses specificity-based variants (no !important).
Diffstat (limited to 'src/features/chat/ui.test.ts')
-rw-r--r--src/features/chat/ui.test.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/features/chat/ui.test.ts b/src/features/chat/ui.test.ts
index ac8f640..2099257 100644
--- a/src/features/chat/ui.test.ts
+++ b/src/features/chat/ui.test.ts
@@ -20,7 +20,6 @@ describe("ChatView", () => {
render(ChatView, { props: { chunks } });
expect(screen.getByText("Hello world")).toBeInTheDocument();
- expect(screen.getByText("assistant")).toBeInTheDocument();
});
it("renders multiple chunks", () => {
@@ -145,8 +144,10 @@ describe("ChatView", () => {
render(ChatView, { props: { chunks } });
- const bubble = screen.getByText("Streaming...").closest(".chat-bubble");
- expect(bubble).toHaveClass("opacity-50");
+ // Assistant chunks are no longer in a bubble; the provisional marker now
+ // lives on the plain wrapper that directly contains the text.
+ const wrapper = screen.getByText("Streaming...").closest("div");
+ expect(wrapper).toHaveClass("opacity-50");
});
it("renders empty transcript", () => {