15 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 b2f8982ee6 chore(release): 2.1.0 (#35)
* test(ui): keep the capture modes in a static array (CA1861)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(release): 2.1.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:15:08 +00:00
poli0981andClaude Opus 5.5 3f90cbe19a feat(a11y): keyboard region selection, screen-reader announcements and accessibility statement (#34)
- Region overlay: arrow keys move, Shift+arrows resize, Ctrl for 1-pixel
  steps, Tab/Shift+Tab switch monitor, Enter/Esc; keys held as temporary
  hotkeys (arrows auto-repeat, callbacks run in press order).
- LiveRegion behavior and Announcer: status text and notifications are
  announced to screen readers; notifications honour Windows' duration.
- Hotkey recorder: Tab/Shift+Tab leave without saving (Shift+Tab was saved
  as the hotkey); buttons named with their mode and binding.
- List items expose their badges; About cards named; disclaimer headings.
- Tray icon: Enter / Shift+F10 after Win+B; page transitions follow
  Windows' animation setting; contrast colours in the region overlay.
- ACCESSIBILITY.md, accessibility issue template, PR checklist, docs sync.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:09:46 +00:00
poli0981andClaude Opus 5.5 da9bcae691 chore(release): 2.0.3 (#33)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 00:39:06 +00:00
poli0981andClaude Opus 5.5 72ad7d9e36 chore(release): 2.0.2 (#29)
- Version 2.0.2; CHANGELOG [2.0.2] - 2026-10-26 (also the release and in-app update notes):
  the .NET 10.0.14 security update as the minimum runtime, Microsoft.Extensions 10.0.14.
- Lock files refreshed for the project versions.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:29:38 +00:00
poli0981andClaude Opus 5.5 ec4046c385 chore(deps): require .NET 10.0.14, update Microsoft.Extensions, CsWin32 and CI actions (#28)
.NET 10.0.14 (October 25, 2026) is an out-of-band security release
(CVE-2026-111497 Brotli decoder, re-issued CVE-2026-70197 and
CVE-2026-102870).

- Velopack framework dependency net10-x64-desktop -> net10.0.14-x64-desktop:
  Setup and the in-app updater install the latest .NET 10 Desktop Runtime
  when only an older patch is present (the updater asks first, silent: false).
- Microsoft.Extensions.* 10.0.13 -> 10.0.14, SDK 10.0.401 -> 10.0.403.
- Microsoft.Windows.CsWin32 0.3.363 -> 0.3.367 (build-time only).
- markdownlint-cli2-action v25.0.0, codeql-action/upload-sarif v4.39.1,
  zizmor-action v0.8.0.
- DependencyManifestTests: THIRD_PARTY_NOTICES.md must list exactly the
  app's locked packages at their locked versions, and vpk must match the
  Velopack library.
- README, RELEASING, PRIVACY, notices and release body mention the minimum
  runtime patch.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:15:29 +00:00
poli0981andClaude Opus 5.5 f345769e75 refactor: follow the analyzer suggestions SonarQube Cloud reports (#27)
The first CI-based analysis of main imported 104 info-level Roslyn
suggestions as issues (Sonar's own rules found nothing). Applied the fixes
the IDE offers, one diagnostic at a time:

- IDE0290: primary constructors (28 types). Fields stay readonly and are
  initialized from the parameters; <param> docs moved to the type.
- MVVMTK0042: [ObservableProperty] on public partial properties instead of
  fields (70 properties); initializers still set the backing field silently.
  UpdateViewModel's constructor now sets Status through the property, before
  anything subscribes.
- SYSLIB1054: CreateDirect3D11DeviceFromDXGIDevice uses [LibraryImport].
- IDE0007 / IDE0028: var, collection expression.
- Tests: index the monitor list directly (CA1826); seal
  ResxLocalizationServiceTests like the other disposable test classes (CA1816).
- Long primary-constructor parameter lists are wrapped one per line.
- CLAUDE.md: note that SonarQube Cloud reports these suggestions.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 06:38:16 +07:00
poli0981andClaude Opus 5.5 926dfd2d72 fix: 2.0.1 — clipboard-only errors, HDR infinity pixels, Steam scan retry, readable About page (#25)
* fix: clipboard-only errors, non-finite HDR pixels, Steam scan retry, readable pages

- Clipboard-only captures that could not be copied were reported as successful although
  nothing was saved or copied; they now fail with the new CaptureError.ClipboardFailure and
  its message in all 11 languages.
- The HDR tone mapper turned +infinity into black (inf / inf = NaN) and let a NaN channel
  skip the highlight roll-off. Channels are now read as 0 for NaN/negative values and capped
  at the largest half value, so infinite highlights become white.
- SteamLibraryScanner cached a failed scan in its Lazy<T> and rethrew it on every lookup.
  An unreadable library is now skipped, and a failed scan is retried a minute later.
- Pages set the theme's text colour as their Foreground: a Page in a Frame does not inherit
  it, so unstyled text (About's component names and disclaimer headings) was drawn dim grey.
- The library grid lays thumbnails out from the left edge (SpacingMode None) instead of
  spreading the leftover width around them.
- About: the capture notice no longer mentions the GDI PrintWindow fallback removed in 2.0.0,
  and the translation notice points to src/CaptureImage.ViewModels/Resources/Strings/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(release): 2.0.1

- Version 2.0.1; CHANGELOG [2.0.1] - 2026-10-19 (also the release and in-app update notes).
- Lock files refreshed for the project versions.
- README screenshots re-rendered with 2.0.1 (demo data, hidden desktop): readable About text and
  the left-aligned library grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:58:46 +07:00
poli0981andClaude Opus 5.5 7d68be7c7f feat!: CaptureImage 2.0 — WPF UI, per-mode hotkeys, multi-monitor, HDR, library, game profiles (#22)
* refactor(core)!: v2 capture model, settings v3, profiles, coordinator

- remove the WinUI projects (replaced by WPF in this branch); resx files and
  ResxLocalizationService move to ViewModels so they stay framework-agnostic
- capture model: CaptureMode (Window/Region/Monitor), CaptureSource,
  CaptureOptions, MonitorInfo/HdrInfo, PixelRect; frames carry a pixel format
  (BGRA8 or scRGB FP16) so HDR captures flow through the pipeline
- HdrToneMapper (scRGB -> sRGB with a C1-continuous highlight shoulder),
  FrameOperations (crop, force opaque)
- AppSettings v3: one hotkey per mode, HDR/PNG/cursor/window-frame options,
  start-with-Windows, arm-on-startup, game profiles; unknown fields round-trip
  via JsonExtensionData; SettingsMigrator moves v1/v2 files forward
- GameProfile + ProfileResolver (exe path > exe name > Steam AppId)
- FileNameStrategy: fixed Windows-invalid set, strips bidi/zero-width
  characters, guards CON/NUL/COM1..., caps length, working {counter}, {Mode}
- CaptureFileWriter: encode off-thread to .tmp, move without overwrite, retry on
  name races, optional JPEG XR HDR sidecar
- CaptureCoordinator replaces the Stateless state machine and the duplicated
  save pipeline in DashboardViewModel: one capture at a time (busy requests are
  ignored instead of throwing), cancellable countdown/selection/preview,
  frozen-snapshot region capture across monitors, profile auto-arm
- interfaces for the WinEvent watcher, RegisterHotKey service, display/HDR
  info, region selector, library, shell, sound, autostart, diagnostics

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(infra)!: RegisterHotKey, WinEvent watcher, WGC monitor/HDR capture, WIC

- hotkeys: Win32 RegisterHotKey on a dedicated message-loop thread (no global
  keyboard *and mouse* hook any more), MOD_NOREPEAT, real conflict detection,
  temporary keys for the region overlay; SharpHook and HotkeyConflictSniffer gone
- window list: SetWinEventHook (create/destroy/show/hide/rename/minimize/
  foreground) replaces WMI polling every 2 s; TargetCatalog runs off the UI thread,
  skips cloaked windows and reads exe paths with QueryFullProcessImageName (works
  for elevated games); bounded LRU icon cache
- DisplayService: monitors in physical pixels with DPI, HDR state per output via
  IDXGIOutput6 on every adapter, SDR white level via DisplayConfig
- WgcCaptureEngine: window and monitor sources, BGRA8 or FP16 HDR, client-area /
  ContentSize crop on the GPU, cancellable timeout, late frames disposed, device
  lost -> recreate and retry once, no RCW leaks (vtable interop), safe readback
- encoders: SkiaSharp (PNG with selectable zlib level, JPEG 4:4:4 at q>=90, WebP)
  without extra copies or premultiplied-alpha transparency; WIC for TIFF and the
  JPEG XR HDR sidecar
- JsonSettingsStore v3: real atomic replace, serialized writes, backups of
  corrupt/older/newer files, v1 file adopted from the install folder, validated
  import that rejects UNC output folders
- CaptureLibraryService (index + WIC thumbnails + Recycle Bin), ShellService,
  SoundService, PerformanceModeService (EcoQoS), AutostartService,
  DiagnosticsExporter, OCR from BGRA frames with cached engines, Velopack 1.2
  WaitExitThenApplyUpdates, log path redaction, VDF depth limit
- packages: + Microsoft.Windows.CsWin32 (build-time), Vortice.Direct2D1 (WIC);
  - SharpHook, Stateless, System.Management, System.IO.Abstractions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(viewmodels)!: v2 view models for the WPF shell

Rewrite the view-model layer against the v2 Core abstractions, with no
framework or OS calls inside view models:

- Shell (tray tooltip, arm/disarm, capture per mode, exit through
  IAppLifetime), Dashboard (in-place window list refreshed by WinEvent
  notifications only while visible, target lock, per-hotkey status),
  Library (lazy thumbnails, filters, copy/OCR/pin/delete to Recycle Bin),
  Profiles (editor, create from a Dashboard window), Settings (write-
  through, per-mode hotkey recorder with conflict checks, import/export,
  reset, diagnostics), Logs (batched, paused, filtered), Update (localized
  status, cancellable check/download, apply on exit), About, Preview.
- Coordinator gains SuspendHotkeys() so the recorder receives combinations
  that are currently registered.
- IImageDecoder + WIC implementation for library copy/OCR/pin.
- Localization service uses source-generated logging, narrows its catch
  and can match the OS language to a shipped culture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(ui)!: WPF + WPF UI shell, tray, overlays and 11-language strings

Replace the WinUI 3 front end with WPF on .NET 10 and WPF UI 4.3:

- CaptureImage.UI: FluentWindow + NavigationView (Dashboard, Library,
  Profiles, Settings, Logs, Update, About) with pages resolved from DI,
  {loc:Tr} live localization, RTL + per-window language, WPF UI themes
  (System/Light/Dark/High contrast), snackbar in the window and
  non-activating, capture-excluded toast pop-ups when it isn't in front.
- Region selection: one frozen overlay per monitor placed in physical
  pixels at the monitor's DPI; Esc/Enter also registered as temporary
  hotkeys so they work while a game holds the keyboard.
- Preview window, pinned thumbnails, clipboard (bitmap + PNG), dialogs,
  hotkey recorder (Alt combos, Print Screen key-up).
- Tray icon (H.NotifyIcon.Wpf) with an armed indicator; re-added after
  Explorer restarts.
- CaptureImage.App: Velopack hooks first, per-user single instance over a
  CurrentUserOnly pipe, Serilog (async file + in-memory, user paths
  redacted), validated container, --data-dir / --instance-id /
  --minimized / --smoke-test / --screenshots, PerMonitorV2 + long paths
  manifest, multi-size app icon, commit recorded for "2.0.0 (abc1234)".
- Strings: 306 keys translated into all 11 languages; tests compare key
  sets per culture without fallback, check placeholders and that every
  key the code uses exists and every key is used.
- Settings records keep unknown JSON fields with a settable
  ExtensionData (the source generator can't bind init-only ones).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ui)!: view-model and FlaUI suites, WPF publish smoke, stricter analyzers

- 135 view-model tests (settings write-through and reload, hotkey recorder
  with suspension, conflicts and validation, in-place window list,
  profiles, library filters and delete, log viewer batching, update flow,
  shell tray state, About links and third-party coverage, preview/OCR).
- CaptureImage.App.UiTests: FlaUI end-to-end tests against the real exe
  with a temporary data folder and instance id (navigation, arming,
  language switch, Arabic RTL, hotkey recorder, hide to tray + second
  launch). They skip unless CAPTUREIMAGE_UI_TESTS=1; new `ui-tests` job.
- CI publish-smoke publishes framework-dependent, runs --smoke-test with
  page screenshots (uploaded as an artifact) and checks the payload;
  deadcode now covers the UI and App projects.
- Release: framework-dependent publish + smoke test, vpk --framework
  net10-x64-desktop and --icon. Package .pdb/.xml stay out of the
  installer (publish 143 MB -> 51 MB, Setup ~28 MB).
- src/ builds with AnalysisMode=Recommended (warnings are errors);
  CA1716/CA1873 off with reasons, CA1822 off for bound view models.
- Test projects moved to the "tests" solution folder; Dependabot groups
  and the license ignore list follow the new dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: redundant casts and an unused P/Invoke result found by InspectCode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui): hide and exit after Closing returns; let sign-out close the app

Hiding or shutting down from inside Window.Closing can throw ("while a
Window is closing"), and tray Exit / Windows sign-out went through
Application.Shutdown without allowing the main window to close. Defer the
hide/exit, route IAppLifetime through App.RequestExit and allow close on
SessionEnding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): v2.0 notes under Unreleased

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(logging): render enums without JSON quotes in the log file and viewer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): give the startup and shutdown log lines a source context

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ui): drop the sleep-and-retry temp cleanup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui): keep running when the tray icon can't be created

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(infra): extract window icons with Win32 and WIC instead of System.Drawing

IconExtractor now takes the executable's own 48 px icon with SHDefExtractIcon
(falling back to the shell icon from SHGetFileInfo) and encodes it to PNG with
the WIC factory the app already uses. That removes the last System.Drawing.Common
reference and its central pin, which NuGet's package pruning resolved differently
on Linux than on Windows and broke the locked restore of the audit and license jobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui): expose pages to UI Automation as named panes

WPF creates no automation peer for Page, so the pages' automation ids and titles
never reached UI Automation: screen readers had no region to announce and the UI
tests could not find a page. Each page now creates a pane peer named after its
localized title.

The language UI test also waits for the debounced settings write instead of
reading settings.json once, which raced on the CI runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(core): v2 Core test suite

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: run the audit and license checks on Windows runners

NuGet prunes the WPF projects' Windows Desktop packages (System.Drawing.Common,
System.Diagnostics.EventLog, ...) only when restoring on Windows, so a locked
restore on Linux could never match the lock files. Both jobs now restore exactly
like the build job. The license job's restore is split so a failed package
restore can't be masked by the tool restore that follows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: v2 README, contributor guides, legal texts and contacts

- README, ARCHITECTURE, RELEASING, dev_env and pc_spec (+ Vietnamese) describe the WPF app,
  per-mode hotkeys, library, profiles, HDR, the framework-dependent installer and the new data
  folder; new screenshots rendered from seeded demo data (no personal windows or paths).
- PRIVACY, TERMS, DISCLAIMER, THIRD_PARTY_NOTICES and NOTICE match what v2 does and ships
  (clipboard, OCR, WinEvent hook, named pipe, library index, autostart, diagnostics export).
- New CONTRIBUTING, CODE_OF_CONDUCT, SUPPORT and CODEOWNERS; issue and PR templates updated.
- Contacts: contact@poli0981.dev and https://poli0981.dev/links, plus the role aliases
  (security@, privacy@, legal@, copyright@, dmca@, takedown@, code@, sponsor@, games@, collab@,
  press@) where each one belongs.
- CLAUDE.md covers the v2 layout, required checks, release steps, the Windows-only restore and
  how README screenshots are made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(infra): v2 Infrastructure test suite

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: address the SonarCloud findings on the v2 branch

- S2190: LocalizationSource.FlowDirection shared its name with the FlowDirection enum it
  returns, which reads as a recursive property; it is now CurrentFlowDirection.
- S8949: the coordinator's hotkey and auto-arm paths pass CancellationToken.None explicitly
  (a hotkey capture has no caller to cancel it; CancelCurrent() still stops it).
- S6640: unsafe code is how the Infrastructure assembly talks to Win32, Direct3D and WinRT; the
  rule is acknowledged once for that assembly with a justification instead of per call site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:52:30 +07:00
poli0981andClaude Opus 5.5 c649442a3a chore!: .NET 10 foundation, required CI quality gates, hardened release pipeline (#21)
* chore(build)!: move to .NET 10 LTS, refresh dependencies, enforce LF + SPDX headers

.NET 9 reaches end of support on 2026-11-10 and this machine only has .NET 10
SDKs, so the repo no longer built locally.

- global.json: SDK 10.0.401 (latestFeature) + Microsoft.Testing.Platform runner
- all projects retargeted to net10.0 / net10.0-windows10.0.22621.0
- Directory.Build.props: single version source (App no longer overrides it),
  TreatWarningsAsErrors everywhere, lock files + locked restore in CI,
  NuGetAudit (all, low), EnableWindowsTargeting (Dependabot evaluated every
  Windows-TFM project as "not compatible" without it), XML docs on so IDE0005
  runs in build
- packages: Microsoft.Extensions 10.0.13, Serilog 4.4.0 (+ sinks/extensions),
  CommunityToolkit.Mvvm 8.4.2, Stateless 5.20.1, Vortice 3.8.3, SkiaSharp
  4.153.1, Velopack 1.2.161 (DownloadUpdatesAsync lost ignoreDeltas;
  CheckForUpdatesAsync now honours cancellation via WaitAsync), WinAppSDK last
  1.8 patch
- security: drop SixLabors.ImageSharp 3.1.12 (GHSA-j3p4-wp97-rph4,
  GHSA-j9gm-c75j-xc9q, GHSA-jjfr-hcj7-qf5w high; GHSA-gwg2-r3hj-4w44,
  GHSA-wmxv-xphr-5c9g moderate) — TIFF now goes through the built-in WIC
  encoder (opaque, LZW)
- removed unused references: M.E.Hosting/Localization/Options/DI.Abstractions
  where unused, Serilog sinks in Infrastructure, SkiaSharp.NativeAssets.Win32
  (transitive), CsWinRT, Microsoft.Win32.Registry, H.NotifyIcon,
  Hosting.Abstractions
- tests: xunit 2 -> xunit.v3 4.0.2 (MTP v2), FluentAssertions 6 ->
  AwesomeAssertions 9 (FA >= 8 is commercially licensed), NSubstitute 6,
  coverlet -> Microsoft.Testing.Extensions.CodeCoverage; tests pass the xunit
  cancellation token
- .gitattributes: eol=lf everywhere (matches .editorconfig); .gitignore now
  ignores .idea/ and .claude/
- .editorconfig: SPDX header template (IDE0073) and IDE0161/0065/0005/0051/
  0052/0059/0060 enforced in build; headers added to every C# file, whitespace
  normalised; dead IID field and unused parameter/field removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: required quality gates, hardened release pipeline, working Dependabot

New required checks (one job each, no path filters so they always report):
- build: locked restore, Release build with warnings as errors, tests on
  Microsoft.Testing.Platform with Cobertura coverage summarised in the job summary
- format: `dotnet format whitespace` + style subset (SPDX header, file-scoped
  namespaces, using placement, unnecessary usings)
- deadcode: JetBrains InspectCode gated on file-local dead/redundant-code rules
  (WinUI projects excluded until they are replaced)
- audit: `dotnet list package --vulnerable --include-transitive` parsed by a gate
  script (the command itself always exits 0)
- license: nuget-license allowlist for the shipped app's dependency closure
- publish-smoke: publishes the app and verifies the payload (.pri/.xbf, legal docs)
- pr-title (Conventional Commits), dependency-review (vulnerabilities of any
  severity + non-free licenses), workflow-lint (actionlint + zizmor), docs
  (markdownlint + offline lychee); weekly external link check and OpenSSF
  Scorecard are informational

Release workflow:
- version taken from the tag through env + SemVer regex (removes the
  `${{ github.event.inputs.version }}` script injection) and checked against
  Directory.Build.props; prerelease derived from the version
- vpk pinned through the tool manifest (was unpinned while the library was
  0.0.1053); full packages only, so the previous release's 100 MB package is no
  longer re-uploaded; release notes come from CHANGELOG (the in-app update page
  showed none); identical packId/title/shortcuts/mainExe
- CycloneDX SBOM, SHA256SUMS of this version's assets, build-provenance
  attestations; release is created as a draft via gh (no third-party action with
  a write token); workflow_dispatch can rebuild an existing tag or dry-run

Other workflows: every action pinned to a commit SHA; least-privilege
permissions per job; notify-ci-failure ignores fork pull requests (they could post
their commit message to Discord) and all callers pass only the secrets they need
instead of `secrets: inherit`; announce-release now fires because releases are
published with a user token; discussion-welcome pinned and lists security@.
Removed .github/scripts/discord_notify.py (unused; the reusable workflows carry
their own copy).

Dependabot: EnableWindowsTargeting fixes the "not compatible" evaluation;
dead avalonia group removed; ecosystems grouped (incl. Velopack + vpk), 3-day
cooldown, tool manifest covered; version-update PRs paused (limit 0) until the
2.0.0 release.

Repo tooling: .config/dotnet-tools.json (vpk, InspectCode, nuget-license,
ReportGenerator, CycloneDX), markdownlint + lychee configs, RuntimeIdentifiers
win-x64 for stable lock files, CLAUDE.md for AI assistants, markdown lint fixes,
and the remaining InspectCode findings in Core/Infrastructure/ViewModels fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: fix first-run findings of the new gates

- dependency-review: drop Commons-Clause from deny-licenses (not an SPDX id)
- docs: disable markdownlint MD060 (table pipe alignment) introduced in
  markdownlint 0.41, which the CI action ships
- Dependabot cooldown 3 -> 7 days (zizmor dependabot-cooldown audit)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: quote InspectCode arguments, force HTTPS for actionlint download

- PowerShell splits a dash-prefixed native argument at its first period, so
  -o=inspectcode.sarif reached InspectCode as two arguments ('Specify only one
  solution file'); arguments are now quoted
- curl in workflow-lint refuses non-HTTPS protocols and redirects (SonarCloud
  githubactions:S6506)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:02:41 +07:00
poli0981andClaude Opus 4.7 38b1554dc5 feat(v1.5-M7): built-in offline OCR via Windows.Media.Ocr
PreviewWindow gains an Extract Text (OCR) button that runs the OS-supplied
OCR engine on the captured frame and copies recognised text to the
clipboard. All processing is on-device — nothing leaves the machine,
which fits the local/private ethos.

- IOcrService + OcrResult abstraction in Core/Abstractions so portable VM
  code stays free of WinRT references; WindowsOcrService in Infrastructure
  wraps OcrEngine.TryCreate* with a 3-tier fallback chain (explicit lang
  tag → user profile languages → en-US → unavailable).
- IClipboardService grew a CopyText overload so the OCR result can land
  in the clipboard in plain-text form (callers already had the image
  variant).
- PreviewViewModel: ExtractTextCommand calls OCR, copies, and surfaces
  one of three toast outcomes — N words copied / no text / engine
  unavailable — all localized.
- 4 new keys (Preview_ExtractText, Toast_OcrSuccess, Toast_OcrEmpty,
  Toast_OcrUnavailable) added to all 11 packs.

Note: engine availability depends on the user's installed OCR language
packs (Settings → Time & language → Language & region → Optional
features). The fallback chain keeps things working when the requested
language pack isn't installed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 21:25:42 +07:00
poli0981 0cb119be6e remove unused using 2026-04-26 11:49:48 +07:00
poli0981andClaude Opus 4.7 f82b300d25 test(v1.2-M5): unit coverage for logging stack + v1→v2 settings migration
New test suites:
  - InMemorySinkTests (7 cases): ring-buffer eviction at MaxCapacity,
    pause suppresses Emitted but still buffers, Snapshot returns a
    defensive copy, Clear empties, caller properties round-trip when
    present on the LogEvent and stay null when absent
  - SerilogLogLevelSwitcherTests (13 cases): canonical + alias names
    (info/warn/ERROR/empty) map correctly, unknown/null falls back
    to Information, CurrentLevel reports canonical capitalisation
  - CallerAwareLoggerExtensionsTests (4 cases): LogXAt extensions
    attach Member/File/Line as scope state, Path.GetFileName strips
    absolute build-machine paths, exception overloads forward both
    exception and caller context, template args pass through
  - LogViewerViewModelTests (6 cases): hydration copies snapshot
    (idempotent), live tail appends, filter rebuild keeps only ≥
    selected level, filter never touches the underlying buffer, live
    tail below filter is suppressed

Extended JsonSettingsStoreTests:
  - V1File_MigratesToV2AndWritesBack: v1 document without LogLevel is
    upgraded in memory AND the canonical v2 form is written back to
    disk
  - V2File_PreservesLogLevelField: existing LogLevel value round-trips

Also tightened JsonSettingsStore migration: STJ source-gen does NOT
honour record init defaults when a property is absent from JSON, so
we set LogLevel explicitly in the v1→v2 branch and add a defensive
"v2 file with null LogLevel" fill-in (possible via hand-edits).

Totals: 156 tests (was 123), all green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 09:24:00 +07:00
poli0981andClaude Opus 4.7 3224ad65c2 chore(release): bump to v1.1.2
M5 of the v1.1.2 localization hotfix. Closes the cycle: adds regression
tests for the two most foundational pieces of the fix, bumps the dev
version so fresh builds report v1.1.2, and writes the release notes.

- New `tests/CaptureImage.UI.Tests/` project covering
  `ResxLocalizationService`: SetCulture thread-culture propagation
  (CurrentUICulture / CurrentCulture / DefaultThreadCurrent* all
  follow), FlowDirection mapping for ar-SA, event count per switch
  (Item[] once + CurrentCulture + CurrentFlowDirection + CultureChanged),
  no-op when target culture equals current, indexer fallback for
  missing and empty keys, real resx lookup for known keys in en + vi,
  SupportedCultures surface. 12 tests.
- New `tests/CaptureImage.ViewModels.Tests/Preview/PreviewViewModelTests.cs`
  covering the M1 regression guard: VM forwards Item[] and
  CurrentCulture notifications as PropertyChanged("Localization"),
  ignores other notifications, and detaches its subscription on
  Dispose. 4 tests.
- `CaptureImage.App.csproj` version bumped to 1.1.2 so dev builds
  report the right string in the About tab; release.yml still
  overrides via `/p:Version=<git-tag>` on tag-driven builds.
- `CHANGELOG.md` adds a [1.1.2] section grouping the 13 original
  audit items + 3 user-reported bugs from smoke testing into
  Fixed / Changed / Removed / Known limitations / Tests, with
  cross-references to the affected VMs and services.

Test totals: 123 passing across four projects (Core 58 + VM 16 +
Infrastructure 37 + UI 12), up from 107 before M5. Build: 0 warnings,
0 errors.

Next step after this commit: tag v1.1.2 and run the Velopack release
pipeline on the `win` channel (same as v1.1.1) so the delta chain
stays intact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 23:22:52 +07:00
poli0981andClaude Opus 4.7 0482f718cb feat(v1.1-m1): hotkey rebinder + conflict sniff
Settings → Hotkey previously showed a hardcoded "Ctrl+Shift+F12" placeholder.
This milestone lands the full rebinder UX:

- HotkeyRecorder Avalonia control listens for key combos (Esc cancels)
- HotkeyBindingViewModel bridges the recorder to persistence and calls
  IHotkeyService.SetBinding live so an armed capture picks up the new
  combo without disarm/re-arm
- ReservedHotkeys catalogues Windows shell combos (Win+L, Alt+Tab,
  Ctrl+Shift+Esc, …); HotkeyBinding.Validate() rejects those plus
  modifier-only / naked-letter bindings before persistence
- HotkeyConflictSniffer does a RegisterHotKey/UnregisterHotKey probe on
  HWND=NULL so a binding already claimed by another process surfaces as
  a non-blocking warning — the user still saves it so they keep control
- i18n strings added to EN / VI / AR for every recorder surface

Tests: +24 Core validation (ReservedHotkeys + HotkeyBinding.Validate),
+12 ViewModel flow via NSubstitute fakes. Total 107 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:07:47 +07:00
poli0981andClaude Opus 4.6 7c29086ef4 feat(m0): bootstrap solution, Avalonia shell, DI + Serilog
Scaffold the 8-project CaptureImage solution (5 src + 3 tests):
- Central Package Management via Directory.Packages.props
- Shared MSBuild props via Directory.Build.props
- .NET 9 SDK pin via global.json (9.0.312, latestPatch)
- Core / Infrastructure / ViewModels / UI / App + 3 xUnit test projects
- Avalonia 11.2 shell with fixed 960x600 MainWindow, non-resizable
- Nav rail with 4 tabs (Dashboard, Update, Settings, About) wired
  through INavigationService + MainWindowViewModel
- Placeholder VMs for each tab so navigation has a landing VM per route
- Serilog console + async rolling-file sink at
  %LocalAppData%\CaptureImage\logs\captureimg-{Date}.log
- GPL-3.0 license text + NOTICE with third-party attributions

Verifies: dotnet build (0 warn / 0 err on all 8 projects), app starts,
log file created, all four nav tabs render and log navigation events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:19:12 +07:00