- Add migration v2: source column on change_log to distinguish local
vs sync-originated entries, preventing the echo loop where synced
tasks get re-pushed as local changes
- PushChanges handler now skips save when server version is newer
- Client PushChanges/pushQueuedChanges collect and report marshal errors
instead of silently dropping them
- De-duplicate getLocalChanges/getLastSyncTime into exported sync
package functions
- Fix logConflict winner detection via pointer identity instead of
fragile UUID+timestamp comparison
- Fix sync down to actually parse, save, and tag-sync pulled changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add completion command for bash/zsh/fish/powershell generation. Organize
help text using Cobra command groups (Task Commands, Reports, Other).
Register dynamic ValidArgsFunction on filter-accepting commands to
suggest +tag and project:name completions from the database.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Separate configuration from data storage and make paths configurable
via environment variables and command-line flags. This improves
Unix/Linux compliance and supports both development and production
deployments.
Key changes:
- Separate config dir (opal.yml) from data dir (database, logs)
- Support XDG Base Directory specification
- Add --config-dir and --data-dir flags
- Environment variables: OPAL_CONFIG_DIR, OPAL_DATA_DIR, OPAL_DB_PATH
- Smart fallback: /etc/opal, /var/lib/opal -> ~/.config/opal, ~/.local/share/opal
- Server mode validates required OAuth/JWT environment variables
- Update naming from 'jade' to 'opal' throughout
- Update systemd service name to 'opal.service'
- Add migration guide in README
Default paths:
- Config: /etc/opal (fallback: ~/.config/opal)
- Data: /var/lib/opal (fallback: ~/.local/share/opal)
Files modified:
- internal/engine/config.go: New directory resolution logic
- internal/engine/database.go: Auto-create data directory
- cmd/root.go: Add global flags for directory overrides
- cmd/server.go: Add configuration validation
- cmd/sync.go, internal/sync/*: Use new path helper functions
- tests: Update to use directory overrides
- docs: Update deployment guide and README
- Implement ProgressReporter interface with InteractiveProgress and NoOpProgress
- Add real-time progress bars using go-pretty/progress library
- Track 6 sync phases: connection test, queue push, pull, parse, apply, and server push
- Add --quiet flag to suppress progress output
- Auto-detect TTY to disable progress when piped/redirected
- Show task-level progress during apply phase with descriptions
- Display percentage complete and elapsed time for each phase
- Added 'opal sync merge' command for initial database merge
- Support for merge strategies: prefer-local, prefer-server, smart (default)
- Offline queue already implemented in Phase 2
- Conflict warning display already implemented in Phase 2-3
- Full offline mode support with automatic queueing when server unreachable
- Created comprehensive sync command suite:
- 'opal sync init' - Configure sync with server (URL, API key)
- 'opal sync status' - Show sync configuration and queue status
- 'opal sync now' - Bidirectional sync with conflict resolution
- 'opal sync up' - Push local changes to server
- 'opal sync down' - Pull server changes to local
- 'opal sync log' - View conflict resolution log
- Added interactive prompts for init (URL and API key)
- Automatic client ID generation (UUID)
- Display user-friendly sync results with emojis
- Support for viewing queued offline changes
- Integration with config system for persistent sync settings