From 0e6f0f1fd884d89c5ef23a02c1dd75de72cbea3d Mon Sep 17 00:00:00 2001 From: Dotta Date: Wed, 1 Jul 2026 23:15:10 +0000 Subject: [PATCH] PAP-12318 remove SelectedAgentChat shim after AssistantChat adoption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conference Room (BoardChat) already renders AssistantChat directly, so the SelectedAgentChat wrapper — and its deprecated conferenceRoomMode prop — was dead code. Delete the file and migrate the Storybook story to AssistantChatView. No conferenceRoomMode references remain; flag gating unchanged. Co-Authored-By: Claude Opus 4.8 --- ui/src/components/SelectedAgentChat.tsx | 42 ------------------- ...stories.tsx => assistant-chat.stories.tsx} | 14 +++---- 2 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 ui/src/components/SelectedAgentChat.tsx rename ui/storybook/stories/{selected-agent-chat.stories.tsx => assistant-chat.stories.tsx} (92%) diff --git a/ui/src/components/SelectedAgentChat.tsx b/ui/src/components/SelectedAgentChat.tsx deleted file mode 100644 index 8d76a4e2a98..00000000000 --- a/ui/src/components/SelectedAgentChat.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { - AssistantChat, - AssistantChatView, - type AssistantChatProps, - type AssistantChatViewProps, -} from "./AssistantChat"; - -export { - ASSISTANT_CHAT_ACTIVE_POLL_MS, - ASSISTANT_CHAT_IDLE_POLL_MS, - mergeAssistantChatComments, - resolveAssistantChatPollInterval, - resolveDefaultChatTarget, - type AssistantChatStarterPrompt, - type PendingAssistantChatComment, -} from "./AssistantChat"; - -export type SelectedAgentChatProps = Omit & { - defaultTargetAgentId?: string | null; - /** @deprecated AssistantChat always uses the assistant preset. */ - conferenceRoomMode?: boolean; -}; - -export type SelectedAgentChatViewProps = AssistantChatViewProps & { - /** @deprecated AssistantChatView always uses the assistant preset. */ - conferenceRoomMode?: boolean; -}; - -export function SelectedAgentChat({ - defaultTargetAgentId, - conferenceRoomMode: _conferenceRoomMode, - ...props -}: SelectedAgentChatProps) { - return ; -} - -export function SelectedAgentChatView({ - conferenceRoomMode: _conferenceRoomMode, - ...props -}: SelectedAgentChatViewProps) { - return ; -} diff --git a/ui/storybook/stories/selected-agent-chat.stories.tsx b/ui/storybook/stories/assistant-chat.stories.tsx similarity index 92% rename from ui/storybook/stories/selected-agent-chat.stories.tsx rename to ui/storybook/stories/assistant-chat.stories.tsx index 1b103ea41b9..36e105e6386 100644 --- a/ui/storybook/stories/selected-agent-chat.stories.tsx +++ b/ui/storybook/stories/assistant-chat.stories.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import type { Meta, StoryObj } from "@storybook/react-vite"; import type { Agent, IssueComment } from "@paperclipai/shared"; import type { ActiveRunForIssue, LiveRunForIssue } from "@/api/heartbeats"; -import { SelectedAgentChatView } from "@/components/SelectedAgentChat"; +import { AssistantChatView } from "@/components/AssistantChat"; import type { IssueChatComment } from "@/lib/issue-chat-messages"; import { pendingSuggestedTasksInteraction } from "@/fixtures/issueThreadInteractionFixtures"; import { storybookAgents } from "../fixtures/paperclipData"; @@ -104,12 +104,12 @@ function Frame({ children }: { children: React.ReactNode }) { /** Stateful wrapper so the agent switcher is interactive in the canvas. */ function ChatHarness( - props: Omit, "targetAgentId" | "onTargetAgentChange">, + props: Omit, "targetAgentId" | "onTargetAgentChange">, ) { const [targetAgentId, setTargetAgentId] = useState(ceoAgent.id); return ( - {}, -} satisfies Partial>; +} satisfies Partial>; -const meta: Meta = { - title: "Chat & Comments/Selected-Agent Chat", +const meta: Meta = { + title: "Chat & Comments/Assistant Chat", parameters: { layout: "fullscreen" }, }; export default meta; -type Story = StoryObj; +type Story = StoryObj; /** Empty / idle — composer ready, default CEO target, switcher available. */ export const EmptyIdle: Story = {