File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]
components/workspace-chrome
w/[workflowId]/components/docked-chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ export function WorkspaceChrome({ children }: WorkspaceChromeProps) {
6161 const openFlyout = useSidebarStore ( ( s ) => s . openFlyout )
6262 const scheduleFlyoutClose = useSidebarStore ( ( s ) => s . scheduleFlyoutClose )
6363 const closeFlyout = useSidebarStore ( ( s ) => s . closeFlyout )
64+ const isStageFloating = useSidebarStore ( ( s ) => s . isStageFloating )
6465
6566 // Hide the flyout after navigating from it.
6667 useEffect ( ( ) => {
@@ -134,8 +135,13 @@ export function WorkspaceChrome({ children }: WorkspaceChromeProps) {
134135 >
135136 < div
136137 className = { cn (
137- 'flex-1 overflow-hidden bg-[var(--bg)]' ,
138- ( isFullscreen || ! isCollapsed ) && 'rounded-[8px] border border-[var(--border)]'
138+ 'flex-1 overflow-hidden' ,
139+ // Floating-stage mode: the content renders as detached cards on
140+ // the chrome backdrop, so the content card frame disappears.
141+ isStageFloating ? 'bg-[var(--surface-1)]' : 'bg-[var(--bg)]' ,
142+ ( isFullscreen || ! isCollapsed ) &&
143+ ! isStageFloating &&
144+ 'rounded-[8px] border border-[var(--border)]'
139145 ) }
140146 >
141147 { children }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import type {
1818import Workflow from '@/app/workspace/[workspaceId]/w/[workflowId]/workflow'
1919import { useWorkflows } from '@/hooks/queries/workflows'
2020import { useMothershipTabsStore } from '@/stores/mothership-tabs/store'
21+ import { useSidebarStore } from '@/stores/sidebar/store'
2122import { DockedChat } from './docked-chat'
2223
2324/** Sentinel `?chat=` value for a docked chat that hasn't been created yet. */
@@ -281,12 +282,19 @@ export function WorkflowWithChat() {
281282 return ( ) => window . removeEventListener ( 'resize' , handleWindowResize )
282283 } , [ ] )
283284
284- if ( ! workspaceId || ! workflowId ) return null
285-
286285 // Stacked-card mode: the stage stops being a panel — everything floats as
287286 // detached modules on the workspace chrome backdrop, chat included.
288287 const isStackMode = stackOpen && stageFront === 'card'
289288
289+ // The workspace chrome drops its content card frame while modules float.
290+ const setStageFloating = useSidebarStore ( ( s ) => s . setStageFloating )
291+ useEffect ( ( ) => {
292+ setStageFloating ( isStackMode )
293+ return ( ) => setStageFloating ( false )
294+ } , [ isStackMode , setStageFloating ] )
295+
296+ if ( ! workspaceId || ! workflowId ) return null
297+
290298 return (
291299 < div className = { cn ( 'flex h-full w-full' , isStackMode && 'bg-[var(--surface-1)]' ) } >
292300 { dock . open && (
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export const useSidebarStore = create<SidebarState>()(
5353 sidebarWidth : SIDEBAR_WIDTH . DEFAULT ,
5454 isCollapsed : false ,
5555 isFlyoutOpen : false ,
56+ isStageFloating : false ,
5657 _hasHydrated : false ,
5758 setWorkspaceDropdownOpen : ( isOpen ) => set ( { workspaceDropdownOpen : isOpen } ) ,
5859 setSidebarWidth : ( width ) => {
@@ -106,6 +107,9 @@ export const useSidebarStore = create<SidebarState>()(
106107 if ( clampedWidth !== sidebarWidth ) set ( { sidebarWidth : clampedWidth } )
107108 applySidebarWidth ( clampedWidth )
108109 } ,
110+ setStageFloating : ( floating ) => {
111+ if ( get ( ) . isStageFloating !== floating ) set ( { isStageFloating : floating } )
112+ } ,
109113 setHasHydrated : ( hasHydrated ) => set ( { _hasHydrated : hasHydrated } ) ,
110114 } ) ,
111115 {
Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ export interface SidebarState {
88 isCollapsed : boolean
99 /** Whether the hover flyout menu is showing while the sidebar is collapsed */
1010 isFlyoutOpen : boolean
11+ /**
12+ * The content area is in floating-stage mode (workflow stage stack): panes
13+ * render as detached cards on the chrome backdrop, so the workspace chrome
14+ * drops its content card frame entirely.
15+ */
16+ isStageFloating : boolean
1117 _hasHydrated : boolean
1218 setWorkspaceDropdownOpen : ( isOpen : boolean ) => void
1319 setSidebarWidth : ( width : number ) => void
@@ -32,5 +38,7 @@ export interface SidebarState {
3238 * default (e.g. soft navigation) or grew wider than a now-smaller window.
3339 */
3440 syncWidth : ( ) => void
41+ /** Enters/leaves floating-stage mode (see {@link SidebarState.isStageFloating}). */
42+ setStageFloating : ( floating : boolean ) => void
3543 setHasHydrated : ( hasHydrated : boolean ) => void
3644}
You can’t perform that action at this time.
0 commit comments