Commit Graph

56 Commits

Author SHA1 Message Date
joakim 6e6c3dbea4 Implement opal-task Phases 6-8: Complete CLI Implementation
Phase 6: Display and Basic Commands
- Add display.go with colored formatting for tasks, projects, tags
- Implement cmd/root.go with Cobra command structure
- Implement cmd/list.go for listing and filtering tasks
- Implement cmd/add.go with support for regular and recurring tasks
- Implement cmd/done.go with bulk completion and confirmation

Phase 7: Advanced Commands
- Implement cmd/modify.go for updating task attributes
- Implement cmd/delete.go with soft delete confirmation
- Implement cmd/start.go and cmd/stop.go for task timing
- Implement cmd/count.go for counting filtered tasks
- Implement cmd/projects.go and cmd/tags.go for aggregation

Phase 8: Integration and Polish
- Update main.go to use CLI commands
- Add colored output with fatih/color
- Format task lists with proper alignment
- Highlight overdue tasks in red, upcoming in yellow
- Test end-to-end workflow: add, list, done, recurring tasks
- Verify recurrence spawning works correctly

All CLI commands functional and tested!
2026-01-04 18:17:04 +01:00
joakim cb4b7ac14b Implement opal-task Phase 5: Recurrence Implementation
- Complete SpawnNextInstance() for creating recurring task instances
- Implement automatic next instance spawning on task completion
- Add support for 'until' date to expire recurrences
- Copy tags from template to new instances
- Add comprehensive recurrence tests (6 tests, all passing)
- Test pattern parsing, formatting, next due calculation
- Test end-to-end recurring task workflow
- Test expiration with until dates
2026-01-04 18:13:32 +01:00
joakim 9704731739 Implement opal-task Phase 4: WorkingSet
- Implement BuildWorkingSet() to create ephemeral display ID mappings
- Implement LoadWorkingSet() to restore from database
- Add GetTaskByDisplayID() for ID resolution
- Add GetTasks() and Size() helper methods
- Persist working set to SQLite working_set table
- Add comprehensive tests (5 tests, all passing)
- Support filtered working sets
2026-01-04 18:11:59 +01:00
joakim c99a4a2d95 Implement opal-task Phase 3: Filter and Modifier Parsing
- Add filter.go: Parse filters (+tag, -tag, attribute:value, IDs)
- Implement Filter.ToSQL() for WHERE clause generation
- Add modifier.go: Parse modifiers (set/clear attributes, add/remove tags)
- Implement Modifier.Apply() to update existing tasks
- Add dateparse.go: Smart date parsing (ISO, today, tomorrow, weekdays)
- Implement nextWeekday logic (smart Sunday interpretation)
- Update GetTasks() to accept Filter parameter
- Add CreateTaskWithModifier() for task creation with modifiers
- Add comprehensive test suite (13 new tests, all passing)
- Support filtering by status, project, priority, tags, UUIDs, display IDs
- Support modifying priority, project, dates, recurrence, tags
2026-01-04 14:48:43 +01:00
joakim 7c6ec97c62 Implement opal-task Phase 2: Core Task Model CRUD
- Add complete CRUD operations: CreateTask, GetTask, GetTasks, Save
- Implement tag operations: AddTag, RemoveTag, GetTags
- Add task lifecycle methods: Complete, Delete, StartTask, StopTask
- Implement SQL type conversion helpers for nullable fields
- Add comprehensive test suite with 9 passing tests
- Fix timestamp handling (Created/Modified as Unix timestamps)
- Implement soft delete (status change) and hard delete options
2026-01-04 14:44:24 +01:00
joakim 9b5261b34c Implement opal-task Phase 1: Database foundation
- Add SQLite database with schema for tasks, tags, and working_set
- Implement config management with Viper (opal.yml)
- Create Task struct with proper types (*time.Time, Priority int)
- Add database migration system
- Implement recurrence pattern parsing (1d, 1w, 1m, 1y)
- Setup project structure with cmd/ and internal/engine/
- Add dependencies: sqlite3, uuid, cobra, viper, color
2026-01-04 14:41:16 +01:00