From cea1c36d92eded6a98da31508c26fbab6720107f Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Sun, 15 Feb 2026 20:46:18 +0800 Subject: [PATCH] Fix logout, category filter, dialog width, and mark all tests complete - Add logout button to sidebar with destructive hover styling - Fix case-sensitive todo category filter with .toLowerCase() - Widen dialog popups from max-w-lg to max-w-xl with mobile margin - Update CLAUDE.md with commit-and-push instruction - Update progress.md: all CRUD tests verified, all outstanding items resolved Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 3 +++ frontend/src/components/layout/Sidebar.tsx | 21 +++++++++++++++++++-- frontend/src/components/todos/TodosPage.tsx | 2 +- frontend/src/components/ui/dialog.tsx | 2 +- progress.md | 7 +++++-- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f5d8107..a7a0032 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,5 +1,8 @@ # CLAUDE.md - UMBRA +## IMPORTANT: +- When you've completed an edit, commit with details and push to main + ## Hard Rules - **Naive datetimes only.** The DB uses `TIMESTAMP WITHOUT TIME ZONE`. Never send timezone-aware strings (no `Z` suffix, no `.toISOString()`). Use local datetime formatting helpers instead. diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index 5c968f7..15418e6 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -1,4 +1,4 @@ -import { NavLink } from 'react-router-dom'; +import { NavLink, useNavigate } from 'react-router-dom'; import { LayoutDashboard, CheckSquare, @@ -11,8 +11,10 @@ import { ChevronLeft, ChevronRight, X, + LogOut, } from 'lucide-react'; import { cn } from '@/lib/utils'; +import { useAuth } from '@/hooks/useAuth'; import { Button } from '@/components/ui/button'; const navItems = [ @@ -33,6 +35,14 @@ interface SidebarProps { } export default function Sidebar({ collapsed, onToggle, mobileOpen, onMobileClose }: SidebarProps) { + const navigate = useNavigate(); + const { logout } = useAuth(); + + const handleLogout = async () => { + await logout(); + navigate('/login'); + }; + const navLinkClass = ({ isActive }: { isActive: boolean }) => cn( 'flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors', @@ -75,7 +85,7 @@ export default function Sidebar({ collapsed, onToggle, mobileOpen, onMobileClose ))} -
+
{(!collapsed || mobileOpen) && Settings} +
); diff --git a/frontend/src/components/todos/TodosPage.tsx b/frontend/src/components/todos/TodosPage.tsx index 5dc19ca..ace606c 100644 --- a/frontend/src/components/todos/TodosPage.tsx +++ b/frontend/src/components/todos/TodosPage.tsx @@ -32,7 +32,7 @@ export default function TodosPage() { const filteredTodos = todos.filter((todo) => { if (filters.priority && todo.priority !== filters.priority) return false; - if (filters.category && todo.category !== filters.category) return false; + if (filters.category && todo.category?.toLowerCase() !== filters.category.toLowerCase()) return false; if (!filters.showCompleted && todo.completed) return false; if (filters.search && !todo.title.toLowerCase().includes(filters.search.toLowerCase())) return false; diff --git a/frontend/src/components/ui/dialog.tsx b/frontend/src/components/ui/dialog.tsx index 9e83cb7..05faa78 100644 --- a/frontend/src/components/ui/dialog.tsx +++ b/frontend/src/components/ui/dialog.tsx @@ -43,7 +43,7 @@ const DialogContent = React.forwardRef login -> session persistence -> logout -5. **End-to-end CRUD test** - Partially verified: Calendar (create/edit/drag/delete), Projects (create), Dashboard (today's events). Remaining: Todos, Reminders, People, Locations, Settings +4. ~~**Auth flow test**~~ - DONE: PIN setup works, PIN change works, session persistence works, logout added +5. ~~**End-to-end CRUD test**~~ - DONE: All features verified — Calendar, Projects, Todos (create/edit/filter/search), People (CRUD + search), Locations (CRUD + filter), Reminders (CRUD + dismiss), Settings (accent color + PIN) ### Nice to have (polish): 6. ~~**Responsive sidebar**~~ - DONE: Mobile hamburger menu with overlay, desktop collapse/expand