Feature/settings persistence refactor - #136
Merged
Merged
Conversation
…ests for UserSettings
…OcrLassoController and add unit tests for HotkeyBinding
… AddPointframeAppServices method
…window requests and recording trim
… microphone management; add unit tests for RecordingMicrophoneSession
There was a problem hiding this comment.
Pull request overview
Refactors settings/hotkey-related logic to reduce duplication and hard-to-maintain persistence paths, while moving several UI-triggered actions (tray/menu) onto the event aggregator and introducing small controller/value types to centralize behavior.
Changes:
- Reworks settings persistence cloning and adds round-trip tests to prevent silent loss of new
UserSettingsproperties. - Centralizes hotkey display/matching via
HotkeyBindingand extracts OCR lasso interaction intoOcrLassoController. - Refactors tray icon actions to use
ICaptureLaunchService+ event aggregator “request” messages, and moves DI registration intoAppServiceRegistration.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Pointframe/Views/SettingsWindow.xaml.cs | Deduplicates modifier-hotkey capture display updates. |
| Pointframe/Views/OverlayWindow.xaml.cs | Extracts OCR lasso logic; consolidates dismiss-layer handling and shortcut matching. |
| Pointframe/Views/OverlayWindow.Recording.cs | Avoids repeated Screen.FromRectangle calls when building recording geometry. |
| Pointframe/ViewModels/SettingsViewModel.cs | Consolidates overlay shortcut metadata/logic and uses HotkeyBinding for display/conflicts. |
| Pointframe/ViewModels/OverlayViewModel.cs | Uses HotkeyBinding for overlay shortcut display names. |
| Pointframe/Services/Recording/ScreenRecordingService.cs | Introduces microphone-session wrapper + cleanup helpers for recording lifecycle. |
| Pointframe/Services/Recording/RecordingMicrophoneSession.cs | New: encapsulates per-recording microphone mute state capture/restore. |
| Pointframe/Services/Messaging/TrimRecordingRequestedMessage.cs | New: event-aggregator message for trim requests. |
| Pointframe/Services/Messaging/ShowSettingsWindowRequestedMessage.cs | New: event-aggregator message for opening Settings. |
| Pointframe/Services/Messaging/ShowLibraryWindowRequestedMessage.cs | New: event-aggregator message for opening Library. |
| Pointframe/Services/Messaging/ShowAboutWindowRequestedMessage.cs | New: event-aggregator message for opening About. |
| Pointframe/Services/Messaging/OpenImageRequestedMessage.cs | New: event-aggregator message for open-image flow. |
| Pointframe/Services/Infrastructure/UserSettingsService.cs | Switches Clone to JSON round-trip to avoid per-property copy omissions. |
| Pointframe/Services/Infrastructure/TrayIconManager.cs | Routes tray/menu actions through capture-launch + event aggregator messages. |
| Pointframe/Services/Annotation/OcrLassoController.cs | New: owns OCR lasso pointer lifecycle + OCR invocation. |
| Pointframe/Models/HotkeyBinding.cs | New: centralizes hotkey display name and matching semantics. |
| Pointframe/AppServiceRegistration.cs | New: central DI registration extension for app services/windows/factories. |
| Pointframe/App.xaml.cs | Uses AddPointframeAppServices; converts tray actions to message subscriptions; simplifies window activation. |
| Pointframe.Tests/Services/TrayIconManagerTests.cs | Updates tests for event-based tray actions; adds click-forwarding coverage. |
| Pointframe.Tests/Services/SettingsRoundTripTests.cs | New: guards against settings property drop across persistence paths. |
| Pointframe.Tests/Services/RecordingMicrophoneSessionTests.cs | New: verifies microphone session state capture/restore behavior. |
| Pointframe.Tests/OverlayWindowInteractionTests.cs | Updates OCR-lasso tests to use OcrLassoController. |
| Pointframe.Tests/Models/HotkeyBindingTests.cs | New: tests HotkeyBinding display + match behavior. |
| Pointframe.Tests/AppTests.cs | Updates DI registration test to AddPointframeAppServices. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+106
to
+109
| _viewModel.IsTextLassoActive = false; | ||
| _lassoRect.Visibility = Visibility.Collapsed; | ||
| _lassoStart = null; | ||
| return true; |
…ation; update OverlayWindowInteractionTests to verify annotation canvas behavior
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.
No description provided.