- Created sync client for communicating with API server
- Implemented conflict resolution strategies (last-write-wins, server-wins, client-wins)
- Added offline change queue for queuing changes when server is unreachable
- Implemented merge logic for local and remote task lists
- Added conflict logging to sync_conflicts.log
- Created bidirectional sync with pull/push operations
- Extended Config struct with sync settings (URL, API key, client ID, strategy, offline queue)
- Added SyncResult display with user-friendly output
- Sync handlers already implemented in Phase 1 (GetChanges, PushChanges)
Replace manual string-based table formatting with jedib0t/go-pretty/v6/table
library to fix alignment issues with Norwegian characters (æøå) and ANSI
color codes.
Changes:
- Migrate FormatTaskList() to use go-pretty table
- Migrate FormatTaskDetail() to use clean table format
- Migrate FormatProjects() and FormatTagCounts() for consistency
- Remove truncate() function (no longer needed)
- Configure StyleLight with Unicode box-drawing characters
- Set proper column widths and alignment
Fixes:
- Priority column now center-aligned under 'Pri'
- Norwegian characters (æøå) display and align correctly
- Tags column properly aligned
- Description field truncates at 40 chars with proper UTF-8 handling
- All ANSI color codes handled automatically
- Consistent formatting across all table views
All existing color functions work unchanged. UTF-8 and ANSI codes are
handled automatically by go-pretty's width calculation.
When creating recurring tasks, modifiers (due, wait, priority, etc) were
not being applied because AttributeOrder was not copied to the temporary
modifier. This caused all date attributes to be ignored.
Refactored addRecurringTask to:
- Create task structs directly instead of using CreateTask (avoiding
premature saves)
- Use ApplyToNew() instead of Apply() for modifiers before first save
- Properly copy AttributeOrder when building the temporary modifier
- Save template and instance once with all fields correctly set
This ensures recurring tasks now properly have due dates, wait dates,
and other modifiers applied when created via 'opal add' or batch import.
- Add 'opal info' command to display detailed task information
- Shows all task attributes including UUID, timestamps, and metadata
- Supports flexible syntax (opal info 2 or opal 2 info)
- Displays recurrence information and parent UUID for recurring tasks
- Add 'opal edit' command to edit tasks in $EDITOR
- Opens task in text editor with human-readable format
- Supports all editable fields with smart date formatting
- Special handling for recurring tasks (updates parent template)
- Status changes trigger appropriate methods (Complete/Delete)
- Auto-saves changes on editor exit without confirmation
- Clear validation and error messages
- Register new commands in root command dispatcher
Previously, only numeric forms (1d, 1w, 1m, 1y) and plural word forms
(days, weeks, months, years) were supported for recurrence patterns.
The common adverbial forms (daily, weekly, monthly, yearly) would fail
with 'invalid recurrence pattern' error.
Now users can use natural language recurrence patterns:
- recur:daily -> 1 day interval
- recur:weekly -> 7 day interval
- recur:monthly -> 30 day interval
- recur:yearly -> 365 day interval
Added test coverage for all four new patterns.
Previously, 'opal -h', 'opal --help', and 'opal help' would show the
list command help instead of the root command help. This was because
the argument preprocessing logic would rewrite these as 'opal list -h'
before Cobra could handle them.
Now we detect help flags/command before preprocessing and let Cobra
handle them naturally. This ensures:
- 'opal -h' and 'opal --help' show root help
- 'opal help' shows root help
- 'opal help <command>' shows command-specific help
- 'opal <command> -h' still shows command-specific help
- All existing flexible syntax continues to work
- Mark all features as implemented ✅
- Add comprehensive examples for all date formats
- Document configuration options
- Add examples for time of day, period boundaries, and relative expressions
- Include chaining examples and use cases
- Add parseRelativeExpression() to detect pattern: attr+/-duration
- Add resolveDateValue() to resolve absolute or relative dates
- Add applyDateAttribute() helper for date attributes with relative support
- Track attribute order in Modifier struct (AttributeOrder field)
- Refactor Apply() and ApplyToNew() to process attrs in order
- Support chaining: due:mon scheduled:due-3d wait:scheduled-1d
- Support addition and subtraction: due+1y, wait-2d
- Add comprehensive test suite for relative expressions
- Error if referencing undefined date attribute
- All 38+ tests passing
- Add month name parsing (jan, january, feb, etc.) with year logic
- Add day+month parsing (21jan, Jan21, 21January, etc.) in all case variations
- Add period boundaries (sod, eod, sow, eow, som, eom, soy, eoy)
- Add special keywords (later, someday -> 2150-01-01)
- Add duration-as-date offset (2d, 3w, etc. means X from now)
- Add named duration aliases (daily, weekly, monthly, yearly)
- Enhance ParseRecurrencePattern to support min, sec, hrs and word forms
- Implement time-of-day parsing (mon:15:35, tomorrow:0800, 15:35)
- Add comprehensive test suite (50+ tests total)
- All tests passing
- Add WeekStartDay and DefaultDueTime fields to Config struct
- Set defaults: week_start_day=monday, default_due_time=empty
- Add GetWeekStart() and GetDefaultDueTime() helper methods
- Update ParseDate() to use configured week start day
- All tests passing
- Create DateParser struct with configurable base time and week start
- Add placeholder methods for new parsing features
- Implement time-of-day parsing foundation (splitDateTime, parseTimeOfDay)
- Maintain backward compatibility with existing ParseDate() function
- Update tests to use new DateParser API
- All 33 existing tests passing
Issue 1: Fix recurrence calculation for overdue tasks
- Use completion date (End) as base for next instance, not original due date
- If task due Monday completed Wednesday, next is Wednesday+7d not Monday+7d
- Fallback to Due date if End is not set
- Update test to verify new behavior
Issue 2: Fix description parsing to work without quotes
- Add parseAddArgs() to extract description from non-modifier words
- Description = all words that don't start with +, -, or contain :
- Enables: opal add buy groceries +shop carrots → 'buy groceries carrots'
- Validate description is required (error if only modifiers)
- Validate recurring tasks require due date
Issue 3: Implement flexible command syntax
- Add preprocessArgs() to parse arguments before Cobra routing
- Detect command position and split filters (left) from modifiers (right)
- Rewrite os.Args so Cobra routes correctly
- Enable both 'opal 2 done' and 'opal done 2' syntax
- Commands without modifiers accept filters on either side
- Commands with modifiers enforce [filters] command [modifiers]
- Add confirmation for modify without filters (modifies all tasks)
All commands updated to use preprocessed ParsedArgs from context.
All tests passing (33 tests).
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!
- 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
- 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
- Implement openDepository function in cmd/root.go to open the depository directory in $EDITOR
- Falls back to vi if $EDITOR is not set
- Update README.md with new usage section documenting bare 'jade' command
- Include config.go changes that move config location to depository/.jade/
Complete implementation of note management CLI with all core features:
Commands:
- add: Create new notes in $EDITOR with auto-generated filenames
- list: Display all notes with titles, paths, and tags
- search: Full-text search via ripgrep, tag-based filtering
- tags: List all tags with occurrence counts
- edit: Fuzzy search and edit notes by title
- rm: Move notes to trash with confirmation prompt
Features:
- Automatic depository structure initialization (.jade/trash/)
- Configurable tag prefix (default '+')
- Parse title from first # heading (filename fallback)
- Extract tags anywhere in content
- Parse both [[wiki-links]] and [markdown](links)
- Trash system with timestamps to prevent conflicts
Technical:
- Global config at ~/.config/jade/config.yml
- Per-depository settings support
- Ripgrep integration for fast search
- $EDITOR integration for note editing
- Comprehensive README with usage examples