From c686301571ff9772fa0604cf02e69d7c661b57ca Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 12 Aug 2026 19:34:56 -0700 Subject: [PATCH] feat(desktop): show 'being reworked' placeholder in chat panes Chat isn't functional right now, so both the v1 and v2 chat panes render a shared ChatUnderConstruction placeholder instead of the chat UI. Pane chrome (title bar, split/close, context menu) is kept; the v1 pane no longer initializes chat providers, IPC clients, or the session controller. The flag-gated ChatV3Pane is untouched. --- .../ChatUnderConstruction.tsx | 15 ++ .../components/ChatUnderConstruction/index.ts | 1 + .../components/ChatPane/ChatPane.tsx | 34 +--- .../TabsContent/TabView/ChatPane/ChatPane.tsx | 190 +++++------------- 4 files changed, 66 insertions(+), 174 deletions(-) create mode 100644 apps/desktop/src/renderer/components/ChatUnderConstruction/ChatUnderConstruction.tsx create mode 100644 apps/desktop/src/renderer/components/ChatUnderConstruction/index.ts diff --git a/apps/desktop/src/renderer/components/ChatUnderConstruction/ChatUnderConstruction.tsx b/apps/desktop/src/renderer/components/ChatUnderConstruction/ChatUnderConstruction.tsx new file mode 100644 index 00000000000..fc687dfdb66 --- /dev/null +++ b/apps/desktop/src/renderer/components/ChatUnderConstruction/ChatUnderConstruction.tsx @@ -0,0 +1,15 @@ +import { Construction } from "lucide-react"; + +export function ChatUnderConstruction() { + return ( +
+ +
+

Chat is being reworked

+

+ We're rebuilding this feature. Check back soon. +

+
+
+ ); +} diff --git a/apps/desktop/src/renderer/components/ChatUnderConstruction/index.ts b/apps/desktop/src/renderer/components/ChatUnderConstruction/index.ts new file mode 100644 index 00000000000..8e5c222cbd5 --- /dev/null +++ b/apps/desktop/src/renderer/components/ChatUnderConstruction/index.ts @@ -0,0 +1 @@ +export { ChatUnderConstruction } from "./ChatUnderConstruction"; diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatPane/ChatPane.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatPane/ChatPane.tsx index 18d23eb4443..d8bd7a64a40 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatPane/ChatPane.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatPane/ChatPane.tsx @@ -1,38 +1,14 @@ +import { ChatUnderConstruction } from "renderer/components/ChatUnderConstruction"; import type { ChatLaunchConfig } from "shared/tabs-types"; -import { ChatPaneInterface as WorkspaceChatInterface } from "./components/WorkspaceChatInterface"; -import { useWorkspaceChatController } from "./hooks/useWorkspaceChatController"; -export function ChatPane({ - onSessionIdChange, - sessionId, - workspaceId, - initialLaunchConfig, - onConsumeLaunchConfig, -}: { +// Chat is temporarily disabled while it's being reworked; the pane keeps its +// props so existing chat panes still mount without churn in the registry. +export function ChatPane(_props: { onSessionIdChange: (sessionId: string | null) => void; sessionId: string | null; workspaceId: string; initialLaunchConfig?: ChatLaunchConfig | null; onConsumeLaunchConfig?: () => void; }) { - const { organizationId, workspacePath, handleNewChat, getOrCreateSession } = - useWorkspaceChatController({ - onSessionIdChange, - sessionId, - workspaceId, - }); - - return ( - - ); + return ; } diff --git a/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatPane.tsx b/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatPane.tsx index dc9db97d666..cde8e1a673e 100644 --- a/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatPane.tsx +++ b/apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatPane.tsx @@ -1,22 +1,9 @@ -import { - ChatRuntimeServiceProvider, - ChatServiceProvider, -} from "@superset/chat-legacy/client"; -import { useCallback } from "react"; import type { MosaicBranch } from "react-mosaic-component"; -import { createChatServiceIpcClient } from "renderer/components/Chat/utils/chat-service-client"; -import { electronQueryClient } from "renderer/providers/ElectronTRPCProvider"; +import { ChatUnderConstruction } from "renderer/components/ChatUnderConstruction"; import { useTabsStore } from "renderer/stores/tabs/store"; import type { SplitPaneOptions, Tab } from "renderer/stores/tabs/types"; import { TabContentContextMenu } from "../../TabContentContextMenu"; import { BasePaneWindow, PaneToolbarActions } from "../components"; -import { ChatPaneInterface } from "./ChatPaneInterface"; -import { SessionSelector } from "./components/SessionSelector"; -import { useChatPaneController } from "./hooks/useChatPaneController"; -import { createChatRuntimeServiceIpcClient } from "./utils/chat-runtime-service-client"; - -const chatRuntimeIpcClient = createChatRuntimeServiceIpcClient(); -const chatIpcClient = createChatServiceIpcClient(); interface ChatPaneProps { paneId: string; @@ -48,11 +35,12 @@ interface ChatPaneProps { onMoveToNewTab: () => void; } +// Chat is temporarily disabled while it's being reworked; the pane keeps its +// chrome (toolbar, split/close, context menu) but renders a placeholder. export function ChatPane({ paneId, path, tabId, - workspaceId, splitPaneAuto, splitPaneHorizontal, splitPaneVertical, @@ -62,141 +50,53 @@ export function ChatPane({ onMoveToTab, onMoveToNewTab, }: ChatPaneProps) { - const isFocused = useTabsStore((s) => s.focusedPaneIds[tabId] === paneId); const equalizePaneSplits = useTabsStore((s) => s.equalizePaneSplits); const paneName = useTabsStore((s) => s.panes[paneId]?.name ?? "New Chat"); - const setTabAutoTitle = useTabsStore((s) => s.setTabAutoTitle); - const setPaneAutoTitle = useTabsStore((s) => s.setPaneAutoTitle); - const { - sessionId, - launchConfig, - organizationId, - workspacePath, - isSessionInitializing, - hasCurrentSessionRecord, - sessionItems, - handleSelectSession, - handleNewChat, - handleStartFreshSession, - handleDeleteSession, - ensureCurrentSessionRecord, - consumeLaunchConfig, - } = useChatPaneController({ - paneId, - workspaceId, - }); - - const applySubmittedMessageFallbackTitle = useCallback( - (message: string) => { - const normalized = message.trim().replace(/\s+/g, " "); - if (!normalized) return; - const fallbackTitle = - normalized.length > 72 - ? `${normalized.slice(0, 69).trimEnd()}...` - : normalized; - - const state = useTabsStore.getState(); - const pane = state.panes[paneId]; - const tab = state.tabs.find((candidate) => candidate.id === tabId); - const tabPaneCount = Object.values(state.panes).filter( - (candidate) => candidate.tabId === tabId, - ).length; - const paneName = pane?.name?.trim() ?? ""; - const tabName = tab?.name?.trim() ?? ""; - const hasCustomTabTitle = Boolean(tab?.userTitle?.trim()); - const shouldSetPaneTitle = - paneName.length === 0 || paneName === "New Chat"; - const shouldSetTabTitle = - !hasCustomTabTitle && - (tabName.length === 0 || - tabName === "New Chat" || - (tabPaneCount === 1 && pane?.type === "chat")); - - if (shouldSetPaneTitle) { - setPaneAutoTitle(paneId, fallbackTitle); - } - if (shouldSetTabTitle) { - setTabAutoTitle(tabId, fallbackTitle); - } - }, - [paneId, setPaneAutoTitle, setTabAutoTitle, tabId], - ); return ( - ( +
+ + {paneName} + + +
+ )} > - splitPaneHorizontal(tabId, paneId, path)} + onSplitVertical={() => splitPaneVertical(tabId, paneId, path)} + onSplitWithNewChat={() => + splitPaneVertical(tabId, paneId, path, { + paneType: "chat", + }) + } + onSplitWithNewBrowser={() => + splitPaneVertical(tabId, paneId, path, { paneType: "webview" }) + } + onEqualizePaneSplits={() => equalizePaneSplits(tabId)} + onClosePane={() => removePane(paneId)} + currentTabId={tabId} + availableTabs={availableTabs} + onMoveToTab={onMoveToTab} + onMoveToNewTab={onMoveToNewTab} + closeLabel="Close Chat" > - ( -
-
- -
- -
- )} - > - splitPaneHorizontal(tabId, paneId, path)} - onSplitVertical={() => splitPaneVertical(tabId, paneId, path)} - onSplitWithNewChat={() => - splitPaneVertical(tabId, paneId, path, { - paneType: "chat", - }) - } - onSplitWithNewBrowser={() => - splitPaneVertical(tabId, paneId, path, { paneType: "webview" }) - } - onEqualizePaneSplits={() => equalizePaneSplits(tabId)} - onClosePane={() => removePane(paneId)} - currentTabId={tabId} - availableTabs={availableTabs} - onMoveToTab={onMoveToTab} - onMoveToNewTab={onMoveToNewTab} - closeLabel="Close Chat" - > -
- -
-
-
-
-
+
+ +
+ + ); }