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>
This commit is contained in:
poli0981andClaude Opus 5.5 committed 2026-10-21 23:12:10 +07:00
1 parent d71da598da
commit 06731cdd0b
7 files changed
+13 -21

No files matched your search

+2 -2
View File
@@ -37,7 +37,7 @@ jobs:
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.NUGET_PACKAGES }}
key: nuget-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Packages.props', '**/*.csproj') }}
key: nuget-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj') }}
restore-keys: nuget-${{ runner.os }}-
- name: Restore (NuGet audit fails on moderate+ advisories)
@@ -82,7 +82,7 @@ jobs:
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.NUGET_PACKAGES }}
key: nuget-package-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Packages.props', '**/*.csproj', '.config/dotnet-tools.json') }}
key: nuget-package-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj', '.config/dotnet-tools.json') }}
restore-keys: nuget-package-${{ runner.os }}-
- name: Publish + pack (Velopack smoke test)
+3 -2
View File
@@ -5,12 +5,13 @@
.DESCRIPTION
Produces, under Releases/:
CommandForge-win-Setup.exe, RELEASES, releases.win.json, *-full.nupkg, *-delta.nupkg
CommandForge-win-Setup.exe, CommandForge-win-Portable.zip, RELEASES, releases.win.json,
*-full.nupkg, *-delta.nupkg
Update is per-user (no UAC). The Elevator is published into the same folder by the
PublishElevatorOnPublish MSBuild target, so vpk packages it automatically.
vpk is pinned as a local .NET tool (.config/dotnet-tools.json) and must match the Velopack
library version in Directory.Packages.props.
library version referenced by CommandForge.Infrastructure.csproj and CommandForge.Wpf.csproj.
.PARAMETER Version
SemVer package version, e.g. 2.0.0 (no leading 'v'). Should match the git tag vX.Y.Z.
@@ -39,7 +39,7 @@ public interface ISettingsService
/// <summary>Whether the console auto-scrolls to the latest output (default <see langword="true"/>).</summary>
public bool AutoScrollConsole { get; set; }
/// <summary>Whether to warn before closing/cancelling while a command is running (default <see langword="true"/>).</summary>
/// <summary>Whether to ask before closing the app while a command is running (default <see langword="true"/>).</summary>
public bool WarnOnCancel { get; set; }
/// <summary>The minimum log level captured by the logging pipeline (default <see cref="LogLevel.Information"/>).</summary>
@@ -51,16 +51,10 @@ public interface ISettingsService
/// <summary>Recently-run command ids, most-recent first (default empty). Capped by the caller.</summary>
public IReadOnlyList<string> RecentCommandIds { get; set; }
/// <summary>
/// Retained for config back-compat only. The main window is now a fixed, non-resizable size, so this
/// value is no longer read or written; it round-trips untouched for users upgrading from older versions.
/// </summary>
/// <summary>Last main-window width in DIPs (restored size), or <see langword="null"/> if never saved (default size).</summary>
public double? WindowWidth { get; set; }
/// <summary>
/// Retained for config back-compat only. The main window is now a fixed, non-resizable size, so this
/// value is no longer read or written; it round-trips untouched for users upgrading from older versions.
/// </summary>
/// <summary>Last main-window height in DIPs (restored size), or <see langword="null"/> if never saved (default size).</summary>
public double? WindowHeight { get; set; }
/// <summary>Last main-window left position, or <see langword="null"/> if never saved (centre on launch).</summary>
@@ -69,10 +63,7 @@ public interface ISettingsService
/// <summary>Last main-window top position, or <see langword="null"/> if never saved (centre on launch).</summary>
public double? WindowTop { get; set; }
/// <summary>
/// Retained for config back-compat only. The main window can no longer be maximized, so this value is
/// no longer read or written; it round-trips untouched for users upgrading from older versions.
/// </summary>
/// <summary>Whether the main window was maximized when it was last closed.</summary>
public bool WindowMaximized { get; set; }
/// <summary>Persists the current settings to disk.</summary>
@@ -2,7 +2,7 @@ namespace CommandForge.Application.Search;
/// <summary>
/// Local natural-language search: maps everyday EN/VI phrases to a catalog search keyword
/// (e.g. "clean disk" / "dọn ổ đĩa" → "cleanup"). 100% LOCAL — no LLM, no network (golden rule #5).
/// (e.g. "clean disk" / "dọn ổ đĩa" → "cleanup"). 100% LOCAL — no LLM, no network (golden rule #7).
/// Phrases match whole words, ignoring case and accents ("pin" is battery, "typing" is not).
/// </summary>
public static class NaturalLanguageSearch
+1 -1
View File
@@ -24,7 +24,7 @@ public sealed class CrashHandlingService
_clipboard = clipboard;
}
/// <summary>Wires the three global exception sources. Call once at startup after the host is built.</summary>
/// <summary>Wires the three global exception sources. Call once at startup, right after the service provider is built.</summary>
public void Hook()
{
if (System.Windows.Application.Current is { } app)
@@ -2,7 +2,7 @@ namespace CommandForge.Desktop.Services;
/// <summary>
/// Modal prompts used by view-models. Behind an interface so view-models stay testable and the
/// presentation (message boxes today, Fluent dialogs later) can change without touching them.
/// presentation (Fluent in-window dialogs, with a message-box fallback) can change without touching them.
/// </summary>
public interface IDialogService
{
@@ -23,7 +23,7 @@
<ProjectReference Include="..\..\src\CommandForge.Domain\CommandForge.Domain.csproj" />
<ProjectReference Include="..\..\src\CommandForge.Application\CommandForge.Application.csproj" />
<ProjectReference Include="..\..\src\CommandForge.Infrastructure\CommandForge.Infrastructure.csproj" />
<!-- Referenced so the catalog-keys test can verify titles/descriptions exist in the .resx (EN+VI). -->
<!-- Referenced so the catalog and UI key tests can check every key exists in all five .resx files. -->
<ProjectReference Include="..\..\src\CommandForge.Wpf\CommandForge.Wpf.csproj" />
</ItemGroup>