diff --git a/frontend/src/components/Chat.test.tsx b/frontend/src/components/Chat.test.tsx
index a43ed49a..665be372 100644
--- a/frontend/src/components/Chat.test.tsx
+++ b/frontend/src/components/Chat.test.tsx
@@ -1642,7 +1642,8 @@ describe("Slash command handling (Story 374)", () => {
expect(mockedApi.botCommand).not.toHaveBeenCalled();
});
- it("AC: /help shows help overlay", async () => {
+ it("AC: /help calls botCommand and displays response", async () => {
+ mockedApi.botCommand.mockResolvedValue({ response: "Available commands: status, help, ..." });
render();
await waitFor(() => expect(capturedWsHandlers).not.toBeNull());
@@ -1658,9 +1659,14 @@ describe("Slash command handling (Story 374)", () => {
fireEvent.keyDown(input, { key: "Enter", shiftKey: false });
});
- expect(await screen.findByTestId("help-overlay")).toBeInTheDocument();
+ await waitFor(() => {
+ expect(mockedApi.botCommand).toHaveBeenCalledWith(
+ "help",
+ "",
+ undefined,
+ );
+ });
expect(lastSendChatArgs).toBeNull();
- expect(mockedApi.botCommand).not.toHaveBeenCalled();
});
it("AC: botCommand API error shows error message in chat", async () => {
diff --git a/server/src/llm/providers/claude_code.rs b/server/src/llm/providers/claude_code.rs
index ae2a82fe..6bcdb277 100644
--- a/server/src/llm/providers/claude_code.rs
+++ b/server/src/llm/providers/claude_code.rs
@@ -256,7 +256,7 @@ fn run_pty_session(
// Read NDJSON lines from stdout
let (line_tx, line_rx) = std::sync::mpsc::channel::