Skip to content

refactor: pre-release cleanup — remove UI-unreachable dead code and harden edge cases (DEV-145)#41

Merged
P4suta merged 6 commits into
mainfrom
feature/dev-145-unbind-statustext-deadcode-cleanup
Jul 23, 2026
Merged

refactor: pre-release cleanup — remove UI-unreachable dead code and harden edge cases (DEV-145)#41
P4suta merged 6 commits into
mainfrom
feature/dev-145-unbind-statustext-deadcode-cleanup

Conversation

@P4suta

@P4suta P4suta commented Jul 23, 2026

Copy link
Copy Markdown
Owner

概要

リリース前の総片付けと全体レビュー。Linear 残課題 DEV-145 を起点に、UI 縮小(#35/#39/#40)で取り残されたデッドコード/デッドリソースを一掃し、レビューで見つかった具体的なエッジケースを修正した。

あわせて、レビュー時点でオープンだった Dependabot PR(#37 / #38)を本 PR に取り込んで一本化した(順次マージによる CI 再実行・rebase 待ちを避けるため)。本 PR のマージで #37 / #38 は不要になる(superseded)。

変更内容

デッドコード削除(DEV-145 + 追加検出)

  • MainViewModel.StatusMessage(どの XAML にもバインドされておらず UI 未到達)と未読フィールド _image を削除。
  • 未使用リソースを 3 ロケール一括削除: Status*StatusText/BusyIndicator の automation 名(該当要素なし)、CaptureButton.Content/.Name(SplitButton に x:Uid 無し)、ErrorClipboard/ErrorSave(保存/コピー失敗はログのみ)。

アクセシビリティ修正

  • アイコンのみの Open Folder ボタンにアクセシブル名とツールチップを付与(旧 OpenFolderButton.Label は素の Button に無効な添付プロパティで未適用だった)。OpenFolderLabel キーへリネームし code-behind から設定。

リリース前レビューでの堅牢化

  • ResourceText.Get: キー欠落時(MRT Core は空文字を返す)に警告ログ + キー名フォールバック。code-behind が使うリテラルキーの存在を検証するパリティテストを追加。
  • MainWindow: GetDpiForWindow が 0 を返した場合に 96 DPI へフォールバック(0×0 リサイズ防止)。
  • OpenCaptureDirectory: ディレクトリを直接 shell-execute(空白を含むパスで誤フォルダを開く問題を回避)。

ドキュメント/コメント整理

  • README を現行フローに合わせて刷新、削除済み UI/ショートカット参照を除去、Privacy/License 追加。MainPage/ZoomableImage コメントと ui-tests を整理。

取り込んだ依存更新(Dependabot #37 / #38

  • Microsoft.NET.Test.Sdk 18.7.0 → 18.8.1(tests)
  • GitHub Actions グループ 9件更新(SHA 固定: checkout v7.0.1 / setup-dotnet v6.0.0 / attest v4.2.0 / action-gh-release v3.0.2 / codeql-action v4.37.3 / taiki-e/install-action v2.84.1 ほか)

検証

  • dotnet build(ソリューション、x64): 警告 0 / エラー 0
  • dotnet test: 68 件成功・スキップ 0(新パリティテスト含む)
  • dotnet format --verify-no-changes: 変更なし
  • ⚠️ ui-tests.ps1(UIAutomation)はローカル未実行 → CI の release-qa に委任。

レビューで分離した追跡課題(本 PR では未対応)

  • DEV-147 (High): GPU デバイス消失回復がフレーム取得経路に限定。
  • DEV-148 (Low): 領域選択中の Dispose で不完全なシャットダウン。
  • DEV-149 (Low): 自動保存/コピー失敗がユーザー未通知(既存 UX ギャップ)。

Closes DEV-145 / Supersedes #37, #38

🤖 Generated with Claude Code

P4suta and others added 6 commits July 23, 2026 22:02
… (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>
…ltip

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>
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>
…ction

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>
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>
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>
@P4suta
P4suta merged commit 29b707a into main Jul 23, 2026
9 checks passed
@P4suta
P4suta deleted the feature/dev-145-unbind-statustext-deadcode-cleanup branch July 23, 2026 13:41
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.

1 participant