ITADN
obra/lace/Issues

feat: project deletion and homepage sidebar improvements

#197Pull Requestobra 创建于 2025-08-19已合并
O
obracommented
## Summary This PR implements comprehensive delete functionality for both projects and sessions in the web interface, providing users with clean management capabilities for their workspace. ### Project Deletion - **Homepage Integration**: Added delete buttons to project cards on the homepage with confirmation modals - **Sidebar Management**: Enhanced project selector panel with three-dot context menus (Edit, Launch Agent, Delete) - **Clean Architecture**: Implemented deletion through useProjectManagement hook → ProjectProvider → UI components - **Navigation Handling**: Automatic redirection when deleting currently selected projects ### Session Deletion - **Consistent UI Pattern**: Added three-dot context menus to session list matching project deletion UX - **Context Integration**: Extended SessionProvider to expose deleteSession functionality - **Confirmation Workflow**: Modal confirmation with clear messaging about permanent deletion - **State Management**: Proper cleanup and navigation when deleting active sessions ### Technical Implementation - **REST API Integration**: DELETE endpoints at `/api/projects/[projectId]` and `/api/projects/[projectId]/sessions/[sessionId]` - **Provider Pattern**: Clean separation between data layer (hooks), context layer (providers), and UI layer (components) - **Error Handling**: Comprehensive error handling with user feedback - **Test Coverage**: All 1164 tests passing with proper mocks for context providers - **Type Safety**: Full TypeScript coverage with proper error types and validation ### UX Improvements - **Consistent Design**: Both projects and sessions use identical three-dot menu patterns - **Clear Confirmation**: Explicit warnings about permanent deletion with item names - **Smart Navigation**: Automatic redirection when deleting currently active items - **Loading States**: Proper loading indicators during deletion operations The implementation follows the existing codebase patterns and maintains architectural consistency throughout. 🤖 Generated with [Claude Code](https://claude.ai/code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Home page redesigned with persistent desktop sidebar, mobile slide-in nav, top bar, and animations. - Project deletion added with confirmation in project selector. - Session deletion added with confirmation in session settings; sessions list now has per-session menus (Edit/Delete) and an “Active” badge. - Bug Fixes - Sidebar and task panels now handle missing contexts gracefully, reducing crashes on pages without agent/task data. - Tests - Updated test scaffolding and mocks to cover deletion flows and optional-context usage. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
合并状态:已合并 合并于 2025-08-19 关闭于 2025-08-19 5 条评论