diff --git a/apps/desktop/e2e-budget.json b/apps/desktop/e2e-budget.json index 383cff4e3c..bdc49d7bde 100644 --- a/apps/desktop/e2e-budget.json +++ b/apps/desktop/e2e-budget.json @@ -30,8 +30,8 @@ "electron": "needs a second real Session (Host round trip) to switch to; the focus and draft-restore halves alone would not earn a window" }, "session-workbar.spec.ts": { - "tests": 5, - "electron": "Git changes re-read on window focus, terminal PTY ownership across Sessions, Side Chat's fork lifecycle, and a first send that has to reach the Host; the composer-usage test is renderer-only and rides along on those windows until app-shell.tsx's composer-to-workbar wiring has a story host" + "tests": 6, + "electron": "Git changes re-read on window focus, terminal PTY ownership across Sessions, Side Chat's fork lifecycle, a first send that has to reach the Host, and per-Session collapse persisted across a renderer reload; the composer-usage test is renderer-only and rides along on those windows until app-shell.tsx's composer-to-workbar wiring has a story host" }, "settings.spec.ts": { "tests": 4, diff --git a/apps/desktop/stories/app-shell.stories.tsx b/apps/desktop/stories/app-shell.stories.tsx index 0fb8135c2e..660cbe41a3 100644 --- a/apps/desktop/stories/app-shell.stories.tsx +++ b/apps/desktop/stories/app-shell.stories.tsx @@ -42,6 +42,7 @@ import { WorkbarSurface } from '../src/renderer/features/workbar/stories'; import { createFakeWorkbarServices, createSessionWorkbarPanelsState, + isSessionWorkbarCollapsed, reduceWorkbarLayout, SESSION_BOTTOM_PANEL_DEFAULT_HEIGHT, SESSION_WORKBAR_DEFAULT_WIDTH, @@ -2971,7 +2972,8 @@ export const RailStaysOnTheVisiblePrompt: Story = { const workbarLayoutWithOneFace: WorkbarLayoutState = reduceWorkbarLayout( { panels: createSessionWorkbarPanelsState(), - rightCollapsed: true, + activeSessionId: 'session-active', + collapsedBySession: {}, bottomOpen: false, rightWidth: SESSION_WORKBAR_DEFAULT_WIDTH, bottomHeight: SESSION_BOTTOM_PANEL_DEFAULT_HEIGHT, @@ -2983,12 +2985,13 @@ function WorkbarInShell() { const [layout, dispatch] = useReducer(reduceWorkbarLayout, workbarLayoutWithOneFace); const collapseRight = (collapsed: boolean) => dispatch({ type: 'collapse', placement: 'right', collapsed }); + const rightCollapsed = isSessionWorkbarCollapsed(layout); return ( collapseRight(!layout.rightCollapsed)} + workbarCollapsed={rightCollapsed} + onToggleWorkbar={() => collapseRight(!rightCollapsed)} detailChildren={