Skip to content

feat(core,ui): add pipeline architecture with input overlay feedback#84

Merged
TimGels merged 12 commits intomainfrom
feature/input-page-overlay
Feb 27, 2026
Merged

feat(core,ui): add pipeline architecture with input overlay feedback#84
TimGels merged 12 commits intomainfrom
feature/input-page-overlay

Conversation

@TimGels
Copy link
Copy Markdown
Owner

@TimGels TimGels commented Feb 23, 2026

This pull request introduces a new composable pipeline architecture for file scanning, metadata refresh, track configuration, and validation in the MatroskaBatchFlow.Core project. 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:

  • Added IPipelineStage interface and PipelineContext class to define composable pipeline stages and shared per-run context, including well-known keys in PipelineContextKeys. [1] [2] [3]

New pipeline stage implementations:

  • Introduced ScanFilesStage, RefreshStaleMetadataStage, InitializeTrackConfigStage, and ValidateStage classes 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:

  • Updated IFileScanner and its implementation to support progress reporting during scanning and improved batch file analysis logic. [1] [2] [3] [4]

Validation logic cleanup:

  • Removed legacy event-driven validation triggers and associated logging, simplifying ValidationStateService and its logging partial class. [1] [2] [3] [4] [5]

Logging and configuration:

- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/FileScanner for 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.

- 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
@TimGels TimGels force-pushed the feature/input-page-overlay branch from f896825 to 5096f89 Compare February 27, 2026 21:25
@TimGels TimGels merged commit 9375a5a into main Feb 27, 2026
6 checks passed
@TimGels TimGels deleted the feature/input-page-overlay branch February 27, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve user feedback during file scanning and re-scanning operations

2 participants