refactor: remove UI-unreachable view-model and export code#40
Merged
Conversation
The ambient UI's command bar is just Capture + Open folder with automatic save and copy, so the manual CopyAsync, SaveAsAsync, Cancel, ReportSaveFailure, SuggestedFileName, and the Fit-era ImageWidth/ImageHeight are unreachable. Remove them along with ImageExportService.SaveAsAsync and its tests. Automatic save/copy and OpenFolder are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
P4suta
enabled auto-merge (squash)
July 23, 2026 00:15
P4suta
added a commit
that referenced
this pull request
Jul 23, 2026
…arden edge cases (DEV-145) (#41) * refactor: remove UI-unreachable status code and dead resource strings (DEV-145) The UI reduction in #35/#39/#40 left status text that never reached the screen. The MainViewModel.StatusMessage property (and its _image companion) was bound by no XAML, so its Status* strings, the StatusText/BusyIndicator automation names (no such elements exist), the CaptureButton.Content/Name keys (the SplitButton has no x:Uid; its label is set in code-behind), and the ErrorClipboard/ErrorSave strings (save/copy failures are only logged) were all dead. Remove the property, the unread _image field, and every orphaned key. Also rename the mis-wired OpenFolderButton.Label (a plain Button has no Label attached property) to a plain OpenFolderLabel key, consumed in code-behind by the accompanying accessibility fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: give the icon-only Open Folder button an accessible name and tooltip The Open Folder button shows only a folder glyph, and its former OpenFolderButton.Label resource was inert (a plain Button has no Label attached property and the button carries no x:Uid), so screen readers announced it with no name. Set AutomationProperties.Name and a tooltip from the OpenFolderLabel resource in code-behind, alongside the other presentation strings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: surface missing resource keys and guard DPI/open-folder edge cases Release-review hardening of paths that failed silently or on unusual input: - ResourceText.Get logs a warning and falls back to the key name when a string is missing (MRT Core returns empty, not an exception), and a new parity test pins the keys referenced from code so a rename fails the build. - MainWindow falls back to 96 DPI when GetDpiForWindow returns 0, so the window is never resized to 0x0. - OpenCaptureDirectory shell-executes the directory itself instead of passing it as an unquoted explorer.exe argument, which would open the wrong folder when the path contains a space. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: tidy README, UI comments, and UI tests after the interface reduction Follow-up wording pass tracking the reduced UI: rewrite the README around the current capture/preview/auto-save flow (drop removed Copy/Save As/Fit/100% and keyboard-shortcut references, add Privacy/License), tighten the MainPage and ZoomableImage comments, and drop the ui-tests assertions for the removed Copy/Save As/StatusText/PreviewScroller controls. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * build: Bump the tests group with 1 update Bumps Microsoft.NET.Test.Sdk from 18.7.0 to 18.8.1 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.8.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: tests ... Signed-off-by: dependabot[bot] <support@github.com> * ci: Bump the actions group across 1 directory with 9 updates Bumps the actions group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` | | [actions/setup-dotnet](https://github.com/actions/setup-dotnet) | `5.2.0` | `6.0.0` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.36.3` | `4.37.3` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.36.3` | `4.37.3` | | [microsoft/setup-WinAppCli](https://github.com/microsoft/setup-winappcli) | `64bc6fd4c3e4c69e2de589dfc34684470891b8b7` | `b93bbddc1f7abc061ca0d3a8119e3a0c7dd71495` | | [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.82.9` | `2.84.1` | | [actions/attest](https://github.com/actions/attest) | `4.1.1` | `4.2.0` | | [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `3.0.1` | `3.0.2` | | [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.36.3` | `4.37.3` | Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@9c091bb...3d3c42e) Updates `actions/setup-dotnet` from 5.2.0 to 6.0.0 - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](actions/setup-dotnet@c2fa09f...a98b568) Updates `github/codeql-action/init` from 4.36.3 to 4.37.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@54f647b...e4fba86) Updates `github/codeql-action/analyze` from 4.36.3 to 4.37.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@54f647b...e4fba86) Updates `microsoft/setup-WinAppCli` from 64bc6fd4c3e4c69e2de589dfc34684470891b8b7 to b93bbddc1f7abc061ca0d3a8119e3a0c7dd71495 - [Release notes](https://github.com/microsoft/setup-winappcli/releases) - [Commits](microsoft/setup-WinAppCli@64bc6fd...b93bbdd) Updates `taiki-e/install-action` from 2.82.9 to 2.84.1 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@4684b84...c44f6b0) Updates `actions/attest` from 4.1.1 to 4.2.0 - [Release notes](https://github.com/actions/attest/releases) - [Changelog](https://github.com/actions/attest/blob/main/RELEASE.md) - [Commits](actions/attest@a1948c3...f7c74d2) Updates `softprops/action-gh-release` from 3.0.1 to 3.0.2 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@718ea10...3d0d988) Updates `github/codeql-action/upload-sarif` from 4.36.3 to 4.37.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@54f647b...e4fba86) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/setup-dotnet dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: github/codeql-action/init dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: microsoft/setup-WinAppCli dependency-version: b93bbddc1f7abc061ca0d3a8119e3a0c7dd71495 dependency-type: direct:production dependency-group: actions - dependency-name: taiki-e/install-action dependency-version: 2.84.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/attest dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.
The ambient UI's command bar is just Capture + Open folder with automatic save and copy, so several members are unreachable from the UI (and tests). Remove them:
MainViewModel:CopyAsync(manual copy),SaveAsAsync(save-as),Cancel,ReportSaveFailure,SuggestedFileName,ImageWidth/ImageHeight(Fit-era).ImageExportService.SaveAsAsyncand its two tests (save-as is gone).Kept: automatic save/copy (
SaveAutomaticallyAsync/CopyAsync),OpenFolder,CreateSuggestedFileName(used by auto-save).Build clean (0/0); tests green (Snaply.Tests 64, Snaply.App.Tests 3).
🤖 Generated with Claude Code