From e6d61d2f6c9dc6404092753458170899e06ebd65 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 1 May 2026 22:04:55 -0700 Subject: [PATCH] feat(sidebar): add Search button to nav, restore task-provider icons (#1339) Co-authored-by: Orca --- src/renderer/src/App.tsx | 23 +---- .../src/components/sidebar/SidebarNav.tsx | 99 ++++++++++++++----- 2 files changed, 76 insertions(+), 46 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 7a70fc75a..32d34ac9f 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -2,7 +2,7 @@ import { lazy, Suspense, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' import { DEFAULT_STATUS_BAR_ITEMS, DEFAULT_WORKTREE_CARD_PROPERTIES } from '../../shared/constants' -import { ArrowLeft, ArrowRight, Minimize2, PanelLeft, PanelRight, Search } from 'lucide-react' +import { ArrowLeft, ArrowRight, Minimize2, PanelLeft, PanelRight } from 'lucide-react' import { FOCUS_TERMINAL_PANE_EVENT, SYNC_FIT_PANES_EVENT, @@ -869,27 +869,6 @@ function App(): React.JSX.Element { ) : null} - {/* Why: always rendered (not gated on showSidebar) because the - worktree palette is global — it mirrors the ⌘J/Ctrl+Shift+J - shortcut which is live from every view including Settings and - Landing. The `sidebar-toggle` class is the shared titlebar - icon-button style used by back/forward/sidebar-toggle/right- - sidebar neighbors; the name is historical and applies to any - titlebar icon button, not only sidebar toggles. */} - - - - - - {`Search (${isMac ? '⌘J' : 'Ctrl+Shift+J'})`} - - {/* Why: Back/Forward traverse mixed worktree + Tasks history, so the cluster is shown wherever the history shortcut is live (terminal or diff --git a/src/renderer/src/components/sidebar/SidebarNav.tsx b/src/renderer/src/components/sidebar/SidebarNav.tsx index 5d1c9478a..3bae4d9bd 100644 --- a/src/renderer/src/components/sidebar/SidebarNav.tsx +++ b/src/renderer/src/components/sidebar/SidebarNav.tsx @@ -1,13 +1,24 @@ import React from 'react' -import { List } from 'lucide-react' +import { Github, List, Search } from 'lucide-react' import { useAppStore } from '@/store' import { useRepoMap } from '@/store/selectors' import { cn } from '@/lib/utils' import { isGitRepoKind } from '../../../../shared/repo-kind' import { getTaskPresetQuery, PER_REPO_FETCH_LIMIT } from '@/lib/new-workspace' +const isMac = typeof navigator !== 'undefined' && navigator.userAgent.includes('Mac') + +function LinearIcon({ className }: { className?: string }): React.JSX.Element { + return ( + + + + ) +} + const SidebarNav = React.memo(function SidebarNav() { const openTaskPage = useAppStore((s) => s.openTaskPage) + const openModal = useAppStore((s) => s.openModal) const activeView = useAppStore((s) => s.activeView) const repos = useAppStore((s) => s.repos) const repoMap = useRepoMap() @@ -45,34 +56,74 @@ const SidebarNav = React.memo(function SidebarNav() { const tasksActive = activeView === 'tasks' - if (!showTasksButton) { - return null - } - return (
+ {showTasksButton ? ( + + ) : null}
)