Skip to content

Feature/settings persistence refactor - #136

Merged
dimitar-radenkov merged 6 commits into
masterfrom
feature/settings-persistence-refactor
Jul 19, 2026
Merged

Feature/settings persistence refactor#136
dimitar-radenkov merged 6 commits into
masterfrom
feature/settings-persistence-refactor

Conversation

@dimitar-radenkov

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 19, 2026 11:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 UserSettings properties.
  • Centralizes hotkey display/matching via HotkeyBinding and extracts OCR lasso interaction into OcrLassoController.
  • Refactors tray icon actions to use ICaptureLaunchService + event aggregator “request” messages, and moves DI registration into AppServiceRegistration.

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
@dimitar-radenkov
dimitar-radenkov merged commit 501f1a7 into master Jul 19, 2026
5 checks passed
@dimitar-radenkov
dimitar-radenkov deleted the feature/settings-persistence-refactor branch July 21, 2026 04:10
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.

2 participants