From 8061437304f33edf173c4fec68287ef4a2a19233 Mon Sep 17 00:00:00 2001 From: Chris Scott Date: Sun, 21 Dec 2025 14:28:56 -0500 Subject: [PATCH] Add initial commit for local repos, filter sessions by directory, remove unused priority indicator --- backend/src/services/repo.ts | 2 ++ frontend/src/components/message/TodoItem.tsx | 9 --------- frontend/src/components/session/SessionList.tsx | 8 ++++++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/backend/src/services/repo.ts b/backend/src/services/repo.ts index 1ab6aa2d..b984dc3a 100644 --- a/backend/src/services/repo.ts +++ b/backend/src/services/repo.ts @@ -146,6 +146,8 @@ export async function initLocalRepo( await executeCommand(['git', 'init'], { cwd: fullPath }) + await executeCommand(['git', '-C', fullPath, 'commit', '--allow-empty', '-m', 'Initial commit']) + if (branch && branch !== 'main') { await executeCommand(['git', '-C', fullPath, 'checkout', '-b', branch]) } diff --git a/frontend/src/components/message/TodoItem.tsx b/frontend/src/components/message/TodoItem.tsx index 7a8c4592..6a1f157e 100644 --- a/frontend/src/components/message/TodoItem.tsx +++ b/frontend/src/components/message/TodoItem.tsx @@ -12,12 +12,6 @@ export function TodoItem({ todo, compact = false }: TodoItemProps) { const isCompleted = todo.status === 'completed' const isInProgress = todo.status === 'in_progress' - const priorityColor = todo.priority === 'high' - ? 'bg-red-500' - : todo.priority === 'medium' - ? 'bg-yellow-500' - : 'bg-blue-400' - return (
{isCompleted ? ( @@ -27,9 +21,6 @@ export function TodoItem({ todo, compact = false }: TodoItemProps) { ) : ( )} - {todo.priority && ( - - )} { if (!sessions) return []; - const rootSessions = sessions.filter((session) => !session.parentID); + const rootSessions = sessions.filter((session) => { + if (session.parentID) return false; + if (directory && session.directory && session.directory !== directory) return false; + return true; + }); if (!searchQuery.trim()) return rootSessions; @@ -44,7 +48,7 @@ export const SessionList = ({ return rootSessions.filter((session) => (session.title || "Untitled Session").toLowerCase().includes(query), ); - }, [sessions, searchQuery]); + }, [sessions, searchQuery, directory]); if (isLoading) { return
Loading sessions...
;