Feature/recent captures tray menu - #94
Merged
Merged
Conversation
Added AutomationProperties.AutomationId to annotation tool buttons in overlay and recording windows. Introduced new automation IDs for settings and recording UI. Enhanced AutomationApp with radio/list selection helpers. Added smoke and interaction tests for annotation tools, recording HUD, and settings navigation to improve UI automation coverage and reliability.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR adds plumbing for a new recent-captures tray menu in Pointframe, the desktop capture/annotation app, and also expands UI automation coverage around settings, annotation tools, and recording HUD interactions.
Changes:
- Add capture-completed messaging from the overlay copy flow into the tray icon manager, with a new “Recent captures” tray submenu.
- Add automation IDs plus new desktop smoke tests for settings section navigation, annotation tool selection, and recording HUD interactions.
- Bump the app version to 5.5 and refresh the README highlights section.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
version.json |
Bumps the application version to 5.5. |
README.md |
Renames/reworks the highlights section and removes the comparison table. |
Pointframe/ViewModels/OverlayViewModel.cs |
Changes copy behavior to save a PNG and publish a capture-completed event. |
Pointframe/Services/TrayIconManager.cs |
Adds recent-captures tray menu state, menu construction, and open actions. |
Pointframe/Services/Messaging/CaptureCompletedMessage.cs |
Introduces the event payload for completed captures. |
Pointframe/Services/ITrayIconManager.cs |
Extends the tray manager contract with capture-completed handling. |
Pointframe/RecordingOverlayWindow.xaml |
Adds automation IDs to recording annotation tool buttons. |
Pointframe/OverlayWindow.xaml |
Adds automation IDs to overlay annotation tool buttons. |
Pointframe/App.xaml.cs |
Wires capture-completed subscriptions into app startup/shutdown and tray handling. |
Pointframe.Tests/ViewModels/OverlayViewModelTests.cs |
Updates copy-command unit test setup for filesystem interaction. |
Pointframe.AutomationTests/Support/AutomationIds.cs |
Adds constants for new settings/overlay/recording automation IDs. |
Pointframe.AutomationTests/Support/AutomationApp.cs |
Adds hover, radio-button, and list-item automation helpers. |
Pointframe.AutomationTests/Smoke/SettingsSectionNavigationTests.cs |
Adds smoke tests for settings section navigation and reset/default actions. |
Pointframe.AutomationTests/Smoke/RecordingHudInteractionTests.cs |
Adds smoke tests for pause/resume and compact HUD interactions. |
Pointframe.AutomationTests/Smoke/RecordingAnnotationToolSmokeTests.cs |
Adds smoke coverage for recording annotation tool selection. |
Pointframe.AutomationTests/Smoke/AnnotationToolSmokeTests.cs |
Adds smoke coverage for overlay annotation tool selection and copy flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+110
to
+117
| var saveDirectory = _settings.Current.ScreenshotSavePath; | ||
| _fileSystemService.CreateDirectory(saveDirectory); | ||
| var savePath = _fileSystemService.CombinePath(saveDirectory, $"Snip_{DateTime.Now:yyyyMMdd_HHmmss}.png"); | ||
| using var outputStream = _fileSystemService.OpenWrite(savePath); | ||
| var encoder = new PngBitmapEncoder(); | ||
| encoder.Frames.Add(BitmapFrame.Create(finalBitmap)); | ||
| encoder.Save(outputStream); | ||
| _ = _eventAggregator.Publish(new CaptureCompletedMessage(savePath)); |
| { | ||
| return; | ||
| } | ||
|
|
Comment on lines
+171
to
+179
| settingsMock.SetupGet(s => s.Current).Returns(new UserSettings()); | ||
| var clipboardMock = new Mock<IClipboardService>(); | ||
| var captureMock = new Mock<IOverlayBitmapCapture>(); | ||
| var bitmap = CreateBitmap(); | ||
| captureMock.Setup(c => c.ComposeBitmap()).Returns(bitmap); | ||
| var vm = Vm(settingsMock, clipboardMock: clipboardMock); | ||
| var fileSystemMock = new Mock<IFileSystemService>(); | ||
| fileSystemMock.Setup(f => f.OpenWrite(It.IsAny<string>())).Returns(new System.IO.MemoryStream()); | ||
| fileSystemMock.Setup(f => f.CombinePath(It.IsAny<string>(), It.IsAny<string>())).Returns("snip.png"); | ||
| var vm = Vm(settingsMock, clipboardMock: clipboardMock, fileSystemMock: fileSystemMock); |
Comment on lines
+112
to
+121
| public void HandleCaptureCompleted(string outputPath) | ||
| { | ||
| _recentCaptures.RemoveAll(p => string.Equals(p, outputPath, StringComparison.OrdinalIgnoreCase)); | ||
| _recentCaptures.Insert(0, outputPath); | ||
| if (_recentCaptures.Count > MaxRecentItems) | ||
| { | ||
| _recentCaptures.RemoveRange(MaxRecentItems, _recentCaptures.Count - MaxRecentItems); | ||
| } | ||
|
|
||
| RebuildRecentCapturesMenu(); |
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.