Open
Description
Description
Add file operations (rename, delete, reorder) to gist editor.
Priority
HIGH - Critical for managing multi-file gists effectively.
Tasks
- Implement file rename functionality
- Add drag-and-drop file reordering
- Create file deletion with confirmation
- Add bulk file operations
- Implement file type detection
- Add file size validation
- Create undo/redo for file operations
- Handle edge cases (empty names, duplicates)
Technical Requirements
- File operations must maintain data integrity
- Implement proper validation for file names
- Enforce file count limit (20 files max)
- Enforce file size limit (500KB per file)
- Total gist size limit (5MB)
- Drag-and-drop must be accessible
- Support keyboard-only file management
Acceptance Criteria
- Files can be renamed without data loss
- Reordering is smooth and persists
- Deletion requires confirmation
- File limits are enforced
- Operations can be undone
- Duplicate file names are prevented
- Empty file names are not allowed
- Drag-and-drop works on desktop and mobile
Dependencies
- Issue docs: update project documentation and add Claude Code narrative #112 (Edit Flow)
- Existing components:
- FileList
- FileEditor
- AddFileButton
- Dialog (for confirmations)
Implementation Details
- Use react-sortable-hoc or similar for drag-and-drop
- Implement command pattern for undo/redo
- Store operation history in component state
- Add visual feedback during operations
- Use optimistic updates for better UX
Estimated Time
3-4 days
References
- Phase 6 Tracking:
docs/PHASE_6_ISSUE_TRACKING.md
(Issue feat: implement storage operations with retry logic (#104) #113) - API Specification:
docs/SPEC.md
(file limits) - File size and count limits from spec