From 0ca6ed3ab19a6a6ba784a49c944ecbb60f874446 Mon Sep 17 00:00:00 2001
From: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Date: Tue, 9 Jun 2026 10:05:46 -0700
Subject: [PATCH] Fix titlebar gap when sidebar is open but no worktree is
active
When on full-page views (like Tasks or Landing) with an open sidebar
but no active worktree, mirror the split-column titlebar layout.
This positions the left titlebar controls directly above the sidebar,
avoiding a layout gap and ensuring consistent visual alignment.
---
src/renderer/src/App.tsx | 235 ++++++++++++++++++++-------------------
1 file changed, 122 insertions(+), 113 deletions(-)
diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 21ac9006481..5a5411b8d11 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -1148,6 +1148,9 @@ function App(): React.JSX.Element {
// split-column chrome. Full-page navigation views keep the draggable app
// titlebar so their page-level controls can live in that window strip.
const workspaceActive = activeView === 'terminal' && activeWorktreeId !== null
+ // Why: Tasks/Landing keep the full titlebar only when the sidebar is collapsed;
+ // with it open, mirror workspace view so titlebar-left sits flush above nav.
+ const stackedSidebarOpen = !workspaceActive && showSidebar && sidebarOpen
// Why: suppress right sidebar controls on full-page navigation surfaces
// since those surfaces intentionally own the full content area.
const showRightSidebarControls = canShowRightSidebarForView(activeView)
@@ -1621,6 +1624,43 @@ function App(): React.JSX.Element {
) : null
+ const titlebarMainStrip = (
+ <>
+ {activeView === 'activity' ? (
+
+ ) : (
+
+ )}
+ {showTitlebarExpandButton && (
+
+
+
+
+
+ Collapse pane
+
+
+ )}
+ {/* Why: when the right sidebar is open, its own header renders
+ an identical close button — hide this copy so only one is
+ visible at a time. */}
+ {!rightSidebarOpen && rightSidebarToggle}
+ {/* Why: reserve space so content is not obscured by the
+ fixed-position window-controls overlay on Windows. */}
+ {isWindows && }
+ >
+ )
+
return (
-
- {titlebarLeftControls}
-
- {activeView === 'activity' ? (
-
- ) : (
-
- )}
- {showTitlebarExpandButton && (
-
-
-
-
-
- Collapse pane
-
-
- )}
- {/* Why: when the right sidebar is open, its own header renders
- an identical close button — hide this copy so only one is
- visible at a time. */}
- {!rightSidebarOpen && rightSidebarToggle}
- {/* Why: reserve space so content is not obscured by the
- fixed-position window-controls overlay on Windows. */}
- {isWindows && }
+
{titlebarLeftControls}
+ {titlebarMainStrip}
) : null}
{showSidebar ? (
- workspaceActive ? (
+ workspaceActive || stackedSidebarOpen ? (
/* Why: left column wraps the sidebar with a titlebar-height
header above it. The header holds the same controls
(traffic lights, sidebar toggle, "Orca" title, agent badge)
@@ -1780,87 +1784,92 @@ function App(): React.JSX.Element {
)
) : null}
-
- {/* Why: right sidebar toggle floats at the top-right of the center
+
+ {stackedSidebarOpen ? (
+
{titlebarMainStrip}
+ ) : null}
+
+ {/* Why: right sidebar toggle floats at the top-right of the center
column so it's always accessible whether the right sidebar is
open or closed. Match the RightSidebar header's 36px height and
top-0 anchor so the icon's vertical center is identical between
open and closed states — otherwise toggling makes the icon jump
a few pixels, which reads as layout jitter. */}
- {workspaceActive && !rightSidebarOpen && (
-