feat(core,ui): add pipeline architecture with input overlay feedback#84
Merged
feat(core,ui): add pipeline architecture with input overlay feedback#84
Conversation
- Introduce IPipelineStage, PipelineContext, and PipelineContextKeys abstractions in Core for composable stage-based operations - Add Core stages: ScanFilesStage, RefreshStaleMetadataStage, InitializeTrackConfigStage, ValidateStage - Add Uno stages: FilterDuplicateFilesStage, AddFilesToBatchStage, RemoveFilesFromBatchStage - Add PipelineRunner with sequential execution and minimum overlay duration (350ms) for user-visible stage feedback - Add BatchOperationOrchestrator composing stages into import, remove, and revalidate operations - Add InputOperationFeedbackService publishing overlay state via events - Add InputOperationOverlay UserControl bound to ViewModel state - Refactor InputViewModel to delegate to orchestrator - Refactor SettingsViewModel to use orchestrator for revalidation - Remove CollectionChanged-based reactive revalidation from ValidationStateService - Add IProgress support to IFileScanner.ScanAsync - Extract LoggerMessage definitions into .Logging.cs partial files - Add and update unit tests for all new and modified components
There was a problem hiding this comment.
Pull request overview
Adds a composable, stage-based pipeline for batch file operations (scan → refresh stale metadata → init track config → validate) and introduces an input overlay/progress mechanism in the Uno UI to improve user feedback during long-running operations (issue #66).
Changes:
- Introduces Core pipeline abstractions (
IPipelineStage,PipelineContext,PipelineContextKeys) and stage implementations (scan, refresh stale metadata, init track config, validate). - Adds Uno pipeline runner + batch operation orchestrator, and integrates overlay feedback into
InputViewModel/InputPage. - Updates
IFileScanner/FileScannerfor progress reporting; removes legacy event-driven validation triggers and updates tests accordingly.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/MatroskaBatchFlow.Uno.UnitTests/Services/InputOperationFeedbackServiceTests.cs | Adds unit tests for overlay feedback state publication/clearing. |
| tests/MatroskaBatchFlow.Uno.UnitTests/Services/BatchOperationOrchestratorTests.cs | Verifies stage composition and context setup for batch operations. |
| tests/MatroskaBatchFlow.Uno.UnitTests/Presentation/SettingsViewModelTests.cs | Updates tests for strictness changes triggering orchestrated revalidation. |
| tests/MatroskaBatchFlow.Uno.UnitTests/Presentation/InputViewModelTests.cs | Updates removal flow to use async commands and orchestrator. |
| tests/MatroskaBatchFlow.Core.UnitTests/Services/FileValidation/ValidationStateServiceTests.cs | Aligns tests with explicit revalidation (no collection-changed auto-trigger). |
| tests/MatroskaBatchFlow.Core.UnitTests/Services/FileScannerTests.cs | Adds progress-reporting test for scanning. |
| src/MatroskaBatchFlow.Uno/Services/Pipeline/RemoveFilesFromBatchStage.cs | Adds pipeline stage to remove files from batch via adapter. |
| src/MatroskaBatchFlow.Uno/Services/Pipeline/PipelineRunner.cs | Adds sequential stage runner that manages overlay feedback/progress. |
| src/MatroskaBatchFlow.Uno/Services/Pipeline/PipelineRunner.Logging.cs | Adds LoggerMessage definitions for pipeline runner. |
| src/MatroskaBatchFlow.Uno/Services/Pipeline/FilterDuplicateFilesStage.cs | Adds stage to filter duplicates and notify user via dialog message. |
| src/MatroskaBatchFlow.Uno/Services/Pipeline/FilterDuplicateFilesStage.Logging.cs | Adds LoggerMessage for duplicate filtering stage. |
| src/MatroskaBatchFlow.Uno/Services/Pipeline/AddFilesToBatchStage.cs | Adds stage to add scanned files to batch via adapter. |
| src/MatroskaBatchFlow.Uno/Services/InputOperationFeedbackService.cs | Adds singleton service to publish/clear overlay state. |
| src/MatroskaBatchFlow.Uno/Services/BatchOperationOrchestrator.cs | Adds orchestrator composing pipelines for import/remove/revalidate. |
| src/MatroskaBatchFlow.Uno/Services/BatchOperationOrchestrator.Logging.cs | Adds LoggerMessage for orchestrator. |
| src/MatroskaBatchFlow.Uno/Presentation/SettingsViewModel.cs | Switches revalidation trigger to orchestrator-based pipeline call. |
| src/MatroskaBatchFlow.Uno/Presentation/InputViewModel.cs | Integrates orchestrator + overlay state; converts remove commands to async. |
| src/MatroskaBatchFlow.Uno/Presentation/InputPage.xaml | Wraps ListView in Grid and adds overlay control bindings. |
| src/MatroskaBatchFlow.Uno/Presentation/Controls/InputOperationOverlay.xaml.cs | Adds overlay UserControl dependency properties. |
| src/MatroskaBatchFlow.Uno/Presentation/Controls/InputOperationOverlay.xaml | Adds overlay UI (message + progress bar + counts). |
| src/MatroskaBatchFlow.Uno/Models/InputOperationOverlayState.cs | Adds immutable overlay state snapshot model. |
| src/MatroskaBatchFlow.Uno/Extensions/ServiceCollectionExtensions.cs | Registers new pipeline services, orchestrator, and feedback service. |
| src/MatroskaBatchFlow.Uno/Contracts/Services/IPipelineRunner.cs | Adds runner contract for sequential stage execution with overlay management. |
| src/MatroskaBatchFlow.Uno/Contracts/Services/IInputOperationFeedbackService.cs | Adds contract for publishing overlay state to UI. |
| src/MatroskaBatchFlow.Uno/Contracts/Services/IBatchOperationOrchestrator.cs | Adds orchestrator contract for batch-mutating operations. |
| src/MatroskaBatchFlow.Uno/App.xaml.cs | Wires pipeline service registrations into app host configuration. |
| src/MatroskaBatchFlow.Core/Services/Pipeline/ValidateStage.cs | Adds stage that triggers full batch revalidation. |
| src/MatroskaBatchFlow.Core/Services/Pipeline/ScanFilesStage.cs | Adds stage to scan files with progress reporting into pipeline context. |
| src/MatroskaBatchFlow.Core/Services/Pipeline/ScanFilesStage.Logging.cs | Adds LoggerMessage definitions for scanning stage. |
| src/MatroskaBatchFlow.Core/Services/Pipeline/RefreshStaleMetadataStage.cs | Adds stage to rescan stale files and migrate config/clear flags. |
| src/MatroskaBatchFlow.Core/Services/Pipeline/RefreshStaleMetadataStage.Logging.cs | Adds LoggerMessage definitions for stale metadata refresh stage. |
| src/MatroskaBatchFlow.Core/Services/Pipeline/InitializeTrackConfigStage.cs | Adds stage to init track config and apply processing rules with progress. |
| src/MatroskaBatchFlow.Core/Services/IFileScanner.cs | Extends ScanAsync contract to accept progress reporter. |
| src/MatroskaBatchFlow.Core/Services/FileValidation/ValidationStateService.cs | Removes automatic file-list-change revalidation trigger. |
| src/MatroskaBatchFlow.Core/Services/FileValidation/ValidationStateService.Logging.cs | Removes logging tied to legacy collection-changed auto-revalidation. |
| src/MatroskaBatchFlow.Core/Services/FileScanner.cs | Implements progress reporting during analysis and tweaks file enumeration. |
| src/MatroskaBatchFlow.Core/Abstractions/Pipeline/PipelineContextKeys.cs | Adds well-known context keys for pipeline stage IO. |
| src/MatroskaBatchFlow.Core/Abstractions/Pipeline/PipelineContext.cs | Adds per-run context bag for passing values between stages. |
| src/MatroskaBatchFlow.Core/Abstractions/Pipeline/IPipelineStage.cs | Adds pipeline stage abstraction with overlay/progress metadata. |
| .serena/project.yml | Adds Serena config override placeholder for symbol_info_budget. |
src/MatroskaBatchFlow.Core/Services/Pipeline/InitializeTrackConfigStage.cs
Outdated
Show resolved
Hide resolved
src/MatroskaBatchFlow.Core/Services/FileValidation/ValidationStateService.cs
Show resolved
Hide resolved
- Add IsAborted property to PipelineContext for early pipeline termination - PipelineRunner checks IsAborted after each stage and breaks the loop - FilterDuplicateFilesStage sets IsAborted when all files are duplicates - Add PipelineRunnerTests covering abort, normal flow, and feedback cleanup - Add FilterDuplicateFilesStageTests covering abort and non-abort scenarios
…etween file iterations - Add SemaphoreSlim to PipelineRunner to serialize concurrent RunAsync calls, preventing interleaved batch mutations and premature overlay clearing - Make InitializeTrackConfigStage.ExecuteAsync truly async by yielding after each file so the overlay and progress bar stay responsive during large batches - Add LogRunQueued warning for diagnostics when a caller has to wait
…sponsive - Add RevalidateAsync to IValidationStateService and ValidationStateService - Snapshot file list and settings on the calling (UI) thread before going off-thread, since ObservableCollection is not thread-safe - Run CPU-bound validation work in Task.Run; continuation resumes on the original synchronization context so UpdateState and StateChanged remain safe for UI-bound subscribers - Update ValidateStage.ExecuteAsync to await RevalidateAsync
- Add tests covering: overlay publish/clear semantics, determinate progress updates, non-overlay stages, per-stage overlay ordering, cancellation, and concurrent run serialization via SemaphoreSlim
…espace - Move IPipelineStage, PipelineContext, PipelineContextKeys from Abstractions/Pipeline/ to Services/Pipeline/ - Update namespace from MatroskaBatchFlow.Core.Abstractions.Pipeline to MatroskaBatchFlow.Core.Services.Pipeline - Update all using directives across core, ui, and test projects
…InputOperationOverlayState property
f896825 to
5096f89
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new composable pipeline architecture for file scanning, metadata refresh, track configuration, and validation in the
MatroskaBatchFlow.Coreproject. The changes include new abstractions for pipeline stages and context, implementation of several pipeline stage classes, improvements to file scanning progress reporting, and cleanup of legacy validation logic. These updates enable sequential, modular processing of files with clear progress tracking.Pipeline architecture and abstractions:
IPipelineStageinterface andPipelineContextclass to define composable pipeline stages and shared per-run context, including well-known keys inPipelineContextKeys. [1] [2] [3]New pipeline stage implementations:
ScanFilesStage,RefreshStaleMetadataStage,InitializeTrackConfigStage, andValidateStageclasses to handle scanning, refreshing stale metadata, initializing track configs, and validation respectively, each with progress and overlay support. [1] [2] [3] [4]File scanning improvements:
IFileScannerand its implementation to support progress reporting during scanning and improved batch file analysis logic. [1] [2] [3] [4]Validation logic cleanup:
ValidationStateServiceand its logging partial class. [1] [2] [3] [4] [5]Logging and configuration:
Resolves: Improve user feedback during file scanning and re-scanning operations #66