From ddc461ccf0f92376c50bbc02fa513319c41f5973 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:17:44 -0700 Subject: [PATCH] refactor(ui): polish sidebar typography and compact task page chrome Tighten sidebar fonts/icons (Tasks label, WORKSPACES section, search) and collapse the task page close button into the source-filter row so the top chrome forms one compact band. --- src/renderer/src/components/TaskPage.tsx | 53 +++++++++---------- .../src/components/sidebar/SearchBar.tsx | 9 ++-- .../src/components/sidebar/SidebarHeader.tsx | 6 +-- .../src/components/sidebar/SidebarNav.tsx | 6 +-- 4 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/renderer/src/components/TaskPage.tsx b/src/renderer/src/components/TaskPage.tsx index 67e307d986c..7e0b831e921 100644 --- a/src/renderer/src/components/TaskPage.tsx +++ b/src/renderer/src/components/TaskPage.tsx @@ -1221,34 +1221,33 @@ export default function TaskPage(): React.JSX.Element { ) : null} - {/* Why: Close sits in its own row below the titlebar strip so it can - never overlap the floating macOS traffic lights. Kept left-aligned - to stay out of the app sidebar on the right edge. */} -
- - - - - - Close · Esc - - -
- -
-
-
-
-
+
+
+
+
+
+ {/* Why: Close is anchored left in the same row as the + source icons so the top chrome is one compact band. + Left-aligned keeps it clear of the app sidebar on the + right edge. */} + + + + + + Close · Esc + + +
{SOURCE_OPTIONS.map((source) => { const active = taskSource === source.id return ( diff --git a/src/renderer/src/components/sidebar/SearchBar.tsx b/src/renderer/src/components/sidebar/SearchBar.tsx index 86e3bc52cad..f762d47260b 100644 --- a/src/renderer/src/components/sidebar/SearchBar.tsx +++ b/src/renderer/src/components/sidebar/SearchBar.tsx @@ -75,12 +75,15 @@ const SearchBar = React.memo(function SearchBar() { return (
- + setSearchQuery(e.target.value)} placeholder="Search..." - className="h-7 pl-7 pr-20 text-[11px] border-none bg-muted/50 shadow-none focus-visible:ring-1 focus-visible:ring-ring/30" + className="h-7 pl-7 pr-20 text-[12px] border-none bg-muted/50 shadow-none focus-visible:ring-1 focus-visible:ring-ring/30 placeholder:text-muted-foreground/70" />
{searchQuery && ( @@ -104,7 +107,7 @@ const SearchBar = React.memo(function SearchBar() { : 'size-5 w-5 bg-transparent hover:bg-accent/60' )} > - + {filterSummary} diff --git a/src/renderer/src/components/sidebar/SidebarHeader.tsx b/src/renderer/src/components/sidebar/SidebarHeader.tsx index 3feab666434..bb0d118ccfc 100644 --- a/src/renderer/src/components/sidebar/SidebarHeader.tsx +++ b/src/renderer/src/components/sidebar/SidebarHeader.tsx @@ -56,7 +56,7 @@ const SidebarHeader = React.memo(function SidebarHeader() { return (
- + Workspaces
@@ -70,7 +70,7 @@ const SidebarHeader = React.memo(function SidebarHeader() { className="text-muted-foreground" aria-label="View options" > - + @@ -153,7 +153,7 @@ const SidebarHeader = React.memo(function SidebarHeader() { aria-label="New workspace" disabled={!canCreateWorktree} > - + diff --git a/src/renderer/src/components/sidebar/SidebarNav.tsx b/src/renderer/src/components/sidebar/SidebarNav.tsx index adeb411ed61..e15f13497b6 100644 --- a/src/renderer/src/components/sidebar/SidebarNav.tsx +++ b/src/renderer/src/components/sidebar/SidebarNav.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { Github, ListChecks } from 'lucide-react' +import { Github, List } from 'lucide-react' import { useAppStore } from '@/store' import { useRepoMap } from '@/store/selectors' import { cn } from '@/lib/utils' @@ -65,14 +65,14 @@ const SidebarNav = React.memo(function SidebarNav() { disabled={!canBrowseTasks} aria-current={tasksActive ? 'page' : undefined} className={cn( - 'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors', + 'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] font-medium tracking-tight transition-colors', tasksActive ? 'bg-sidebar-accent text-sidebar-accent-foreground' : 'text-sidebar-foreground hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground', !canBrowseTasks && 'cursor-not-allowed opacity-50 hover:bg-transparent' )} > - + Tasks