From 0a6de3717a3800c8983cac477a6c0c802d320b9e Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 18 Mar 2026 11:33:54 +0000 Subject: [PATCH] fix: Chat.test.tsx type errors from 271 merge Cast lastSendChatArgs through unknown to satisfy TypeScript's strict type narrowing on the nullable union type. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/Chat.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Chat.test.tsx b/frontend/src/components/Chat.test.tsx index 315b826..78c6c43 100644 --- a/frontend/src/components/Chat.test.tsx +++ b/frontend/src/components/Chat.test.tsx @@ -631,7 +631,7 @@ describe("Chat localStorage persistence (Story 145)", () => { // Verify sendChat was called with ALL prior messages + the new one expect(lastSendChatArgs).not.toBeNull(); - const args = lastSendChatArgs as NonNullable; + const args = lastSendChatArgs as unknown as { messages: Message[]; config: unknown }; expect(args.messages).toHaveLength(3); expect(args.messages[0]).toEqual({ role: "user", @@ -1350,7 +1350,7 @@ describe("Bug 264: Claude Code session ID persisted across browser refresh", () expect(lastSendChatArgs).not.toBeNull(); expect( - (lastSendChatArgs?.config as Record).session_id, + ((lastSendChatArgs as unknown as { messages: Message[]; config: unknown })?.config as Record).session_id, ).toBe("persisted-session-xyz"); });