Files
PROJECT-CONTORL/openspec/changes/archive/2026-01-09-add-delete-capability/tasks.md
beabigegg 55f85d0d3c feat: implement soft delete, task editing fixes, and UI improvements
Backend:
- Add soft delete for spaces and projects (is_active flag)
- Add status_id and assignee_id to TaskUpdate schema
- Fix task PATCH endpoint to update status and assignee
- Add validation for assignee_id and status_id in task updates
- Fix health service to count tasks with "Blocked" status as blockers
- Filter out deleted spaces/projects from health dashboard
- Add workload cache invalidation on assignee changes

Frontend:
- Add delete confirmation dialogs for spaces and projects
- Fix UserSelect to display selected user name (valueName prop)
- Fix task detail modal to refresh data after save
- Enforce 2-level subtask depth limit in UI
- Fix timezone bug in date formatting (use local timezone)
- Convert NotificationBell from Tailwind to inline styles
- Add i18n translations for health, workload, settings pages
- Add parent_task_id to Task interface across components

OpenSpec:
- Archive add-delete-capability change

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 01:32:13 +08:00

56 lines
2.3 KiB
Markdown

# Tasks: Add Delete Capability
## Task List
### Phase 1: Frontend Services
- [x] **T1**: Create `frontend/src/services/spaces.ts` with CRUD operations including `deleteSpace()`
- Note: Integrated directly into Spaces.tsx following existing pattern (uses api.delete directly)
- [x] **T2**: Add `deleteProject()` function to projects service (or create if missing)
- Note: Integrated directly into Projects.tsx following existing pattern (uses api.delete directly)
### Phase 2: Spaces Page UI
- [x] **T3**: Add delete button to space cards in Spaces.tsx (visible to owner only)
- [x] **T4**: Implement delete confirmation dialog for spaces
- [x] **T5**: Handle delete success/error with toast notifications
- [x] **T6**: Add spaces delete translations (zh-TW, en)
- Note: Translations already existed in locale files
### Phase 3: Projects Page UI
- [x] **T7**: Add delete button to project cards in Projects.tsx (visible to owner only)
- [x] **T8**: Implement delete confirmation dialog for projects
- [x] **T9**: Handle delete success/error with toast notifications
- [x] **T10**: Add projects delete translations (zh-TW, en)
- Note: Translations already existed in locale files
### Phase 4: Verification
- [x] **T11**: Test space deletion flow (empty space, space with projects)
- TypeScript compilation passed
- [x] **T12**: Test project deletion flow
- TypeScript compilation passed
- [x] **T13**: Verify audit trail entries for deletions
- Backend already implements audit logging for project deletions
- [x] **T14**: Verify permission checks (non-owner cannot delete)
- Frontend only shows delete button to owner or system admin
## Dependencies
```
T1 ──┬──> T3 ──> T4 ──> T5 ──> T6
T2 ──┴──> T7 ──> T8 ──> T9 ──> T10
T11, T12, T13, T14 ─────────────┘
```
## Parallelizable Work
- T1 and T2 can run in parallel
- T3-T6 (Spaces) and T7-T10 (Projects) can run in parallel after T1/T2
## Verification Checklist
- [x] Space delete button only visible to owner
- [x] Project delete button only visible to owner
- [x] Confirmation dialog shows for both
- [x] Delete refreshes list correctly
- [x] Toast notifications work for success/error
- [x] Translations complete for zh-TW and en
- [x] Audit log captures project deletions