From 32a6ecfb9a496e495bb5f242470c7e217dc5e6c8 Mon Sep 17 00:00:00 2001 From: David Kaya Date: Sun, 22 Mar 2026 22:11:14 +0100 Subject: [PATCH] refactor: remove sidebar filter chips for now Filters will be redesigned later. Search remains functional. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/renderer/components/Sidebar.tsx | 56 ++--------------------------- 1 file changed, 3 insertions(+), 53 deletions(-) diff --git a/src/renderer/components/Sidebar.tsx b/src/renderer/components/Sidebar.tsx index 9f8fa34..752a1c8 100644 --- a/src/renderer/components/Sidebar.tsx +++ b/src/renderer/components/Sidebar.tsx @@ -24,7 +24,7 @@ import { import type { OrchestrationMode, PatternDefinition } from '@shared/domain/pattern'; import { isScratchpadProject, type ProjectRecord } from '@shared/domain/project'; -import type { SessionRecord, SessionStatus } from '@shared/domain/session'; +import type { SessionRecord } from '@shared/domain/session'; import { querySessions } from '@shared/domain/sessionLibrary'; import type { WorkspaceState } from '@shared/domain/workspace'; @@ -68,37 +68,6 @@ function relativeTime(iso: string): string { return new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric' }); } -/* ── Filter toggle ──────────────────────────────────────────── */ - -function FilterToggle({ - label, - active, - dotColor, - onClick, -}: { - label: string; - active: boolean; - dotColor: string; - onClick: () => void; -}) { - return ( - - ); -} - /* ── Context menu item ─────────────────────────────────────── */ function ActionMenuItem({ @@ -400,13 +369,8 @@ export function Sidebar({ /* ── Search & filter state ─────────────────────────────────── */ const [searchText, setSearchText] = useState(''); - const [filterRunning, setFilterRunning] = useState(false); - const [filterErrored, setFilterErrored] = useState(false); - const [filterPinned, setFilterPinned] = useState(false); - const [filterIncludeArchived, setFilterIncludeArchived] = useState(false); - const isQueryActive = - searchText.trim().length > 0 || filterRunning || filterErrored || filterPinned || filterIncludeArchived; + const isQueryActive = searchText.trim().length > 0; const patternMap = useMemo(() => { const map = new Map(); @@ -417,21 +381,14 @@ export function Sidebar({ const queryResults = useMemo(() => { if (!isQueryActive) return []; - const statuses: SessionStatus[] = []; - if (filterRunning) statuses.push('running'); - if (filterErrored) statuses.push('error'); - const results = querySessions(workspace, { searchText: searchText.trim() || undefined, - statuses: statuses.length > 0 ? statuses : undefined, - onlyPinned: filterPinned || undefined, - includeArchived: filterIncludeArchived || undefined, }); return results .map((r) => workspace.sessions.find((s) => s.id === r.sessionId)) .filter((s): s is SessionRecord => s !== undefined); - }, [workspace, searchText, filterRunning, filterErrored, filterPinned, filterIncludeArchived, isQueryActive]); + }, [workspace, searchText, isQueryActive]); /* ── Context menu state ────────────────────────────────────── */ @@ -508,13 +465,6 @@ export function Sidebar({ )} - -
- setFilterRunning(!filterRunning)} /> - setFilterErrored(!filterErrored)} /> - setFilterPinned(!filterPinned)} /> - setFilterIncludeArchived(!filterIncludeArchived)} /> -
{/* New session CTA */}