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>
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>
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>
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>
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>
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>
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>
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>
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>
- .editorconfig: charset utf-8-bom -> utf-8. The source files are UTF-8
without BOM; aligning the rule to reality avoids rewriting every file
with a BOM (a noisy, no-value diff) and matches the cross-platform
convention. `dotnet format --verify-no-changes` now passes.
- dotnet format pass (whitespace/EOL normalization; AssemblyInfo spacing).
- Remove unused strongly-typed Strings properties (AppTitle, Menu*,
Sidebar*, Pane*, ComingSoon). The UI binds via {res:Loc Key}/Strings.Get,
not these members; the .resx keys are retained. The strict analyzer gate
(IDE0005/IDE0051/CA1823 as errors) already keeps private/usings clean,
so this is the remaining dead public API.
0-warning Release build; 103 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 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>
Addresses issues found while testing the running app:
- Dark mode: the Deep Purple accent was too dark to read on dark
backgrounds. ThemeService now applies a lighter primary (Deep Purple
200) for the dark base theme and keeps Deep Purple 500 for light, so
flat-button text, tabs, sidebar selection and the favorite star stay
legible. Fixes it everywhere via the shared PrimaryHueMid brushes.
- Report bug: the multiline description caret now starts at the top
(VerticalContentAlignment=Top).
- Log Viewer: entries pin to the top instead of appearing centred.
- Home: more left padding; recent/favorites rows grow to fit the two-
line (title + description) content instead of clipping; the sidebar
Settings button no longer sits flush against the bottom edge.
- Settings: config.json is recreated with defaults on startup if it was
deleted while the app was closed.
102 tests pass; 0-warning Release build; app verified to launch cleanly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
- 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>
Foundation slice of Phase 5 (polish):
- Settings model: AppTheme/FontScale enums + 9 new ISettingsService settings
(theme, language, font size, sidebar/badges, confirm-caution, restore point,
auto-scroll, warn-on-cancel), persisted to config.json (string enums).
- Runtime i18n, no restart: LocalizationManager (INotifyPropertyChanged indexer) +
LocExtension now returns a live Binding, so {res:Loc} flips language instantly;
catalog display strings refresh in place on culture change.
- ThemeService (Light/Dark/System via MaterialDesign PaletteHelper, tracks OS) and
FontScaleService (AppFontSize DynamicResource); applied at startup from settings.
- In-shell navigation: MainWindow content swaps between CatalogView (extracted) and
a new SettingsView via CurrentSection; opened by the sidebar gear / View menu / Ctrl+,.
- Settings screen: Appearance (live theme/lang/font + sidebar/badges), Behavior &
Safety (Dangerous-confirm locked on), Updates (auto-check + Check now + version),
About (version, GPLv3/GitHub links, "no data collected"). EN/VI strings + a11y names.
- Consumption: confirmation honors ConfirmCaution (Dangerous always confirms); restore
point, auto-scroll, warn-on-cancel, sidebar-collapse and badges read the settings.
Tests: settings round-trip + defaults, LocalizationManager culture flip, Settings UI
key coverage EN/VI. 58 tests pass; 0-warning Release build; clean startup smoke.
Diagnostics (Log Viewer/Debug/crash handler) are 5b; Home/favorites/full a11y are 5c.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the publish-time Elevator copy (which globbed a non-RID build path and
shipped a framework-dependent exe) with an explicit `dotnet publish` of the
Elevator into the app's PublishDir, inheriting Configuration/TFM/RID/SelfContained.
A clean `publish -r win-x64 --self-contained` now reliably bundles a RID-correct,
self-contained CommandForge.Elevator.exe next to the app (where
BrokerElevationService spawns it via AppContext.BaseDirectory). The dev-build copy
(CopyElevator, AfterTargets=Build) is unchanged.
Verified: dotnet clean + scripts/pack.ps1 -Version 0.3.0 -> Elevator present in
publish with "includedFrameworks" (self-contained); 53 tests still pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vpk verifies VelopackApp.Build().Run() is present in the main executable. Calling
it via VelopackBootstrap (Infrastructure) failed that check ("Unable to verify
VelopackApp is called"), so call it directly in App.OnStartup and reference
Velopack from the WPF project. Removes the now-unused VelopackBootstrap. Also fix
pack.ps1 --mainExe to CommandForge.Wpf.exe (the actual published exe name).
Verified: scripts/pack.ps1 -Version 0.3.0 with vpk 1.2.0 produces
CommandForge-win-Setup.exe + *-full.nupkg + RELEASES; the Elevator is bundled.
53 tests still pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the update path per the roadmap: IUpdateService -> VelopackUpdateService
(GithubSource against the project repo; per-user install, no UAC), a minimal
"Check for updates" dialog (check -> prompt -> progress -> apply & restart),
mapped error dialogs (404/403/429/5xx/offline; 419 is not special-cased), an
"auto-check on startup" setting, and scripts/pack.ps1 for vpk packaging.
- Application stays Velopack-free: UpdateError, UpdateCheckResult, pure
UpdateErrorMapper, widened IUpdateService, CheckForUpdateUseCase.
- Infrastructure: VelopackUpdateService (lazy manager, degrades to NotInstalled
in dev) + VelopackBootstrap so the WPF layer never references Velopack.
- WPF: UpdateViewModel/UpdateDialog, IUpdateDialogService, Tools menu item,
VelopackApp.Build().Run() at startup + non-blocking auto-check, gated on the
Phase 3 "command running" guard before applying.
- Tests: error mapping (429 handled, 419 -> Unknown), use-case pass-through,
DI resolution.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the remaining commands from the catalog spec across system-maintenance,
updates-packages, tweaks-shortcuts, network, cleanup, power, diagnostics,
security-privacy and developer. Multi-step and file-deletion commands are fixed
single `powershell -NoProfile -Command "..."` entries (no new execution
capability), respecting the read-only embedded catalog (golden rule #1). EN/VI
.resx title/description keys added for every new command.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Elevator pipe server: accepts only a commandId, validates it against its OWN
embedded catalog (id exists + requiresAdmin), runs via ProcessCommandExecutor,
streams output, supports mid-run cancel. Never builds a command from pipe input.
- Pipe: per-session GUID name + current-user DACL; UI is the pipe server
(medium IL), Elevator connects as client (high IL) to avoid the integrity barrier.
- BrokerElevationService: spawns the Elevator once per session via runas (one UAC),
relays Run/Cancel and streamed output; graceful UAC-declined handling.
- RunCommandUseCase routes admin commands to the broker, others in-process.
- 6 Safe admin commands (DISM CheckHealth/ScanHealth/Analyze, chkdsk read,
BitLocker status, Windows features) + EN/VI strings; system-maintenance populated.
- Wpf copies CommandForge.Elevator.exe next to the app (build + publish).
- Security hardening (from review): pin process WorkingDirectory to System32 so a
bare executable name can't resolve from an attacker-controlled CWD when elevated.
- Tests: pipe protocol round-trip, ElevationServer over an in-process named pipe
(fakes), admin/non-admin routing (35 total).
Build -c Release: 0 warnings. dotnet test: 35/35. UAC flow verified manually.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>