Project Management Features
This document describes the Complete, Archive, and Delete functionality added to the Agent Shaker application.
Overview
Projects can now be managed with three key lifecycle actions:
- Complete: Mark a project as completed when work is finished
- Archive: Archive projects that are no longer active but should be preserved
- Delete: Permanently remove a project and all associated data
Features
1. Project Status Management
Projects now support three status values:
active- Project is currently being worked on (green badge)completed- Project has been successfully completed (blue badge)archived- Project has been archived for historical purposes (gray badge)
2. Project Actions Menu
A dropdown menu (⋮) is available in the project detail page header with the following options:
When Project is Active:
- ✓ Mark as Completed - Changes status to
completed - 📦 Archive Project - Changes status to
archived - 🗑️ Delete Project - Permanently removes the project (with confirmation)
When Project is Completed:
- 📦 Archive Project - Changes status to
archived - ↻ Reactivate - Changes status back to
active - 🗑️ Delete Project - Permanently removes the project (with confirmation)
When Project is Archived:
- ↻ Reactivate - Changes status back to
active - 🗑️ Delete Project - Permanently removes the project (with confirmation)
3. Delete Confirmation
When deleting a project, a confirmation modal appears warning that:
- The action cannot be undone
- All agents, tasks, and contexts will be deleted
- User must confirm before deletion proceeds
4. Real-time Updates
Project status changes are broadcast via WebSocket to all connected clients, ensuring:
- Immediate UI updates across all browser tabs
- Synchronized state across team members
- Live status badge updates
API Endpoints
Update Project Status
PUT /api/projects/{id}/status
Content-Type: application/json
{
"status": "completed" | "archived" | "active"
}
Response:
{
"id": "uuid",
"name": "Project Name",
"description": "Project description",
"status": "completed",
"created_at": "2026-01-22T...",
"updated_at": "2026-01-22T..."
}
Errors:
400 Bad Request- Invalid status value404 Not Found- Project doesn't exist500 Internal Server Error- Database error
Delete Project
DELETE /api/projects/{id}
Response:
204 No Content- Successfully deleted404 Not Found- Project doesn't exist500 Internal Server Error- Database error
Implementation Details
Frontend Components
ProjectDetail.vue
Added:
showProjectMenuref for dropdown visibilityshowDeleteProjectConfirmref for delete modalhandleProjectAction(status)- Updates project statusconfirmDeleteProject()- Shows delete confirmationhandleDeleteProject()- Executes project deletionhandleClickOutside()- Closes menu when clicking outside
Projects.vue
Updated:
- Status badge styling for
completed(blue) andarchived(gray) - Conditional rendering based on status
Backend Components
handlers/projects.go
Added:
UpdateProjectStatus()handler- Validates status (active, completed, archived)
- Updates database
- Broadcasts change via WebSocket
cmd/server/main.go
Added route:
PUT /api/projects/{id}/status→UpdateProjectStatus
Store Updates
projectStore.js
Added:
updateProjectStatus(id, status)- API call wrapper- Exported in store interface
api.js
Added:
updateProjectStatus(id, status)- HTTP client method
User Experience
Status Badges
- Active: Green badge with pulsing dot
- Completed: Blue badge with solid dot
- Archived: Gray badge with solid dot
Navigation
After deleting a project:
- User is automatically redirected to the projects list page
- No orphaned pages or broken states
Feedback
- Console logs for debugging (can be replaced with toast notifications)
- Error alerts for failed operations
- Loading states during async operations
Future Enhancements
-
Confirmation for Status Changes
- Add confirmation modals for Complete and Archive actions
- Prevent accidental status changes
-
Bulk Operations
- Select multiple projects
- Batch archive/complete/delete
-
Project Filtering
- Filter projects by status
- Search and sort capabilities
-
Audit Trail
- Track who changed status and when
- History of project lifecycle
-
Soft Delete
- Move to trash instead of permanent deletion
- Recovery option for 30 days
-
Toast Notifications
- Replace console.log and alert with toast notifications
- Better user feedback for all operations
-
Keyboard Shortcuts
- Quick actions via keyboard (e.g., Ctrl+D for delete)
- Improved accessibility
Testing
To test the functionality:
-
Start the backend server:
./server.exe -
Navigate to a project detail page
-
Test Complete:
- Click the ⋮ menu
- Select "Mark as Completed"
- Verify badge changes to blue "completed"
-
Test Archive:
- Click the ⋮ menu
- Select "Archive Project"
- Verify badge changes to gray "archived"
-
Test Reactivate:
- Click the ⋮ menu
- Select "Reactivate"
- Verify badge changes to green "active"
-
Test Delete:
- Click the ⋮ menu
- Select "Delete Project"
- Confirm in the modal
- Verify redirect to projects list
- Confirm project is removed from database
Code Quality
- ✅ No lint errors
- ✅ TypeScript/JavaScript type safety
- ✅ Proper error handling
- ✅ Loading states
- ✅ WebSocket integration
- ✅ Responsive design
- ✅ Accessibility considerations
Database Schema
No schema changes required. The projects table already supports the status field with these values.
Deployment
-
Rebuild the Go binary:
go build -o server.exe .\cmd\server\ -
Restart the server
-
Clear browser cache if needed
-
No database migrations required
Security Considerations
- No authentication/authorization implemented yet
- All users can delete any project
- Consider adding:
- User ownership checks
- Role-based permissions (admin only for delete)
- API rate limiting
Conclusion
The project management features provide a complete lifecycle for projects with clear visual feedback and proper error handling. The implementation follows Vue.js best practices and integrates seamlessly with the existing codebase.