Skip to content

Commit b9cedfa

Browse files
andresdjassoclaude
andcommitted
style(workflow): the flip keeps the stack — editor wears card chrome up front
Bringing the workflow forward no longer reverts to the flush panel layout: while the stack exists, the floating composition persists on both sides of the flip. The editor becomes the front card (rounded, inset, shadowed) above the tucked resource tab peeking from behind, the chat stays a detached module, and the chrome frame stays dropped. The card wrappers are permanent elements with toggled classes, so the editor never remounts across flips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f6c5799 commit b9cedfa

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

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

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,11 @@ export function WorkflowWithChat() {
287287
return () => window.removeEventListener('resize', handleWindowResize)
288288
}, [])
289289

290-
// Stacked-card mode: the stage stops being a panel — everything floats as
291-
// detached modules on the workspace chrome backdrop, chat included.
292-
const isStackMode = stackOpen && stageFront === 'card'
290+
// While the stack exists — either side forward — the stage stops being a
291+
// panel: everything floats as detached modules on the workspace chrome
292+
// backdrop, chat included. Flipping only changes which card is in front.
293+
const isStackMode = stackOpen
294+
const isEditorCard = stackOpen && stageFront === 'editor'
293295

294296
// The workspace chrome drops its content card frame while modules float.
295297
// Layout effect: the frame must flip in the same paint as the cards, never
@@ -339,11 +341,25 @@ export function WorkflowWithChat() {
339341
</>
340342
)}
341343
<div className='relative h-full min-w-0 flex-1'>
342-
<Workflow
343-
workspaceId={workspaceId}
344-
workflowId={workflowId}
345-
chatDock={{ isOpen: dock.open, onSelectChat: openChat }}
346-
/>
344+
{/* When the editor is the front of the stack it wears card chrome —
345+
inset above the tucked resource tab so the stack stays visible.
346+
The wrappers are permanent (classes toggle) so the editor never
347+
remounts across flips. */}
348+
<div className={cn('h-full w-full', isEditorCard && 'p-2 pb-[36px]')}>
349+
<div
350+
className={cn(
351+
'h-full w-full',
352+
isEditorCard &&
353+
'overflow-hidden rounded-xl border border-[var(--border-1)] bg-[var(--bg)] shadow-sm'
354+
)}
355+
>
356+
<Workflow
357+
workspaceId={workspaceId}
358+
workflowId={workflowId}
359+
chatDock={{ isOpen: dock.open, onSelectChat: openChat }}
360+
/>
361+
</div>
362+
</div>
347363
{stackOpen && stageFront === 'card' && (
348364
<>
349365
{/* Opaque stage backdrop in the chrome's own color: the editor

0 commit comments

Comments
 (0)