From ad88a34cc7f5ecd0d3befc55c6e0a103b0fecf7a Mon Sep 17 00:00:00 2001 From: Hawkynt Date: Wed, 2 Sep 2026 14:13:01 +0200 Subject: [PATCH 1/2] * TODO.md audited against the tree: 28 shipped items ticked, 2 unfounded ticks removed - checkboxes re-verified one by one against sources, workflows and tests instead of the 2025-09 snapshot - newly true: drag & drop, live target-path preview, batch rename, search and filters, metadata caches, cancellation, duplicate detection tier, benchmarks, headless UI tests, cross-platform CI matrix, coverage, release + NuGet automation, API/architecture/developer docs, video, faces, geo mapping, AI auto-tagging, CLI --verbose - no longer true: the integration-test tier and the end-to-end import workflow test do not exist (only Unit/ plus temp-dir file I/O) - partial items keep their box open and now name what is missing (MaxParallelism has no consumer, no ETA in progress, no global undo, no library thumbnail grid, hardcoded date-source priorities) - UI section retitled Avalonia; Settings dialog and settings persistence notes match SettingsWindow/SettingsService; CLI gains its metadata, faces, regions and models subcommands plus --preserve/--duplicates - dated summary of what landed since 2025-09-10 added at the top --- TODO.md | 138 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 58 deletions(-) diff --git a/TODO.md b/TODO.md index c0eb3bc..6b1abd0 100644 --- a/TODO.md +++ b/TODO.md @@ -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. +- **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 @@ -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 (nothing exercises `ImportManager.ProcessDirectoryAsync`; there is no integration tier, only `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 @@ -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 @@ -63,73 +79,79 @@ - [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 @@ -137,39 +159,39 @@ ## 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) - [ ] Collaborative features -- [ ] Backup and sync capabilities \ No newline at end of file +- [ ] Backup and sync capabilities From 8272344e8bee2cd6afa952fe97d12f3bca94b278 Mon Sep 17 00:00:00 2001 From: Hawkynt Date: Wed, 2 Sep 2026 14:17:04 +0200 Subject: [PATCH 2/2] * mark the four planned features that already shipped The sky segmenter, healing brush, write-back queue and thumbnail pre-cache all exist in Core, so listing them as planned understated the project. The sun/moon item stays open because only the calculator and the arrow data landed - no map view consumes them - and photometric modelling has not been started. --- README.md | 11 ++++++----- TODO.md | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 82c58e2..dd31a00 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/TODO.md b/TODO.md index 6b1abd0..83a7a5a 100644 --- a/TODO.md +++ b/TODO.md @@ -55,7 +55,7 @@ Checklist re-verified against the tree. What landed since 2025-09-10: - [x] MetadataExtractor tests - [x] FileOrganizer tests - [ ] Integration Tests - - [ ] End-to-end import workflow (nothing exercises `ImportManager.ProcessDirectoryAsync`; there is no integration tier, only `Unit/`) + - [ ] 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 (synthesised by `Helpers/TestJpegFactory`)