Skip to content

Commit 449d424

Browse files
andresdjassoclaude
andcommitted
fix(workflow): chrome cluster survives the stack when the chat is closed
With the chat closed and resources forward, the sidebar toggle and chat switcher lived in the editor's canvas chrome — buried under the stack's backdrop, leaving no way to open the sidebar or a chat. The front card's tab strip now doubles as the title bar in that state (same tabsLeading pattern as the chat view): toggle + split switcher lead the strip, the icon side docks the most recent chat in place, and the cluster hands off to the chat's title bar once a chat docks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ac8a357 commit 449d424

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/docked-chat/workflow-with-chat.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { Tooltip } from '@/components/emcn'
66
import { Workflow as WorkflowIcon, X } from '@/components/emcn/icons'
77
import { isMothershipPageId, MOTHERSHIP_PAGES } from '@/lib/copilot/resources/types'
88
import { cn } from '@/lib/core/utils/cn'
9+
import { ChatSwitcher } from '@/app/workspace/[workspaceId]/components/chat-switcher'
10+
import { SidebarToggle } from '@/app/workspace/[workspaceId]/components/sidebar-toggle'
911
import {
1012
MothershipResourcesProvider,
1113
MothershipView,
@@ -443,6 +445,21 @@ export function WorkflowWithChat() {
443445
activeResourceId={stageActiveId}
444446
isCollapsed={false}
445447
className='h-full w-full border-l-0'
448+
tabsLeading={
449+
!dock.open ? (
450+
/* With the chat closed, the card's tab strip doubles as
451+
the title bar — same chrome cluster as everywhere
452+
else; the canvas copy is buried under the stack. */
453+
<div className='flex flex-shrink-0 items-center gap-1'>
454+
<SidebarToggle className='-ml-[9px]' />
455+
<ChatSwitcher
456+
iconOnly
457+
navigateOnSelect={false}
458+
onSelectChat={(chatId) => openChat(chatId)}
459+
/>
460+
</div>
461+
) : undefined
462+
}
446463
/>
447464
</MothershipResourcesProvider>
448465
<Tooltip.Root>

0 commit comments

Comments
 (0)