Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ PhotoManager helps photographers and photo enthusiasts:
- ✅ MVC pattern (UI), atomic metadata writes (preserved mtime), comprehensive unit + integration tests

### Planned Features
- [ ] AI sky mask using a dedicated ONNX model (heuristic version is shipped)
- [ ] Sun/moon arrows on the world map (calculator is shipped; map overlay is the follow-up)
- [ ] Healing brush / spot remover
- [x] AI sky mask using a dedicated ONNX model (`OnnxSkySegmenter`, alongside the heuristic `HeuristicSkyMask`)
- [x] Healing brush / spot remover (`HealingBrush`)
- [x] Crash-safe metadata write-back queue (`WriteBackQueue`; pending items persist through an atomic replace)
- [x] Background pre-cache of thumbnails (`ThumbnailPreCacheService`)
- [ ] Sun/moon arrows on the world map — the calculator and the arrow data are shipped
(`SolarLunarCalculator`, `SunMoonArrowData`); no map view consumes them yet
- [ ] Photometric modelling (photogrammetry / surface normals — requires user-story scoping)
- [ ] Crash-safe metadata write-back queue
- [ ] Background pre-cache of thumbnails

## How It Works

Expand Down
138 changes: 80 additions & 58 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# PhotoManager - Development TODO

## Audit (2026-09-02)

Checklist re-verified against the tree. What landed since 2025-09-10:

- **UI moved from WinForms to Avalonia**, so Windows/Linux/macOS run the same front-end.
- **Non-destructive develop pipeline**: `ImageDeveloper`, tone curve, 3D LUTs, film simulation, local adjustments, virtual copies, develop history, compare mode.
- **Restoration + ML stack (ONNX)**: denoise, upscale, colorize (incl. DDColor), inpaint, artifact removal, dehaze, low-light, face restore, depth/bokeh, scratch detection, sky segmentation; NPU/GPU/CPU device selection.
- **Faces & objects**: face detect/embed/cluster, people registry, person timeline, YOLO object detection, tagged regions.
- **Geo**: reverse geocoding, elevation, geofences, KML export, triangulation, photo resection, sun/moon calculations, GPX geotagging, world map, map bookmarks.
- **Compositing**: HDR merge, cylindrical/spherical/tripod panorama stitching, scanned-piece stitching, video frame extraction.
- **Library tooling**: duplicates, burst stacks, smart albums, keyword hierarchy, memories, quality flagging, batch rename, batch date shift, search with saved filters, calendar, slideshow, compare grid.
- **Metadata write path**: XMP sidecars, JPEG/PNG/TIFF/WebP container writers, atomic writes, crash-safe write-back queue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify the write-back queue as not yet integrated

When a UI or CLI metadata write is interrupted by a crash, no pending edit can be recovered: repository-wide production references show that WriteBackQueue is never constructed, started, or enqueued, while the edit paths instantiate CompositeMetadataWriter directly; WriteQueueDialog merely accepts a queue instance and is itself never opened. Calling the crash-safe queue “landed” therefore overstates the reliability users receive and hides the remaining integration work.

Useful? React with 👍 / 👎.

- **Formats**: HEIC, AVIF, JPEG 2000, HDR/EXR, PSD/PSB, APNG, DDS, PCX, ICO via the `Hawkynt.FileFormats.Images` package.
- **Infrastructure**: assemblies and namespaces renamed to `Hawkynt.PhotoManager.*`, NuGet publishing via Trusted Publishing, CI/nightly/release/generate workflows, benchmark project, `AGENTS.md`, generated `REFERENCE.md`, README screenshots generated in CI.

## Recent Completed Tasks (2025-09-08 - 2025-09-10)
- [x] **Resource Localization**: Replaced all hardcoded strings with resource references for internationalization
- [x] **FileInfo/DirectoryInfo Usage**: Improved code quality by using FileInfo and DirectoryInfo instead of string paths where appropriate
Expand All @@ -14,38 +29,39 @@
- [x] Create multi-project solution architecture
- [x] **PhotoManager.Core** - Shared business logic, models, interfaces
- [x] **PhotoManager.Tests** - NUnit test project
- [x] **PhotoManager.UI** - WinForms MVC application
- [x] **PhotoManager.UI** - Avalonia MVC application
- [x] **PhotoManager.CLI** - Command-line interface
- [x] **PhotoManager.Benchmarks** - BenchmarkDotNet suite

### PhotoManager.Core ✅ MOSTLY COMPLETED
- [x] Models
- [x] Move `FileToImport` to Core
- [x] Create `PhotoMetadata` model
- [x] Create `PhotoMetadata` model (shipped as `Metadata/FullMetadata`)
- [x] Create `ImportSettings` model
- [x] Create `ImportResult` model with statistics
- [x] Services
- [x] Move and refactor `ImportManager`
- [x] Create `IMetadataExtractor` interface and implementation
- [x] Create `IMetadataExtractor` interface and implementation (shipped as `IMetadataReader` / `MetadataReader`)
- [x] Create `IDateTimeParser` interface and implementation
- [x] Create `IFileOrganizer` interface and implementation
- [ ] Configuration
- [ ] Create `IConfiguration` interface
- [ ] Create `IConfiguration` interface (no such type in Core; the UI carries its own `ISettingsService`)
- [ ] Implement configuration providers

### PhotoManager.Tests ✅ COMPLETED (96% coverage)
### PhotoManager.Tests ✅ MOSTLY COMPLETED
- [x] Unit Tests
- [x] DateTimeParser tests (filename parsing) - ✅ All tests passing
- [x] ImportManager logic tests
- [x] MetadataExtractor tests
- [x] FileOrganizer tests
- [x] Integration Tests
- [x] End-to-end import workflow
- [x] File system operations
- [ ] Integration Tests
- [ ] End-to-end import workflow (no test exercises `ImportManager.ProcessDirectoryAsync` — only `MainController` calls it; there is no integration tier, just `Unit/`)
- [x] File system operations (real temp-directory I/O in the FileOrganizer and ImportManager tests)
- [x] Test Data
- [x] Sample images with various metadata
- [x] Sample images with various metadata (synthesised by `Helpers/TestJpegFactory`)
- [x] Edge cases and error scenarios

### PhotoManager.UI (WinForms MVC) ✅ COMPLETED
### PhotoManager.UI (Avalonia MVC) ✅ COMPLETED
- [x] Models
- [x] Create ViewModels for data binding
- [x] Implement INotifyPropertyChanged
Expand All @@ -54,7 +70,7 @@
- [x] Main window with menu and toolbar
- [x] Import wizard dialog → Replaced with integrated scan/run workflow
- [x] Progress dialog with cancellation → Integrated into main form
- [x] Settings dialog → Replaced with About dialog and inline settings
- [x] Settings dialog → `SettingsWindow` (theme, library defaults, model folder, geocoder)
- [x] Preview panel for file organization → Implemented with image preview and metadata
- [x] Controllers
- [x] MainController
Expand All @@ -63,113 +79,119 @@
- [x] Infrastructure
- [x] Implement dependency injection
- [x] Add logging framework → Using System.Diagnostics
- [x] Settings persistence → Partially implemented
- [x] Settings persistence → `SettingsService` writes `UserSettingsData` as JSON under AppData
- [x] Resource localization (multi-language support)

### PhotoManager.CLI ✅ MOSTLY COMPLETED
- [x] Command Structure
- [x] `import` - Import and organize files
- [x] `import` - Import and organize files (the root command does this; there is no `import` verb)
- [x] `preview` - Dry run without moving files
- [x] `metadata` - Read/write metadata and sidecars
- [x] `faces` - Face detection and clustering
- [x] `regions` - Region proposals and tagging
- [x] `models` - List/download ONNX models
- [ ] `config` - Manage settings
- [ ] `help` - Display help information (basic help works)
- [ ] `help` - Display help information (only System.CommandLine's `--help`; no `help` subcommand)
- [x] Arguments
- [x] `--source` / `-s` - Source directory
- [x] `--destination` / `-d` - Destination directory (defaults to source)
- [x] `--recursive` / `-r` - Process subdirectories
- [x] `--pattern` / `-p` - Custom naming pattern
- [x] `--dry-run` - Preview without changes
- [ ] `--verbose` / `-v` - Detailed output
- [x] `--verbose` / `-v` - Detailed output
- [x] `--preserve` - Copy instead of move
- [x] `--duplicates` - Duplicate handling strategy
- [ ] `--config` / `-c` - Config file path

## Immediate Priority Tasks

### Bug Fixes
- [x] ✅ Fix ParseDateFromFileName_TwoDigitYear_CorrectCentury test (year 50 should parse as 1950) - COMPLETED 2025-09-10
- [x] ✅ Ensure all tests pass consistently - All 24 tests passing
- [x] ✅ Ensure all tests pass consistently - the suite has grown to ~1100 cases across 148 files; CI is the merge gate on Linux/Windows/macOS

### Configuration & Settings
- [ ] Implement IConfiguration interface in Core
- [ ] Add settings persistence for UI
- [x] Add settings persistence for UI
- [ ] Create config file support for CLI
- [ ] Add user preferences storage
- [x] Add user preferences storage

## Features Enhancement

### Core Functionality
- [ ] Duplicate detection
- [ ] Hash-based comparison
- [ ] Similar image detection
- [ ] User-configurable actions (skip/rename/replace)
- [x] Duplicate detection
- [x] Hash-based comparison (SHA-256 identity check in `FileOrganizer`)
- [x] Similar image detection (`PerceptualHash` + `DuplicateFinder` + duplicates window)
- [x] User-configurable actions (skip/rename/replace) (`DuplicateHandling`: Skip/Rename/Overwrite/Smart)
- [ ] Batch processing improvements
- [ ] Parallel processing with configurable threads
- [ ] Parallel processing with configurable threads (`ImportSettings.MaxParallelism` exists but no consumer; `ImportManager` still walks files serially)
- [ ] Resume capability for interrupted operations
- [ ] Transaction-like rollback on errors
- [ ] Advanced date detection
- [ ] Machine learning for ambiguous dates
- [ ] User-defined patterns
- [ ] User-defined patterns (the format list is hardcoded in `DateTimeParser`)
- [ ] Timezone handling

### User Interface Features
- [ ] Drag & drop support
- [ ] Real-time preview of organization structure
- [ ] Undo/Redo functionality
- [ ] Batch rename tools
- [ ] Filter and search capabilities
- [ ] Thumbnail view with metadata overlay
- [x] Drag & drop support (source tree and file grid accept dropped files)
- [x] Real-time preview of organization structure (live "Target Location" column)
- [ ] Undo/Redo functionality (develop-history rollback and mask undo only; no global undo/redo stack)
- [x] Batch rename tools (`BatchRenameWindow` + `RenameTokenExpander`, plus batch date shift)
- [x] Filter and search capabilities (search window, saved searches, star/label/pick filters)
- [ ] Thumbnail view with metadata overlay (single preview image plus region/face thumbnails; the library grid is still text rows)
- [ ] Statistics dashboard
- [ ] Export reports (CSV, JSON)
- [ ] Export reports (CSV, JSON) (only KML export exists)

### Performance & Reliability
- [ ] Implement caching for metadata
- [ ] Add progress reporting with ETA
- [ ] Implement cancellation tokens
- [ ] Add retry logic for transient failures
- [x] Implement caching for metadata (`MetadataCache`, `PerceptualHashCache`, `ImageEmbeddingCache`, preview/thumbnail caches)
- [ ] Add progress reporting with ETA (percentage only; `ImportProgress` still carries the ETA TODO)
- [x] Implement cancellation tokens
- [ ] Add retry logic for transient failures (only the metadata `WriteBackQueue` retries with backoff; import/organize does not)
- [ ] Optimize memory usage for large batches
- [ ] Add comprehensive error handling

### Configuration & Customization
- [ ] Custom naming patterns with variables
- [ ] Configurable date source priorities
- [x] Custom naming patterns with variables (`--pattern`, `RenameTokenExpander`, default rename template in settings)
- [ ] Configurable date source priorities (the reliability table is hardcoded in `ImportManager`)
- [ ] Plugin architecture for extensions
- [ ] Profile management (different settings per use case)
- [ ] Import/Export settings

## Quality Assurance

### Testing
- [x] Achieve 90% code coverage (Currently at 96%)
- [x] Achieve 90% code coverage (Currently at 96%) (figure not re-measured since 2025-09)
- [x] ✅ Fix failing two-digit year test - COMPLETED 2025-09-10
- [ ] Performance benchmarks
- [x] Performance benchmarks (PhotoManager.Benchmarks, BenchmarkDotNet)
- [ ] Memory leak detection
- [ ] UI automation tests
- [ ] Cross-platform testing (Linux/macOS compatibility)
- [x] UI automation tests (Avalonia headless: smoke, layout and screenshot tests)
- [x] Cross-platform testing (Linux/macOS compatibility) (CI matrix: ubuntu, windows, macos)

### Documentation
- [ ] API documentation
- [ ] User manual
- [ ] Developer guide
- [ ] Architecture documentation
- [ ] Release notes template

### CI/CD
- [ ] GitHub Actions workflow
- [ ] Automated testing on PR
- [ ] Code coverage reports
- [ ] Release automation
- [ ] NuGet package publishing (for Core library)
- [x] API documentation (generated `PhotoManager.Core/REFERENCE.md`)
- [ ] User manual (README covers usage; no standalone manual)
- [x] Developer guide (`AGENTS.md` + README build instructions)
- [x] Architecture documentation (README architecture, project structure and no-database sections)
- [x] Release notes template (`scripts/update-changelog.mjs` buckets commits into the changelog/release notes)

### CI/CD ✅ COMPLETED
- [x] GitHub Actions workflow (ci, nightly, release, generate, shared `_build`)
- [x] Automated testing on PR
- [x] Code coverage reports (coverlet collector; coverage runs in the shared dotnet-ci workflow)
- [x] Release automation (tagged releases plus nightlies with GFS retention)
- [x] NuGet package publishing (for Core library) (`Hawkynt.PhotoManager.Core` via Trusted Publishing)

## Future Enhancements

### Version 2.0
- [ ] Video file support
- [x] Video file support (QuickTime/MP4 recognised by the importer; ffmpeg frame extraction in Core and UI)
- [ ] Cloud storage integration (OneDrive, Google Drive)
- [ ] Face recognition and tagging
- [ ] Geo-location mapping
- [x] Face recognition and tagging (detection, embedding, clustering, people registry, timelines)
- [x] Geo-location mapping (world map, map picker, bookmarks, reverse geocoding, GPX)
- [ ] Social media metadata extraction

### Version 3.0
- [ ] Web interface
- [ ] Mobile app companion
- [ ] AI-powered auto-tagging
- [x] AI-powered auto-tagging (CLIP encoders + `AutoKeywordTagger` + auto-keyword scan window)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep AI auto-tagging open until tokenization is wired

For the normal auto-keyword UI flow, AutoKeywordScanWindow constructs OnnxClipTextEncoder without supplying a tokenizer, so it uses WhitespaceByteTokenizer; that class explicitly states it is only a test placeholder and that a real SigLIP model requires a matching SentencePiece tokenizer. Consequently, downloading the registered SigLIP models can produce failed or meaningless text embeddings rather than useful tags, so this user-facing feature should not be marked complete yet.

Useful? React with 👍 / 👎.

- [ ] Collaborative features
- [ ] Backup and sync capabilities
- [ ] Backup and sync capabilities
Loading