From e5565344590079d31f54cfce0b076dec2048474a Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 29 Aug 2026 12:39:53 +0200 Subject: [PATCH] fix: unbroken divider between sidebar and feed The title bar was one band across the top of the window, so the sidebar's right border only began below it and the pane read as detached from the top of the window. Each pane now reserves its own strip for the traffic lights instead. The border runs from the very top, and because both insets are the same height the sidebar header and the top bar share a baseline, so their bottom borders form one continuous line across the window. Both strips stay draggable, and the inset collapses in window fullscreen where there are no traffic lights to clear. --- src/App.tsx | 20 +++++++++----------- src/components/Sidebar.tsx | 8 +++++++- src/components/TopBar.tsx | 6 +++++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 6a6d8b1..f0eb35f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -214,19 +214,14 @@ export default function App() { return "Nothing matches this filter."; }; + // Each pane reserves its own strip for the traffic lights instead of one + // band across the top, so the sidebar's right border runs unbroken from the + // very top of the window. In macOS window fullscreen there are no traffic + // lights, so the inset collapses. + const titleBarInset = !windowFullscreen; + return (
- {/* The webview paints the title bar itself. It sits directly above the - sidebar and top bar, so it takes the panel colour, not the page's. - In macOS window fullscreen the traffic lights are gone, so the strip - would just be a blank bar — it collapses instead. */} - {!windowFullscreen && ( -
- )} -
{/* With the sidebar hidden, a thin strip along the left edge brings it back on hover. */} @@ -251,6 +246,7 @@ export default function App() { totalVideos={totals.videos} totalDownloaded={totals.downloaded} onHide={() => { setSidebarHidden(true); setSidebarPeek(false); }} + titleBarInset={titleBarInset} />
)} @@ -264,6 +260,7 @@ export default function App() { totalVideos={totals.videos} totalDownloaded={totals.downloaded} onHide={() => setSidebarHidden(true)} + titleBarInset={titleBarInset} /> )} @@ -279,6 +276,7 @@ export default function App() { view={view} onView={setView} sidebarHidden={sidebarHidden} onShowSidebar={() => { setSidebarHidden(false); setSidebarPeek(false); }} + titleBarInset={titleBarInset} /> {!online && ( diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 20fdcb5..5c6b0f7 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -11,11 +11,13 @@ interface Props { onHide: () => void; /** True when revealed by hover over the left edge rather than pinned open. */ floating?: boolean; + /** Reserve room for the macOS traffic lights above the header. */ + titleBarInset: boolean; } export default function Sidebar({ channels, activeChannel, onSelect, onOpenSettings, totalVideos, totalDownloaded, - onHide, floating, + onHide, floating, titleBarInset, }: Props) { const row = "flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 " + @@ -35,6 +37,10 @@ export default function Sidebar({ "lg:border-b-0 lg:border-r") } > + {/* The pane starts at the very top of the window so its right border is + one unbroken line; this reserves the strip the traffic lights sit in. */} + {titleBarInset &&
} +
+ {titleBarInset &&
} +
{sidebarHidden && (