- Refactored autoImportIfNewer() to use shared importIssuesCore()
- Removed ~200 lines of duplicated import logic from main.go
- Manual and auto-import now use identical collision detection/resolution
- Added auto-export scheduling after successful import (prevents JSONL drift)
- Optimized remapping notification (O(n) instead of O(n²), sorted output)
- Removed obsolete test functions for deleted helper functions
- Use bytes.NewReader instead of string conversion for better performance
Benefits:
- Future bug fixes only need to be made once
- Guaranteed consistency between manual and auto-import
- JSONL stays in sync with database after auto-import
- Clearer, more consistent user feedback
Amp-Thread-ID: https://ampcode.com/threads/T-1925a48d-ca8a-4b54-b4e7-de3ec755d25a
Co-authored-by: Amp <amp@ampcode.com>