From e9a4dd03198cf8a2c96c0ad9150fc05e2fdad87f Mon Sep 17 00:00:00 2001 From: Cody Seibert Date: Tue, 9 Dec 2025 23:07:40 -0500 Subject: [PATCH] feat(sidebar, settings): enhance project management and UI navigation - Removed trash functionality from the sidebar component, including the associated button and event handlers. - Added a new "Danger Zone" section in the settings view for project deletion, featuring a confirmation dialog. - Implemented smooth scrolling and active section highlighting in the settings sidebar for improved navigation. - Updated various UI elements for better consistency and responsiveness. These changes streamline project management and enhance user experience within the application. --- app/src/components/layout/sidebar.tsx | 100 ++------ app/src/components/views/board-view.tsx | 34 ++- app/src/components/views/settings-view.tsx | 260 +++++++++++++++++++-- 3 files changed, 281 insertions(+), 113 deletions(-) diff --git a/app/src/components/layout/sidebar.tsx b/app/src/components/layout/sidebar.tsx index f47c23e4..43021508 100644 --- a/app/src/components/layout/sidebar.tsx +++ b/app/src/components/layout/sidebar.tsx @@ -10,14 +10,11 @@ import { FileText, LayoutGrid, Bot, - ChevronLeft, - ChevronRight, Folder, X, Wrench, PanelLeft, PanelLeftClose, - Sparkles, ChevronDown, Check, BookOpen, @@ -28,9 +25,7 @@ import { import { DropdownMenu, DropdownMenuContent, - DropdownMenuItem, DropdownMenuTrigger, - DropdownMenuSeparator, } from "@/components/ui/dropdown-menu"; import { Dialog, @@ -84,7 +79,6 @@ interface SortableProjectItemProps { index: number; currentProjectId: string | undefined; onSelect: (project: Project) => void; - onTrash: (project: Project) => void; } function SortableProjectItem({ @@ -92,7 +86,6 @@ function SortableProjectItem({ index, currentProjectId, onSelect, - onTrash, }: SortableProjectItemProps) { const { attributes, @@ -151,19 +144,6 @@ function SortableProjectItem({ )} - - {/* Move to trash */} - ); } @@ -179,7 +159,6 @@ export function Sidebar() { setCurrentProject, setCurrentView, toggleSidebar, - moveProjectToTrash, restoreTrashedProject, deleteTrashedProject, emptyTrash, @@ -272,22 +251,6 @@ export function Sidebar() { } }, [addProject, setCurrentProject]); - const handleTrashProject = useCallback( - (project: Project) => { - const confirmed = window.confirm( - `Move "${project.name}" to Trash?\nThe folder stays on disk until you delete it from Trash.` - ); - if (!confirmed) return; - - moveProjectToTrash(project.id); - setIsProjectPickerOpen(false); - toast.success("Project moved to Trash", { - description: `${project.name} was removed from the sidebar.`, - }); - }, - [moveProjectToTrash] - ); - const handleRestoreProject = useCallback( (projectId: string) => { restoreTrashedProject(projectId); @@ -571,7 +534,7 @@ export function Sidebar() { title="New Project" data-testid="new-project-button" > - + New @@ -583,13 +546,23 @@ export function Sidebar() { data-testid="open-project-button" > - - Open - {ACTION_SHORTCUTS.openProject} + )} @@ -646,23 +619,10 @@ export function Sidebar() { setCurrentProject(p); setIsProjectPickerOpen(false); }} - onTrash={handleTrashProject} /> ))} - - { - e.preventDefault(); - setShowTrashDialog(true); - }} - className="text-destructive focus:text-destructive" - data-testid="manage-trash" - > - - Manage Trash ({trashedProjects.length}) - @@ -767,38 +727,8 @@ export function Sidebar() { {/* Bottom Section - User / Settings */}
- {/* Trash + Settings Links */} + {/* Settings Link */}
-
- {/* Content Area */} -
-
- {/* API Keys Section */} -
-
-
- -

- API Keys -

+ {/* Content Area with Sidebar */} +
+ {/* Sticky Side Navigation */} + + + {/* Scrollable Content */} +
+
+ {/* API Keys Section */} +
+
+
+ +

+ API Keys +

+
+

+ Configure your AI provider API keys. Keys are stored locally in + your browser. +

-

- Configure your AI provider API keys. Keys are stored locally in - your browser. -

-
{/* Claude/Anthropic API Key */}
@@ -391,7 +499,10 @@ export function SettingsView() {
{/* Appearance Section */} -
+
@@ -569,7 +680,10 @@ export function SettingsView() {
{/* Kanban Card Display Section */} -
+
@@ -647,7 +761,10 @@ export function SettingsView() {
{/* Feature Defaults Section */} -
+
@@ -689,6 +806,51 @@ export function SettingsView() {
+ {/* Delete Project Section - Only show when a project is selected */} + {currentProject && ( +
+
+
+ +

+ Danger Zone +

+
+

+ Permanently remove this project from Automaker. +

+
+
+
+
+
+ +
+
+

+ {currentProject.name} +

+

+ {currentProject.path} +

+
+
+ +
+
+
+ )} + {/* Save Button */}
+
+ + {/* Delete Project Confirmation Dialog */} + + + + + + Delete Project + + + Are you sure you want to move this project to Trash? + + + + {currentProject && ( +
+
+ +
+
+

+ {currentProject.name} +

+

+ {currentProject.path} +

+
+
+ )} + +

+ The folder will remain on disk until you permanently delete it from Trash. +

+ + + + + +
+
); }