2024-12-09: Record Editing, Deletion & Data Access
Completed
Soft Delete with Undo
- Delete buttons now use soft delete with 60-second undo window
PendingDeletionstruct tracks deleted records with countdownPendingDeletionRowcomponent shows “Deleted” with timer and Undo button- Records deleted immediately from storage, restored on undo
- Cleanup timer auto-removes expired pending deletions
Open Data Folder
- macOS: “Open Data Folder” button in sidebar opens ~/Documents/Minuta/ in Finder
- iOS: Settings shows data folder path with copy-to-clipboard button
- Added public
storageURLproperty to LocalFileStorageService
TagComboBox Component
- Replaced simple Picker with combobox-style tag selector
- Type to filter existing tags
- Type new name + click “Create” to add new tag inline
- Auto-selects on exact match
- Dropdown with color indicators and checkmark for selected
- Works on both macOS and iOS
Record Editing
- Added
updateRecord()to AppState on both platforms - Running timers now editable inline (tag + comment)
- Completed records have pencil icon to open editor
- macOS: Inline editing with Save/Cancel
- iOS: Sheet-based editing (RecordEditorSheet)
- Start/end time editing via DatePicker (both platforms)
- Duration updates dynamically when editing times
New Components
TagComboBox.swift- Combobox-style tag selectorRecordEditor.swift- Contains:PendingDeletionRow- Shows deleted record with countdown and Undo buttonRunningTimerEditor- Inline editor for running timersEditableRecordRow- Completed record with edit buttonRecordEditorSheet(iOS) - Modal editor for completed records
Files Changed
Shared
FileStorageService.swift- Added publicstorageURLproperty
macOS
TimeTrackerMacApp.swift- AddedupdateRecord(),createTag(),softDeleteRecord(),undoDelete(),pendingDeletionsTodayView.swift- Uses RunningTimerEditor, EditableRecordRow, PendingDeletionRowTagComboBox.swift- New combobox componentRecordEditor.swift- New editor components with PendingDeletionRowContentView.swift- Added “Open Data Folder” button in sidebar
iOS
TimeTrackerIOSApp.swift- AddedupdateRecord(),createTag(),softDeleteRecord(),undoDelete(),pendingDeletionsTodayView.swift- Uses RunningTimerEditor, EditableRecordRow, PendingDeletionRowTagComboBox.swift- New combobox component (iOS-adapted)RecordEditor.swift- New editor components with sheet and PendingDeletionRowSettingsView.swift- Added data folder path display with copy button
Development Notes
- User preference: Always sync changes between macOS and iOS apps simultaneously
- TagComboBox uses platform-specific background colors (#if os(iOS))
- Running timer keeps updating duration while in edit mode
- Soft delete uses 60-second undo window with auto-cleanup timer