From ab27629139b561e19ba59b3b55b44a337b10d628 Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Fri, 6 Nov 2026 09:42:08 +0700 Subject: [PATCH] feat(workspace): the Changes panel shows on the workspace home too The home used to hide the whole row the Changes panel lives in, so a workspace's changes showed only once a session tab was open. The home now shares that row: the panel (or its rail) sits beside it at the same width, the page is locked to the viewport and the home scrolls in its own column. The panel's Workspace context fold is left out there, since the home shows that column itself. The console's section stays mounted and hidden (CSS). --- client/src/pages/Workspace.tsx | 61 ++++++++++++------- .../__tests__/Workspace.changesPanel.test.tsx | 9 ++- client/src/pages/__tests__/Workspace.test.tsx | 7 ++- docs/LANES.md | 2 +- 4 files changed, 51 insertions(+), 28 deletions(-) diff --git a/client/src/pages/Workspace.tsx b/client/src/pages/Workspace.tsx index 11642765..b644ccc1 100644 --- a/client/src/pages/Workspace.tsx +++ b/client/src/pages/Workspace.tsx @@ -1269,8 +1269,12 @@ export function Workspace() { // editor: no page padding, no cards, dividers between its regions. const sessionView = !!currentLane && !home; previewHostRef.current = sessionView; + // The home is locked to the viewport too: the Changes panel sits beside it + // at full height, and the home scrolls inside its own column. const viewportLocked = - sessionView || (!home && (paneHasActiveRun || (!!currentLane && changesOpen && changesFull))); + sessionView || + (home && !!currentLane) || + (!home && (paneHasActiveRun || (!!currentLane && changesOpen && changesFull))); const handleLaneAction = async (id: number, action: string, body?: Record) => { setLaneActionError(null); @@ -1344,27 +1348,37 @@ export function Workspace() { it rather than under it. It collapses to a rail instead of unmounting nothing — there is no live subscription inside it, so unmounting is safe and keeps a closed panel from polling. */} - {home && currentLane && ( - void refreshLanes()} - onSourcesChange={(v) => sourcesChanged(currentLane.id, v)} - sourcesVersion={sourcesVersion} - onMenuAction={(action) => { - if (action === "new-here") { - setAddLanePrefill({ sourceRepo: currentLane.source_repo || currentLane.cwd }); - setAddLaneOpen(true); - } else if (action === "reset" || action === "remove") { - setDestructive({ lane: currentLane, action }); - } - }} - /> - )} -
+
+ {/* The home shares the row with the Changes panel, like the session + view's console does — so a workspace's changes show before any + session is open. */} + {home && currentLane && ( +
+ void refreshLanes()} + onSourcesChange={(v) => sourcesChanged(currentLane.id, v)} + sourcesVersion={sourcesVersion} + onMenuAction={(action) => { + if (action === "new-here") { + setAddLanePrefill({ sourceRepo: currentLane.source_repo || currentLane.cwd }); + setAddLaneOpen(true); + } else if (action === "reset" || action === "remove") { + setDestructive({ lane: currentLane, action }); + } + }} + /> +
+ )}
{/* No header row: the console's tab bar is the header. Only a @@ -1884,12 +1898,13 @@ export function Workspace() { )} - {/* The workspace's context — the home's right column, compact. */} + {/* The workspace's context — the home's right column, compact + (not on the home itself, which shows that column). */}