57 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 de7f12c324 docs: issue and merge request templates for the GitLab mirror
Gitea's registration is closed, so issues and merge requests from everyone
go to gitlab.com/poli0981/CommandForge, and GitLab does not read GitHub's
issue forms. .gitlab/issue_templates gets Markdown versions of the five forms
(Bug, Feature request, Command, Translation, Accessibility) and
.gitlab/merge_request_templates/Default.md the pull request checklist, with
a note that CI runs on Gitea. ACCESSIBILITY.md sends a barrier to the GitLab
Accessibility template or accessibility@, and its test follows.

The .github forms stay for Gitea, which reads them: their links point at
Gitea's paths, private reports at security@ (GitHub's private vulnerability
reporting and Discussions are gone), and config.yml points at the mirror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:20:50 +07:00
poli0981andClaude Opus 5.5 cad42ac9cf fix: updates from Cloudflare R2, links to Gitea and the GitLab mirror
The GitHub account is gone, and with it the update feed and every link the
app opened. Velopack now reads https://releases.poli0981.dev/commandforge
(an HTTP source, ProductLinks.UpdateFeed); 404 / 403 / 429 / 5xx / offline
are still told apart, and their messages name "the update server" instead of
GitHub (Cloudflare's edge answers 403 when it refuses and 429 when it
limits).

ProductLinks: the source, user guide, accessibility statement and the four
legal texts on Gitea (the Legal pages read them from ProductLinks instead of
four hard-coded GitHub URLs); issues on the GitLab mirror, since Gitea's
registration is closed. Report a bug opens a new GitLab issue with the title
and the answered Bug template (.gitlab/issue_templates/Bug.md) as its
description; a test keeps the app's sections and checklist equal to the
template's.

Strings in all five languages: "Source code" (was "GitHub"), "Read the full
text online", "Open issue on GitLab", and the privacy and auto-check texts
name releases.poli0981.dev. Keys Settings_GitHub and LegalGateReadOnGitHub
become Settings_SourceCode and LegalGateReadFullText. A new test fails if any
source file links to github.com/poli0981 again.

The terms version stays 1.1: the update check sends the same request, only
to another host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:18:05 +07:00
poli0981andClaude Opus 5.5 f9eb5e19eb test(report-bug): run the Report a bug command, not only its builders
SonarCloud's gate counted the command's body as new code without a test
(77.8% of new lines covered, 80% required). A test now runs
OpenIssueCommand with fakes and checks the address it opens: the Bug
report form, the crash title and code, this app's version and Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:10:29 +07:00
poli0981andClaude Opus 5.5 0e048d85ad fix(report-bug): open the Bug report form with its fields filled in
The app opened issues/new?title=&body=. In a repository with issue forms
GitHub ignores body, and anyone who isn't a collaborator sees the list of
forms first, so the description, the crash code and the versions were lost.
It now opens ?template=bug_report.yml and fills the form's fields by id
(what-happened, app-version, windows-version, logs); a test keeps those ids
in step with .github/ISSUE_TEMPLATE/bug_report.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:04:42 +07:00
poli0981andClaude Opus 5.5 cb9d818fc5 test(a11y): a peer's name may be null in the runtime tests' text walk
Qodana: AutomationPeer.GetName() is annotated as possibly null, and the
helper yields it as a non-null string; an unnamed text now yields "".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:48:49 +07:00
poli0981andClaude Opus 5.5 ded58c145f fix(a11y): settle Qodana's findings on the accessibility changes
- The four "Read the full text on GitHub" links get their names from one
  binding each, through RowActionNameConverter ("…: EULA"), and the
  "Did you mean" button's name moves into its style. Qodana's XAML engine
  reported a nameless field ("Field ' ' is assigned but its value is never
  used") for a MultiBinding written as a property element on an element
  without x:Name; what is read is unchanged.
- DangerBadge no longer declares the WPF-UI namespace its icon swap left
  unused.
- A redundant namespace qualifier in AccessibilityDocumentTests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:39:10 +07:00
poli0981andClaude Opus 5.5 36bc62d7ba test(a11y): run the WPF fixes on real WPF-UI controls; Restore down
SonarCloud's gate asks for 80% coverage on new code, and the first push had
22.5%: most of the new code only runs inside WPF. New tests run it on an STA
thread against WPF-UI's own styles and templates, with no window shown: the
names given to template parts, the glyphs kept out of the automation tree,
the decorative peers, the Ctrl+Q scope, the screen-reader notification, and
the font and contrast resources. A WPF-UI update that renames one of those
parts now fails a test instead of silently undoing the fix.

The seams for that: WpfUiAccessibility.Apply (what the class handlers run),
ScreenReader.Raise and RaiseOnActiveWindow, FontScaleService taking its
text-size reader and the resources it writes, ThemeService.ApplyDimming
taking the resources.

The tests also showed that WPF-UI 4.3 has a single button for Maximize and
Restore down, drawn as Restore down while the window is maximized; its name
now follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:33:45 +07:00
poli0981andClaude Opus 5.5 79670fbe6f docs(a11y): accessibility statement, issue form and user guide
ACCESSIBILITY.md says what CommandForge aims for (WCAG 2.2 AA through
WCAG2ICT: a goal, not a claim), what works with the keyboard, screen
readers, contrast themes and larger text, how that is checked, the known
limitations with what to do instead, and how to report a barrier: the new
Accessibility problem issue form or accessibility@poli0981.dev. USAGE.md
gains an Accessibility section and the F6 shortcut, and the changelog lists
the fixes. A test keeps the statement free of conformance claims and its
links working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:14:20 +07:00
poli0981andClaude Opus 5.5 4507faa6b3 fix(a11y): screen readers, keyboard, names and text size across the app
An accessibility review of every screen, with the keyboard alone, Narrator
and Axe.Windows:

- Screen readers hear what appears: a run starting, waiting for admin
  permission and finishing (result, exit code, time, restart needed), a
  search's result count, the Command Palette's highlighted result and its
  position, every notification and an update's progress. WPF ignores
  LiveSetting, so these go through AutomationPeer.RaiseNotificationEvent.
- The console and the Log viewer are read line by line; an error line says
  so and has a bar at its left, not only a colour; a blank line is read as
  one.
- Lists and buttons are read by their text instead of a type name; catalog
  rows carry their risk and badges as item status; a button repeated on
  every row names its row ("Undo: Flush DNS cache").
- WPF-UI template parts get names: the pane toggle and its two lists, the
  caption buttons, the clear button, the card expander headers. Icon glyphs
  (private-use characters) are kept out of the UI Automation tree
  (DecorativeIcon, GlyphHost), and an info bar's title and message, which
  the tree leaves out, are read through its severity icon.
- Keyboard: F6 moves between the pane, the page and the console; the focus
  moves into the page after navigation; Enter opens a command in the
  catalog and in History; Tab reaches a row's buttons; the splitters move
  with the arrow keys; every window and dialog starts with the keyboard
  inside it, a Caution confirmation on Cancel; Ctrl+Q does not quit while
  typing; page frames are no longer empty Tab stops.
- Seeing the screen: Windows' Text size multiplies the app's font size
  (the navigation pane widens at the largest sizes, badges and filters
  wrap); dimmed text is drawn at full strength under contrast themes;
  secondary text is darker; cut-off text has a tooltip; page transitions
  follow Windows' Animation effects setting.
- Tests: XAML rules (names, list items, headings, splitters, colours,
  icons) and the pure helpers behind the announcements and sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:14:20 +07:00
poli0981andClaude Opus 5.5 cb1386cc9a fix: findings from Qodana's first report
- SystemProcessRunner: build the ProcessStartInfo before the Process, so a program that can't
  be resolved leaves no undisposed Process behind (an object initializer runs outside `using`).
- JsonExecutionHistoryService: read the history under the lock it is replaced under.
- SingleInstanceGuard: a collection expression for the wait handles.
- AboutView: explicit Grid.Row/Grid.Column on every cell of the contact grid.
- Tests: no redundant casts, name qualifiers or unused lambda parameters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:19:19 +07:00
poli0981andClaude Opus 5.5 2741691c81 fix(security): open only https/mailto addresses and existing folders through the shell
ShellService.TryOpen handed any string to ShellExecute, which runs whatever it is given: a file:
address or an unknown protocol handler is a program. Its twelve callers only ever pass the
project's links, mailto addresses and the app's own folders, so anything else is now refused
and logged (IsAllowedTarget, tested).

ProcessStartSitesTests lists every file that starts a process, with what it starts, and fails
on a new one until it has been read - the tripwire beside Qodana's security rule, which leaves
those read files out (qodana.yaml).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:19:19 +07:00
poli0981andClaude Opus 5.5 d054902117 build(deps): .NET 10.0.15 runtime (SDK 10.0.404), DI 10.0.15, SonarAnalyzer 10.36, test packages
- global.json: SDK 10.0.404, which carries the November 2026 .NET security update
  (runtime 10.0.15). CI already installs the newest 10.0 SDK (rollForward latestFeature),
  so this is the floor a local build needs.
- Microsoft.Extensions.DependencyInjection(.Abstractions) 10.0.15.
- SonarAnalyzer.CSharp 10.36.0.15337 (no new findings).
- Tests: xunit.v3.mtp-off 4.0.3, Microsoft.NET.Test.Sdk 18.12.0, coverlet.collector 10.1.1.
- THIRD-PARTY-NOTICES: versions brought up to date, including CsWin32 0.3.371 and the
  SonarScanner 12.1.0 from #62.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 08:45:34 +07:00
poli0981andClaude Opus 5.5 a5f5e4b3c1 test(catalog): category list and order, per-build coverage, launcher arguments
- The 15 categories in order, with order values running from 1 without gaps
  (replaces the 12-category count and the Storage-only check).
- Every category has commands on Windows 10 22H2, 11 23H2 and 11 24H2,
  since the navigation pane hides commands for other builds.
- No two commands share a command line.
- explorer only opens settings URIs or shell folders, and control only
  Control Panel items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:30:46 +07:00
poli0981andClaude Opus 5.5 c61d397199 build(deps): .NET SDK 10.0.403, DI 10.0.14, CsWin32 0.3.367, CodeQL 4.39.1
- global.json: SDK 10.0.403, so self-contained releases ship the
  .NET 10.0.14 runtime (October 2026 security update).
- Microsoft.Extensions.DependencyInjection(.Abstractions) 10.0.13 -> 10.0.14.
- Microsoft.Windows.CsWin32 0.3.366 -> 0.3.367.
- github/codeql-action v4.39.0 -> v4.39.1 (CodeQL and Scorecard uploads),
  pinned to the release commit.
- THIRD-PARTY-NOTICES: the new versions and the SonarScanner for .NET.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:17:45 +07:00
poli0981andClaude Opus 5.5 cae3679ffa fix(ui): say whether this copy updates itself, not "Portable / dev"
Settings > Advanced and Portable info showed "Installed" or
"Portable / dev". The official portable zip counts as installed
(it carries Velopack's updater), so "Portable / dev" only ever meant
a build run from source. The labels now read "Installed or portable
(updates itself)" and "Development build (doesn't update)", in all
five languages; the key is renamed to Settings_RunModeDev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 23:13:53 +07:00
poli0981andClaude Opus 5.5 06731cdd0b chore: fix stale comments and the NuGet cache key
- ISettingsService: window size and maximized state are restored again
  since the window became resizable; WarnOnCancel only asks on close.
- IDialogService, CrashHandlingService, NaturalLanguageSearch (golden
  rule #7, not #5), the test project and pack.ps1 described the
  pre-2.0 setup (message boxes, the Generic Host, EN+VI only,
  Directory.Packages.props).
- build.yml hashed the removed Directory.Packages.props for its NuGet
  cache keys; it now hashes Directory.Build.props, where the
  SonarAnalyzer version lives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 23:12:10 +07:00
poli0981andClaude Opus 5.5 f7bbe53f96 feat(ui)!: Fluent redesign with WPF-UI 4.3
The app now follows Windows 11: Mica window with its own title bar, a
navigation pane, in-window dialogs, snackbars and the system accent color.
MaterialDesignThemes is gone.

- Shell: resizable FluentWindow (min 960x600) that remembers its size,
  position and maximized state. The title bar has a command search box
  (Ctrl+K), an admin-session indicator with "End admin session", and a More
  menu. The pane has Home, Favorites, History, Recipes, My commands and the
  catalog with its twelve categories and counts; the selection stays in sync
  with the view-model through NavigationKey.
- MainViewModel keeps the shell only; the catalog's browsing, filters,
  detail and run logic moved to CatalogViewModel. The catalog gets risk and
  admin-only filter chips, the estimated duration and an expanded command
  line in the detail panel, and a splitter between detail and console.
- One shared console for catalog, recipes and user commands: virtualized,
  batched, capped at 10,000 lines with a "N earlier lines" note, Copy all,
  Save to file, "Waiting for administrator permission…" status and Restart
  now (asks first, never while a command runs).
- Confirmation, update and bug-report dialogs are Fluent content dialogs;
  Cancel stays the default and Run appears for a Dangerous command only
  once its name or id is typed. The Legal Gate, terms viewer, crash dialog
  and command palette are Fluent windows; the Legal Gate lets you pick the
  language first.
- Theme: light, dark or system through ApplicationThemeManager, accent from
  Windows, High Contrast always wins. Font size scales every text and
  control live. Pages set the theme text color themselves (the navigation
  frame doesn't pass it down), and list text dims instead of recoloring so
  it stays readable on a selected row; search matches are bold and
  underlined.
- A finished run notifies with a snackbar (and flashes the taskbar button)
  when the console isn't visible; the taskbar shows progress while running.
- Catalog icons map to Fluent System Icons (IconMap), checked by a test.
- The presentation namespace is now CommandForge.Desktop: a namespace named
  CommandForge.Wpf hid WPF-UI's root namespace in XAML-generated code. The
  project, assembly and exe keep the name CommandForge.Wpf.
- IElevationService raises SessionChanged when the elevated helper starts or
  stops.
- Strings: about 45 new keys in all five languages; twelve unused keys
  removed. A test now scans the UI sources so every key the XAML or code
  uses must exist in every language.

BREAKING CHANGE: new look and layout; settings, history, recipes and user
commands carry over unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 22:26:42 +07:00
poli0981andClaude Opus 5.5 f781690b5f test: cover decoding, path resolution, elevation environment, storage
New tests for the output decoder (UTF-8, UTF-16LE with and without BOM,
OEM fallback, chunk boundaries), executable resolution, argument tokens,
the elevated child environment (including a real PowerShell run showing
it loads modules only from admin-only folders), crash-safe JSON files and
v1.5.1 settings, accent-insensitive search, recipe confirmations, the
update dialog, the console buffer and crash codes.

Run faults and cancellation must complete the output channel; elevation
tests have time limits; the DI test uses a scratch folder instead of the
real %AppData%; culture-switching tests run on their own; Domain and
Application may reference only the runtime (and Domain).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 21:21:25 +07:00
poli0981andClaude Opus 5.5 ee557ab532 perf(logging): refresh the Log Viewer once per burst, not per event
Every log event made the Log Viewer and Debug panel rebuild up to 1000
rows on the UI thread. The in-memory store now raises EntriesChanged once,
150 ms after the first event of a burst; Clear still notifies at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 21:21:25 +07:00
poli0981andClaude Opus 5.5 6d4843465a fix(catalog): reject contradictory or unsafe catalog records
A command is registered only after it passes validation, so a rejected
command can no longer be a revert target or shadow a valid duplicate, and
a revert that points at one is cleared. New checks: unknown argument
tokens, an executable that is not a plain program name, Caution or
Dangerous without confirmBeforeRun, Launch mode with an exit-code or
output restart policy, and a restartRegex under another policy. Invalid
embedded JSON yields an empty catalog plus an error instead of a crash.

The catalog tests also enforce -NoProfile -NonInteractive for PowerShell,
no wmic, no hard-coded C:, no %VAR% outside scripts, and that elevated
scripts read only the environment variables the Elevator sets from
trusted sources. DangerLevel documents what Safe, Caution and Dangerous
mean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 21:21:24 +07:00
poli0981andClaude Opus 5.5 62d7178eab fix(updates): end the elevated session before applying; robust errors; X cancels the download
- Download and apply are separate steps: applying first ends the elevated session and waits for the
  Elevator to exit (it runs from the folder Velopack replaces, and the non-elevated updater can't
  kill it or overwrite its locked files), and a command started during the download postpones the
  restart instead of being killed halfway.
- UpdateErrorMapper.Map(Exception) looks through wrapper/aggregate exceptions for the HTTP status;
  HttpClient timeouts now map to Offline instead of being rethrown as cancellations (which left the
  dialog stuck on "Checking"). User cancellation is still distinguished.
- Closing the update dialog with its title-bar X cancels the download; otherwise it finished in the
  background and restarted the app, possibly mid-command.
- The startup prompt never opens over another dialog; the "command running" guard reads the shared
  ExecutionViewModel (now a singleton) instead of MainWindow.DataContext.
- Settings' "Last checked" only updates when a check actually succeeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:36:20 +07:00
poli0981andClaude Opus 5.5 48fd03983f fix(safety): one set of confirmation/restore-point rules; recipes confirm every risky step
- RunSafety (Application) holds the rules for single runs, History re-runs, reverts and recipes:
  Dangerous always asks with typing; Caution asks unless turned off; a restore point is offered
  only for risky admin commands or catalog-flagged ones — never for per-user tweaks, where it
  only added a UAC prompt.
- Type-to-confirm accepts the title Unicode-normalized and case-insensitively, or the command id:
  Vietnamese input methods that type decomposed accents (and long CJK titles typed through an
  IME) could not confirm before. Run is a CanExecute gate in the view-model, Cancel is the
  default/Esc button, and the typing box gets focus.
- Recipes no longer run Dangerous steps after a single Yes/No: an overview prompt (No by default)
  is followed by the same confirmation each risky step gets on its own, and one restore point
  before the chain. Steps unavailable on this PC are kept when the recipe is saved again.
- Restore points: "Windows already made one in the last 24 hours" is reported as skipped (exit 2)
  instead of as created; any other failure asks before running the command anyway (No default).
- A run that does not start (already running, stopped at the restore point) is never recorded in
  Recent/History; History's Run again/Undo are disabled while a command runs; Clear asks first.
- Console output goes into an OutputBuffer: one notification per batch instead of per line,
  capped at 10,000 lines; an unexpected failure is reported in the console instead of crashing.
- Every run is logged as a one-line summary (id, exit code, duration — never its output).
- New IDialogService/IClipboardService/IShellService/IFileDialogService keep view-models free of
  MessageBox/Clipboard/Process calls (and testable); new strings in all five languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:32:38 +07:00
poli0981andClaude Opus 5.5 81657aa058 fix(elevation): harden the broker and the Elevator
- Elevated children get an allow-listed environment rebuilt from trusted sources: per-user
  variables (COR_PROFILER/CORECLR_* DLL injection, PSModulePath module hijacking, windir/
  SystemRoot retargeting of recursive deletes) no longer reach commands run as administrator.
  PSModulePath is $PSHOME\Modules only, the one value Windows PowerShell 5.1 keeps as-is.
- Both ends verify the peer: the UI accepts only the Elevator process it launched
  (GetNamedPipeClientProcessId); the Elevator serves only CommandForge.Wpf.exe from its own folder
  (GetNamedPipeServerProcessId) and connects with Identification impersonation.
- The Elevator writes no files any more (an elevated append to the user-writable profile could be
  redirected with a junction); diagnostics go back to the UI's log as pipe Log messages.
- StartupHookSupport=false on the Elevator: DOTNET_STARTUP_HOOKS is ignored.
- Broker: cancelling while UAC/connecting returns Cancelled instead of throwing; a command that
  ignores a cancel for 10 s ends the session; pipe/JSON errors fail the run cleanly; the output
  channel is always completed.
- IElevationService: IsSessionActive and EndSessionAsync (needed before an update replaces the
  files the elevated process runs from) replace the unused IsElevationAvailable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:19:03 +07:00
poli0981andClaude Opus 5.5 304693cfa0 build: keep package versions in each .csproj
GitHub's dependency graph reads NuGet versions from .csproj files but not from
Directory.Packages.props, so Central Package Management would have blinded Dependabot alerts,
dependency review and the release SBOM. Versions move back into the projects (same versions),
SonarAnalyzer.CSharp is now referenced from Directory.Build.props, and the xUnit v3 test
project declares OutputType Exe explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:02:41 +07:00
poli0981andClaude Opus 5.5 b4cbf68cce test: migrate the suite to xUnit v3
Pass TestContext.Current.CancellationToken to cancellable calls (xUnit1051), dispose pipes
asynchronously, drop null-forgiving operators that xUnit v3's nullability annotations make
redundant, and rename the ExecutionTests helper that shadowed the fake runner's RunAsync.
All 204 test cases pass under VSTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:56:42 +07:00
poli0981andClaude Opus 5.5 1f89545e30 build: central package management, NuGet audit, SonarAnalyzer, dependency refresh
- Directory.Packages.props: Central Package Management for every project; SonarAnalyzer.CSharp
  as a global analyzer so the build enforces the same rules as SonarCloud.
- Directory.Build.props: NuGet audit of direct + transitive packages (moderate+ advisories fail the
  build), deterministic CI paths, dev version 2.0.0.
- global.json: .NET SDK 10.0.402 (latest LTS feature band).
- Bumps: Microsoft.Extensions.* 10.0.13, Serilog 4.4.0, Velopack 1.2.161, CsWin32 0.3.366,
  Microsoft.NET.Test.Sdk 18.11.0, coverlet.collector 10.1.0, xunit 2.9.3 -> xunit.v3 4.0.2 (VSTest
  mode) + xunit.runner.visualstudio 4.0.1.
- The Elevator publish now inherits PublishReadyToRun from the app publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:56:18 +07:00
poli0981andClaude Opus 4.8 c65a5aa021 fix(wpf): enforce single instance so relaunching focuses the existing window
Launching CommandForge.Wpf.exe repeatedly opened a new window each time
because there was no single-instance guard. Add SingleInstanceGuard (a
WPF-free Infrastructure primitive) that owns a session-scoped named mutex;
a later launch signals the primary via a named auto-reset event and exits,
and the primary restores + foregrounds its existing window.

- Guard is created right after VelopackApp.Build().Run() so install/update
  hook processes are never counted as a second instance.
- Activation marshals to the UI dispatcher; SetForegroundWindow beats the
  Windows foreground lock. MainWindow is NoResize so Normal fully restores it.
- Adds unit tests for primary/secondary detection, activation signalling and
  name reclamation; CHANGELOG updated for 1.5.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 08:55:52 +07:00
poli0981andClaude Opus 4.8 c424a400f6 feat(catalog): add 40 rare/OS-specific commands + fix TPM/Defender elevation (201 -> 241)
Adds 40 rarely-used and Windows-version-specific commands across 9 existing
categories: 5 Windows 10-only (maxOsBuild 19045 — the first use of maxOsBuild
gating in the catalog), 11 Windows 11-only (minOsBuild 22000+, incl. 3 for
24H2/26100), and 24 rare cross-version diagnostics/info/security/dev commands.
Each command is wired with Cmd_<id>_Title/_Desc keys in all five resource
cultures (en, vi, ja, zh-Hans, es); reg-based HKCU tweaks include
affectedRegistryValues and confirmBeforeRun for Caution entries.

Also fixes TPM Status (info.tpm) and Defender Exclusions
(sec.defender.exclusions): both now require admin so their queries
(Get-CimInstance on MicrosoftTpm / Get-MpPreference) return data instead of
appearing blank — they run in-process without elevation today.

Adds CommandDefinitionTests coverage for maxOsBuild gating (Win10-only
commands hidden on Windows 11, visible on Windows 10).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 19:53:13 +07:00
poli0981andClaude Opus 4.8 b9cedcc160 feat(catalog): add Services & Startup category + 20 commands — v1.4.0 batch 2/3 (161 -> 181)
New 12th category "services-startup" plus a storage/maintenance-heavy batch.

- services-startup (8, NEW category): restart Print Spooler / Windows Audio /
  Windows Update / BITS services; list running & automatic services; open
  Startup apps settings; open the Startup folder
- storage (5): largest temp files, list partitions, analyze fragmentation
  (read-only), configure Disk Cleanup (sageset), list disks & volumes (diskpart)
- cleanup (3): clear icon cache, clear recent items, clear event logs
- power (2): Power Saver plan, hibernate now
- system-maintenance (2): online disk scan (Repair-Volume -Scan), verify
  system files (sfc /verifyonly)

categories.json gains services-startup (order 12); CatalogTests category-count
assertion bumped 11 -> 12. All keys localized across EN/VI/JA/zh-Hans/ES.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 20:34:36 +07:00
poli0981andClaude Opus 4.8 dfac11c964 feat(catalog): add 25 new commands and a Storage category
Grows the catalog from 116 to 141 commands and adds an 11th category,
"Storage". All new commands are vetted, fixed catalog entries (no user
interpolation); admin ones run via the Elevator. No new Dangerous commands.

New category: storage (Optimize/defrag C:, Disk Management, list volumes
and free space, open Storage settings).

Other additions across existing groups:
- system-info: TPM status, Secure Boot state, computer & OS summary.
- network: network adapters, DNS servers, internet connectivity test.
- diagnostics: startup programs, Driver Verifier, Performance Monitor,
  system health report.
- cleanup: clear crash dumps, Windows Error Reporting, DNS+ARP caches.
- power: lid-close action and monitor-timeout toggles (revert pairs).
- tweaks-shortcuts: NumLock-at-startup and verbose sign-in toggles
  (revert pairs, with affectedRegistryValues).

Localization: 51 new keys (50 command + Cat_storage) added to all five
languages (EN authored; VI/JA/zh-Hans/ES machine-translated, flagged for
native review). ResxKeyTests enforces full parity.

Tests: CatalogTests category count 10 -> 11; added guards for the Storage
category and for "Dangerous commands must confirm". 195/195 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 23:14:56 +07:00
poli0981andClaude Opus 4.8 a941710b29 feat(i18n): add Simplified Chinese (zh-Hans) and Spanish (es) UI languages
Adds two new UI languages, bringing the total to five (EN/VI/JA/zh-Hans/es).
Both new translations are machine-translated and flagged for native review,
matching how Japanese was introduced.

- Strings.zh-Hans.resx + Strings.es.resx: full parity with EN (501 keys),
  built by transforming the English resx so every key is present (no fallback).
- SettingsViewModel: add 简体中文 and Español language options.
- MainWindow.xaml: add the two View > Language menu items.
- ISettingsService: document the new culture codes.
- ResxKeyTests: assert key parity across all satellite cultures
  (vi/ja/zh-Hans/es), driven by a single SatelliteCultures list.
- LocalizationManagerTests: theory asserting each satellite actually loads
  (a translated string, not an English fallback) via the live-switch path.

Translations: machine-generated; recommend native-speaker review before GA.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 22:58:08 +07:00
dependabot[bot] 0ac6e067ee deps: Bump Microsoft.NET.Test.Sdk from 18.6.0 to 18.7.0
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-24 10:25:56 +00:00
poli0981andClaude Opus 4.8 d9af1c5fcb feat(i18n): add Japanese (JA) language
Adds a complete Japanese satellite (Strings.ja.resx, 501 keys covering
all UI + catalog strings) and wires it into the language picker and the
View menu (日本語). Live switching works the same as EN/VI — no restart.

- ResxKeyTests now asserts every catalog + UI key resolves in EN, VI
  AND JA with no parent fallback, via a shared AssertKeysExist helper.
- ISettingsService doc notes "ja" as a valid culture code.

Translations are machine-generated; a native Japanese review pass is
recommended. 189 tests pass; the ja satellite assembly builds and the
app launches.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:44:59 +07:00
poli0981andClaude Opus 4.8 ee90b5b746 feat(catalog): OS-build version flags to hide non-applicable commands
Adds optional minOsBuild/maxOsBuild to a command; the WPF catalog
projection hides commands that do not apply to the current OS build, so
Windows 11-only tweaks never appear on Windows 10 (and vice-versa).

- Domain: CommandDefinition gains MinOsBuild/MaxOsBuild + the pure
  AppliesToOsBuild(build) predicate (no Win32 dependency).
- Infrastructure: CommandDto maps the fields; CatalogLoader validates
  positive values and maxOsBuild >= minOsBuild. ICatalogProvider still
  returns the full set, so the Debug panel and tests are unaffected.
- WPF: CatalogViewModelBuilder.Build(catalog, osBuild) filters once,
  centrally — covering the list, palette, category counts and every
  dashboard. The OS build comes from the existing ISystemInfoService.
- Catalog: gate the Win11 context-menu, taskbar-alignment and
  clock-seconds tweaks (minOsBuild 22000 / 22621).

Tests: AppliesToOsBuild theory + catalog range/positive validation;
189 pass. App launches without startup regressions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:07:54 +07:00
poli0981andClaude Opus 4.8 68e62f3f22 fix: cmd user-commands hang, recipe duplicate steps, sidebar scrollbar
Post-v1.1.0 fixes reported from testing.

- User commands hanging on cmd: SystemProcessRunner now redirects and
  immediately closes stdin, so an interactive process (e.g. "cmd" with
  no /c) gets EOF and exits instead of blocking forever. Additionally,
  UserCommandFactory.NormalizeArguments prepends /c for cmd (e.g. "cmd"
  + "ping google.com" -> "cmd /c ping google.com") so the command runs
  and exits; the run confirmation shows the effective command line.
  PowerShell and other executables are unchanged.
- Recipes: AddStep no longer adds a command already in the chain, so a
  recipe never runs one command multiple times.
- Sidebar: hide the vertical scrollbar on the command-groups list.
- Tests for the cmd /c normalization (cmd/cmd.exe/path, existing /c|/k,
  powershell, empty args) + ToDefinition applying it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 16:30:27 +07:00
poli0981andClaude Opus 4.8 c386021b81 feat(dashboard): maintenance suggestions + local NL search (v-next Đợt 7)
Implements C5 + C7 from docs/Extra.md Part 2 (final wave).

- Application: pure MaintenanceSuggestions.For(SystemStatus) (low system-
  drive space -> Disk Cleanup; uptime > 7 days -> restart) and
  NaturalLanguageSearch.Suggest (EN/VI phrase -> catalog keyword).
  Natural-language search is 100% LOCAL — no LLM, no network (golden rule #5).
- WPF: Home shows a "Maintenance suggestions" section (reason + optional
  Open button for the suggested catalog command). The catalog search bar
  shows a "Did you mean: <keyword>" chip for natural-language queries;
  clicking it applies the keyword.
- EN/VI .resx; docs (Changelog/roadmap).
- Tests: NL phrase mapping (+ null/already-keyword cases) and the
  maintenance heuristics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:21:06 +07:00
poli0981andClaude Opus 4.8 bc132b82e6 feat(registry): read-only before/after diff + undo via revert (v-next Đợt 6)
Implements C6 + C2 from docs/Extra.md Part 2, with a safe design that
preserves the Elevator invariant (no new privileged write path).

- Catalog: optional affectedRegistryValues field (RegistryValueRef in
  Domain + DTO + mapping), declared on tweak.showext / tweak.showhidden.
- Application: IRegistryService (read-only) + pure RegistrySnapshot
  (Capture + Diff -> RegistryChange).
- Infrastructure: WindowsRegistryService over Microsoft.Win32.Registry;
  unknown hive / missing key / access error all read as null.
- WPF: after a run with affectedRegistryValues, MainViewModel re-reads
  the values and appends a localized before/after diff to the console.
- Undo (C2): History entries whose command has a vetted RevertCommandId
  get an "Undo" button that runs that catalog revert command — NO
  arbitrary registry writes, the Elevator still only accepts catalog ids.
- EN/VI .resx; docs (Changelog/roadmap/Security.md §4).
- Tests: snapshot diff (null/changed), Win32 read smoke (known/missing/
  bad hive), and the catalog schema field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:13:39 +07:00
poli0981andClaude Opus 4.8 17d5a5cc19 feat(user-commands): non-elevated user-defined commands (v-next Đợt 5)
Implements B1 from docs/Extra.md Part 1, safety-critical (golden rule #1).

- Domain: UserCommand (id/name/executable/arguments).
- Application: IUserCommandStore port + UserCommandFactory.ToDefinition,
  which FORCES RequiresAdmin=false and namespaces the id as "user:" so
  it can never be routed to — or accepted by — the Elevator.
- Infrastructure: JsonUserCommandStore -> %AppData%\CommandForge\
  user-commands.json, fully separate from the embedded catalog. No
  telemetry; corrupt-file fallback.
- WPF: new "My commands" section (sidebar + View menu) with a persistent
  warning banner. Create/edit/save/delete; Run shows the exact command
  line and that it runs without admin, then executes asInvoker via the
  forced-non-elevated definition. Console bound to the shared execution.
- EN/VI .resx; docs/Security.md §2.1 (threat model).
- Tests: ToDefinition never RequiresAdmin, id is namespaced, the
  definition routes to the executor (never elevation), store round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:01:05 +07:00
poli0981andClaude Opus 4.8 9332722997 feat(recipes): command chains / macros with stop-on-error (v-next Đợt 4)
Implements B2 from docs/Extra.md Part 1 (Macro / recipe).

- Domain: Recipe (named, ordered list of catalog command ids).
- Application: IRecipeStore port + pure RecipeFlow.ShouldStop
  (stop on failure / cancel / reboot-required).
- Infrastructure: JsonRecipeStore -> %AppData%\CommandForge\recipes.json
  (source-gen, schema version, corrupt-file fallback). No telemetry;
  recipes reference only vetted catalog ids.
- WPF: ExecutionViewModel.RunRecipeAsync runs steps sequentially
  through the same broker session (one UAC for an all-admin chain),
  streaming a per-step header and stopping per RecipeFlow. New Recipes
  shell section (sidebar + View menu) with RecipesViewModel/RecipesView:
  build/reorder/remove steps from the catalog, save/delete recipes, and
  Run with a single aggregated confirmation (warns on dangerous steps).
  Each finished step is recorded in the execution history.
- EN/VI .resx keys; tests for RecipeFlow and the recipe store.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 14:51:39 +07:00
poli0981andClaude Opus 4.8 fc985d259a feat(settings): import/export + named profiles (v-next Đợt 3)
Implements C3 + C4 from docs/Extra.md Part 2.

- Application: PortableSettings (machine-portable subset: appearance,
  behavior, favorites) + pure SettingsTransfer (Capture/Apply);
  ISettingsFile (import/export) and IProfileService ports.
- Infrastructure: JsonSettingsFile (read/write a chosen .json) and
  JsonProfileService -> %AppData%\CommandForge\profiles.json, both via
  a shared source-gen context with a schema version + corrupt-file
  fallback. No telemetry; import never carries executable commands.
- WPF: new Settings "Backup & profiles" section — Export/Import
  buttons and a named-profile picker (apply/delete + save-current).
  Import/apply route appearance/language/font through the existing
  observable-property setters (live apply + persist); favorites are
  written to settings and the shell re-syncs via a new
  SettingsViewModel.PortableSettingsApplied event.
- EN/VI .resx keys; tests for capture/apply round-trip, file
  round-trip/fallbacks, and profile CRUD/persistence.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 14:36:17 +07:00
poli0981 a371cd1e48 Merge pull request #25 from poli0981/claude/vnext-dot2-history
feat(history): execution history + re-run (v-next Đợt 2)
2026-06-19 14:24:28 +07:00
poli0981andClaude Opus 4.8 ad91973a3f feat(history): persistent execution history + re-run (v-next Đợt 2)
Adds a local execution history (C1 from docs/Extra.md Part 2).

- Domain ExecutionRecord; Application IExecutionHistoryService port +
  pure ExecutionHistory helper (newest-first, cap 200, no de-dupe).
- Infrastructure JsonExecutionHistoryService -> %AppData%\CommandForge\
  history.json (source-gen context, schema version, corrupt-file
  fallback). No telemetry.
- ExecutionViewModel exposes LastResult; MainViewModel records each
  finished, non-cancelled run via IClock + the history service.
- New History shell section (sidebar button + View menu) with
  HistoryViewModel/HistoryView: per-run time/status/duration, "Run
  again" (re-runs through the normal confirm/elevation flow) and
  "Clear history". Runs of commands removed from the catalog show
  their id and cannot be re-run.
- EN/VI .resx keys; tests for the cap helper and JSON round-trip /
  fallbacks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 14:12:55 +07:00
poli0981andClaude Opus 4.8 ef83c88083 build: add assembly metadata + Velopack --packAuthors
Đợt 1 of the post-v1.0 line (metadata + packaging).

- Directory.Build.props: inheritable package/assembly metadata
  (Product, Authors/Company=poli0981, Copyright, Description,
  RepositoryUrl/PackageProjectUrl, default Version 1.0.0).
  AssemblyVersion is intentionally NOT pinned so it follows Version
  (stamped from the git tag at publish), keeping the in-app About /
  Report-Bug version accurate.
- scripts/pack.ps1: pass --packTitle / --packAuthors to vpk pack
  (correct plural flag) and -p:FileVersion to dotnet publish.
- tests: AssemblyMetadataTests verifies Company / Product / Copyright.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:58:54 +07:00
poli0981andClaude Opus 4.8 a2e44e1e3b deps: bump dependencies and GitHub Actions (consolidates Dependabot PRs)
Consolidates the eight open Dependabot PRs (#14-#21) into one change to
avoid the workflow-file conflicts they have with each other.

NuGet:
- Microsoft.Windows.CsWin32 0.3.296 -> 0.3.298
- Microsoft.NET.Test.Sdk 17.14.1 -> 18.6.0
- coverlet.collector 6.0.4 -> 10.0.1
- xunit.runner.visualstudio 3.1.4 -> 3.1.5

GitHub Actions:
- actions/checkout 4 -> 6
- actions/setup-dotnet 4 -> 5
- github/codeql-action 3 -> 4
- crazy-max/ghaction-virustotal 4 -> 5 (vt_api_key/files/update_release_body
  inputs verified unchanged in v5)

0-warning Release build; 105 tests pass; actionlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 20:06:44 +07:00
poli0981andClaude Opus 4.8 979346e170 Phase 6d: deferred 5c UI — dialogs, Tools restore point, Language submenu
Finishes the Phase-5c menu/dialog items that were deferred.

- KeyboardShortcutsDialog (Help -> Keyboard shortcuts): read-only list of
  the shortcuts actually wired in the shell.
- PortableInfoDialog (File -> Portable info): installed vs portable (from
  IUpdateService.IsUpdateSupported), config/log folders, version.
- AboutDialog (About -> About CommandForge): name/version/links + no-data
  note + a Terms button. Repoints the About menu from the old Settings/About
  navigation (ShowAboutCommand removed).
- LegalViewerWindow (About -> Terms & Privacy): read-only reuse of the 6b
  LegalDocumentsView.
- Tools -> Create System Restore Point: runs the vetted catalog command via
  the elevation broker (reuses the confirm + console flow; CanExecute guards
  on command presence / not-running).
- View -> Language submenu (System / English / Tiếng Việt) with radio
  checkmarks via a new StringEqualsConverter + SettingsViewModel.SetLanguage.

Dry-run remains deferred to v2 (noted in docs/Extra.md).

0-warning Release build; 105 tests pass (added dialog resx parity); app boots
cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 19:44:46 +07:00
poli0981andClaude Opus 4.8 e30ce870c4 Phase 6b: public docs + legal + Legal Gate links
Public, English-language docs and community-health files (the internal
docs/ specs stay Vietnamese + gitignored). License stays GPLv3.

- Repo root: README (rewritten, with AI disclosure + SmartScreen/SHA-256
  notes), EULA (GPLv3), PRIVACY, DISCLAIMER, THIRD-PARTY-NOTICES,
  MAINTAINERS.
- .github/: CONTRIBUTING (incl. the auto-ignored-contributions rules),
  SECURITY (private reporting + no-signing/VirusTotal), CODE_OF_CONDUCT
  (Contributor Covenant), ISSUE_TEMPLATE (bug/feature/config),
  PULL_REQUEST_TEMPLATE.
- Legal Gate: the four tabs now show a localized summary + a clickable
  "Read full text on GitHub" link to the public docs, via a reusable
  LegalDocumentsView (also used by the 6d Legal Viewer). Terms version
  bumped 1.0 -> 1.1 so existing users re-accept once.
- Strings.cs reduced to Get() (the strongly-typed members are now unused
  since the Legal Gate moved to {res:Loc}); resx keys retained.

0-warning Release build; 104 tests pass (added Legal/menu resx parity).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 19:19:31 +07:00
poli0981andClaude Opus 4.8 cf737fc71e Phase 5c: fix dark-mode settings text, palette close crash, complete menu bar
- Settings dark mode: the section nav (Appearance/Logs/...) showed black
  text because the NavRadio style had no BasedOn and fell back to the
  default WPF RadioButton template. Inherit the MaterialDesign implicit
  style so the text follows the theme.
- Command Palette: fix InvalidOperationException ("Cannot ... while a
  Window is closing") when double-clicking a result. Close() deactivated
  the window, whose Deactivated handler called Close() again. Route all
  closes through a re-entrancy guard.
- Menu bar completion (UI.md section 3):
  - File: Open config folder, Open log folder; Ctrl+Q on Exit.
  - View: Theme + Font size submenus (radio, checked via EnumToBoolean),
    Full screen (F11).
  - About (was empty): About CommandForge (-> Settings/About), License,
    Source on GitHub.
  - Help: Guide/Wiki, Check for updates (F5).
  Added SetThemeCommand/SetFontSizeCommand (SettingsViewModel) and
  ShowAboutCommand/OpenWikiCommand (MainViewModel); F5/F11/Ctrl+Q keys.

103 tests pass (added a menu-keys resx parity test); 0-warning Release
build; app verified to launch cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 18:04:27 +07:00
poli0981andClaude Opus 4.8 6a198872d1 Phase 5c: Home dashboard, favorites, window-state, accessibility
Completes Phase 5 (Polish):
- Home dashboard (default screen): recent commands, pinned favorites,
  and a read-only system-status widget (Windows + build, RAM, system
  drive, uptime) via ISystemInfoService. Status is read locally with
  no process spawn, no elevation and no network (golden rules).
- Favorites: pin/unpin from the list + detail star, persisted by id in
  config.json; a Favorites sidebar item filters the catalog to pins.
- Recent commands: last 10 run command ids tracked for Home.
- Window placement: persist + restore size/position/maximized, clamped
  to the virtual screen so a stale multi-monitor position never lands
  off-screen.
- Accessibility: AutomationProperties.Name on new controls + palette
  and confirmation inputs; heading semantics on Home; Ctrl+H opens Home.

Implementation notes:
- ISystemInfoService uses Environment.OSVersion + CsWin32
  GlobalMemoryStatusEx + DriveInfo + TickCount64 (AllowUnsafeBlocks for
  the generated interop).
- Pure, unit-tested helpers RecentCommands.Add / Favorites.Toggle and
  WindowPlacement.IsOnScreen.
- 102 tests pass; 0-warning Release build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 14:33:48 +07:00
poli0981andClaude Opus 4.8 899bd93e37 Phase 5b: Log Viewer, Debug panel, global crash handler, bug report
Diagnostics slice of Phase 5 (builds on 5a's in-shell nav):
- Structured logging: InMemoryLogStore now stores LogEntry (timestamp/level/message)
  + raises EntriesChanged; new ILogReader contract. A shared Serilog LoggingLevelSwitch
  (ILogLevelController) makes the level runtime-adjustable. ILogMaintenance exports a
  .zip (streams each log-*.txt with shared read so today's locked file is included),
  reports size, and deletes rolled files.
- Log Viewer (in-shell section, Ctrl+L / Tools menu): live entries, level + text filter,
  per-level color (theme-safe; Information inherits body), auto-scroll, open-folder /
  export-.zip / clear.
- Debug panel (in-shell, Tools + Settings>Advanced): verbose log dump, catalog
  counts + validation errors (now exposed via ICatalogProvider.ValidationErrors),
  system-info dump with copy.
- Global crash handler: Dispatcher/AppDomain/TaskScheduler -> structured Serilog log
  (no sensitive data) + friendly ErrorDialog (message, error code, Copy details,
  Report bug, Close); re-entrancy guard; recovers dispatcher exceptions.
- Report a bug (Help menu + from ErrorDialog): auto-gathered environment, export
  log .zip with review reminder, opens a prefilled GitHub issue. User-initiated; no
  auto-send (Privacy).
- Settings: new Logs (level / size / open / export / clear) and Advanced (run mode /
  config path / open Debug panel / reset-to-defaults — preserves terms + logs) sections;
  ISettingsService.LogLevel persisted and applied at startup.

EN/VI strings + AutomationProperties added. Dry-run deferred. 87 tests pass
(store/filter/report-template/catalog-errors/settings/DI/resx); 0-warning Release build;
Log Viewer smoke-verified live in dark mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:25:08 +07:00
poli0981andClaude Opus 4.8 adb898702b Phase 5a fixes: "System default" language revert + dark-mode contrast
- Language: "System default" now reverts to the OS culture. SetCulture had
  overwritten CultureInfo.CurrentUICulture, so "follow OS" resolved to the
  last-picked language. LocalizationManager captures the OS culture once
  (SystemCulture) and uses it for the follow-OS option (+ test).
- Dark-mode contrast:
  - Console / command-preview boxes used MaterialDesignTextFieldBoxBackground,
    which renders light in dark mode (shadowed by MaterialDesign2.Defaults, not
    refreshed by runtime SetTheme) -> light text on light box. Switched to
    MaterialDesignToolBarBackground, which follows the theme.
  - "Confirm before Dangerous" was IsEnabled=False (dimmed to near-unreadable in
    dark mode); now non-interactive (IsHitTestVisible/Focusable=False) at full
    contrast with a lock icon.
  - Danger badge text White -> near-black for AA contrast on the badge.

Verified by launching in Dark mode and capturing the console + Settings; 59 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 12:38:56 +07:00