Skip to content

Commit 3df0261

Browse files
andresdjassoclaude
andcommitted
style(workflow): stacked mode floats everything on the chrome backdrop
In stacked-card mode the stage stops reading as a panel: the backdrop drops to the workspace chrome color (--surface-1) so only the two cards exist, and the chat pane detaches into its own module — full rounded corners, border, shadow, inset from the edges — matching the floating cards beside it. Editor- forward mode reverts everything to the flush panel layout. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1950049 commit 3df0261

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useParams, useSearchParams } from 'next/navigation'
55
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'
8+
import { cn } from '@/lib/core/utils/cn'
89
import {
910
MothershipResourcesProvider,
1011
MothershipView,
@@ -282,13 +283,22 @@ export function WorkflowWithChat() {
282283

283284
if (!workspaceId || !workflowId) return null
284285

286+
// Stacked-card mode: the stage stops being a panel — everything floats as
287+
// detached modules on the workspace chrome backdrop, chat included.
288+
const isStackMode = stackOpen && stageFront === 'card'
289+
285290
return (
286-
<div className='flex h-full w-full'>
291+
<div className={cn('flex h-full w-full', isStackMode && 'bg-[var(--surface-1)]')}>
287292
{dock.open && (
288293
<>
289294
<div
290295
ref={chatPaneRef}
291-
className='flex h-full w-[clamp(360px,34%,520px)] flex-shrink-0 flex-col border-[var(--border)] border-r'
296+
className={cn(
297+
'flex w-[clamp(360px,34%,520px)] flex-shrink-0 flex-col',
298+
isStackMode
299+
? 'my-2 ml-2 h-[calc(100%-16px)] overflow-hidden rounded-xl border border-[var(--border-1)] bg-[var(--bg)] shadow-sm'
300+
: 'h-full border-[var(--border)] border-r'
301+
)}
292302
>
293303
<DockedChat
294304
key={dock.chatId ?? 'new'}
@@ -321,10 +331,10 @@ export function WorkflowWithChat() {
321331
/>
322332
{stackOpen && stageFront === 'card' && (
323333
<>
324-
{/* Opaque stage backdrop: the editor stays mounted and live
325-
underneath, but the back card shows only its identity — never
326-
slices of canvas or controls. */}
327-
<div aria-hidden='true' className='absolute inset-0 z-30 bg-[var(--bg)]' />
334+
{/* Opaque stage backdrop in the chrome's own color: the editor
335+
stays mounted and live underneath, but the stage reads as
336+
workspace space holding two floating cards — not a panel. */}
337+
<div aria-hidden='true' className='absolute inset-0 z-30 bg-[var(--surface-1)]' />
328338
{/* The back card: a slim bar with just the workflow icon + name,
329339
peeking above the front card (toast-stack depth). Narrower
330340
than the front so it reads as behind; clicking it brings the

0 commit comments

Comments
 (0)