Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0d201a2ec | ||
|
|
561955a30c
|
||
|
|
3bc7c996c0 | ||
|
|
d50ef55369
|
||
|
|
f59bc54e0d | ||
|
|
7bad284c21
|
||
|
|
e5593b1f74
|
||
|
|
49301f266b
|
||
|
|
de7f12c324
|
||
|
|
cad42ac9cf
|
||
|
|
2d09b0a7f4
|
||
|
|
d39f188ea6
|
||
|
|
aae42f7e2f
|
||
|
|
43606c5b9f
|
||
|
|
3776562fb6
|
||
|
|
48efda1071
|
||
|
|
83286ed1c3
|
||
|
|
ea60d58ac7 | ||
|
|
f9eb5e19eb
|
||
|
|
e696b33196
|
||
|
|
de3a7a69ca
|
||
|
|
0e048d85ad
|
||
|
|
9c1e619880 | ||
|
|
cb9d818fc5
|
||
|
|
ded58c145f
|
||
|
|
36bc62d7ba
|
||
|
|
79670fbe6f
|
||
|
|
4507faa6b3
|
||
|
|
24cf5f04f7 | ||
|
|
d95db53a2e
|
||
|
|
7d9fe19023
|
||
|
|
cb1386cc9a
|
||
|
|
2741691c81
|
||
|
|
32f97fac69
|
||
|
|
47dae756d9
|
||
|
|
ee696465ad
|
||
|
|
d054902117
|
||
|
|
df3b9e3753 | ||
|
|
5724855f63 | ||
|
|
4de305d3ae | ||
|
|
3ab59b443f |
No files matched your search
@@ -9,12 +9,12 @@
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"dotnet-sonarscanner": {
|
||||
"version": "12.0.0",
|
||||
"cyclonedx": {
|
||||
"version": "6.3.2",
|
||||
"commands": [
|
||||
"dotnet-sonarscanner"
|
||||
"dotnet-CycloneDX"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,3 +32,73 @@ indent_size = 2
|
||||
# Generated files: relax style enforcement
|
||||
[*.{g,g.i,Designer}.cs]
|
||||
generated_code = true
|
||||
|
||||
# --- ReSharper inspections: what Qodana reads (qodana.yaml, .gitea/workflows/qodana.yml) ---
|
||||
# Qodana for .NET runs ReSharper's engine, and the engine reads these keys; so does Rider or ReSharper in the editor,
|
||||
# which is why they are here and not in qodana.yaml: the same list everywhere. An inspection is off only where it
|
||||
# argues with a choice this project made; each line says which. Everything else it reports is fixed. (What is NOT
|
||||
# ReSharper's - a whole severity, the IntelliJ platform's inspections, JetBrains' security rules, a file the engine
|
||||
# itself misreads - is in qodana.yaml.)
|
||||
[*.{cs,xaml}]
|
||||
# A code-behind class names its base so that the type reads whole without the half XAML generates.
|
||||
resharper_redundant_extends_list_entry_highlighting = none
|
||||
# An argument that repeats a default says which value the call relies on (updateAccent: true, Mica, Hide(None)).
|
||||
resharper_redundant_argument_default_value_highlighting = none
|
||||
# `partial void OnXChanged(T value)`: the signature is CommunityToolkit.Mvvm's generator's, used or not.
|
||||
resharper_unused_parameter_in_partial_method_highlighting = none
|
||||
# WPF UI's implicit styles (BasedOn {x:Type ui:Button}, ui:Card) arrive with ui:ControlsDictionary at run time, from
|
||||
# a package's compiled resources the inspection does not read. A key that does not exist fails as the page loads.
|
||||
resharper_xaml_static_resource_not_resolved_highlighting = none
|
||||
# Pages get their DataContext in code (ShellPageProvider) and item templates bind to view-models the XAML does not
|
||||
# declare, so the engine cannot resolve those bindings; it would ask for design-time types on every page. The
|
||||
# accessibility tests check what the bindings must provide (names for every control and list item).
|
||||
resharper_xaml_binding_with_context_not_resolved_highlighting = none
|
||||
# Proposals, not findings - ReSharper's suggestions for a style this project did not take. Its style is this file,
|
||||
# `dotnet format` and the analyzers the build treats as errors (SonarAnalyzer included).
|
||||
resharper_convert_to_primary_constructor_highlighting = none
|
||||
resharper_merge_into_pattern_highlighting = none
|
||||
resharper_use_utf8_string_literal_highlighting = none
|
||||
resharper_arrange_object_creation_when_type_evident_highlighting = none
|
||||
resharper_convert_closure_to_method_group_highlighting = none
|
||||
resharper_use_collection_expression_highlighting = none
|
||||
resharper_convert_to_auto_property_highlighting = none
|
||||
# The streams and pipes these name are closed synchronously on purpose; `await using` would add a ConfigureAwait to
|
||||
# every one without closing them any sooner.
|
||||
resharper_use_await_using_highlighting = none
|
||||
# A member's accessibility is what its type offers, not a count of today's callers.
|
||||
resharper_member_can_be_private_global_highlighting = none
|
||||
resharper_property_can_be_made_init_only_global_highlighting = none
|
||||
resharper_auto_property_can_be_made_get_only_global_highlighting = none
|
||||
# "Never used" across the solution is not what decides for a member other code can reach: a view-model's properties
|
||||
# and commands are read by XAML bindings the engine cannot resolve (above), the product links by x:Static, and a
|
||||
# model's members by System.Text.Json. The private kind (.Local) stays on.
|
||||
resharper_unused_member_global_highlighting = none
|
||||
resharper_unused_auto_property_accessor_global_highlighting = none
|
||||
resharper_unused_method_return_value_global_highlighting = none
|
||||
resharper_unused_parameter_global_highlighting = none
|
||||
resharper_class_never_instantiated_global_highlighting = none
|
||||
resharper_event_never_subscribed_to_global_highlighting = none
|
||||
resharper_collection_never_queried_global_highlighting = none
|
||||
# The compiler's nullable analysis is the gate (warnings are errors). These three go further and call a guard
|
||||
# redundant because an annotation promises non-null - where a JSON file read from disk, a dependency property or a
|
||||
# WPF event hands over null all the same (the corrupt-file tests rely on those guards).
|
||||
resharper_null_coalescing_condition_is_always_not_null_according_to_api_contract_highlighting = none
|
||||
resharper_conditional_access_qualifier_is_non_nullable_according_to_api_contract_highlighting = none
|
||||
resharper_condition_is_always_true_or_false_according_to_nullable_api_contract_highlighting = none
|
||||
# A record's positional property is part of its equality and of what it prints, and XAML binds to it by name.
|
||||
resharper_not_accessed_positional_property_global_highlighting = none
|
||||
resharper_not_accessed_positional_property_local_highlighting = none
|
||||
# `default: break;` is how a switch says the rest is left alone on purpose (and Sonar S131 asks for the default).
|
||||
resharper_redundant_empty_switch_section_highlighting = none
|
||||
# Async void only for event handlers (CLAUDE.md), which is what these are.
|
||||
resharper_async_void_event_handler_method_highlighting = none
|
||||
|
||||
[*.resx]
|
||||
# A vi, ja, zh-Hans or es value that equals the English one is deliberate: product, tool and command names (winget,
|
||||
# DISM, SFC), units and format strings are not translated.
|
||||
resharper_overridden_with_same_value_highlighting = none
|
||||
|
||||
[tests/**/*.cs]
|
||||
# A test's lambda runs inside the `using` scope it captures from, and reads a variable the test changes on purpose.
|
||||
resharper_access_to_disposed_closure_highlighting = none
|
||||
resharper_access_to_modified_closure_highlighting = none
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Announce Release
|
||||
|
||||
# Posts a release to Discord through the ops repo's announce-release.yml (which reads the release
|
||||
# from the Gitea API).
|
||||
#
|
||||
# Tag releases are announced by release.yml itself: a release created with the job token fires no
|
||||
# `release` event (Gitea credits it to its Actions user, whose events start nothing). This workflow
|
||||
# covers a release a person publishes in the UI, and re-runs: Actions → Announce Release → Run
|
||||
# workflow, with the tag.
|
||||
# Secrets: DISCORD_RELEASES_WEBHOOK (or DISCORD_REPO_WEBHOOK); optional DISCORD_PING_ROLE_ID.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag to announce (e.g. v2.3.0)
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/announce-release.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
# Only what the shared workflow declares, not `inherit`.
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -1,5 +1,15 @@
|
||||
name: Build
|
||||
|
||||
# Build, format check, tests and a packaging smoke test on every push to main and every pull
|
||||
# request (Gitea Actions, ops runbook poli0981/.github docs/GITEA-MIGRATION.md).
|
||||
#
|
||||
# - `windows-latest` is HOST MODE on the maintainer's PC (PowerShell, no isolation): setup-dotnet
|
||||
# installs into the runner tool cache (DOTNET_INSTALL_DIR), never into C:\Program Files. NuGet
|
||||
# packages come from the PC's per-user cache, which outlives the job, so there is no actions/cache.
|
||||
# - Upstream actions/upload-artifact v4+ refuses non-GitHub servers: the Gitea fork uploads.
|
||||
# - Outsiders cannot open pull requests on Gitea (registration is off), so no run here comes from
|
||||
# a stranger's fork.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -17,29 +27,29 @@ concurrency:
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# WPF (net10.0-windows) only builds on Windows.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
- name: Keep .NET SDK installs in the runner tool cache (host mode)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$base = if ($env:RUNNER_TOOL_CACHE) { $env:RUNNER_TOOL_CACHE } else { Join-Path $env:LOCALAPPDATA 'gitea-runner\toolcache' }
|
||||
"DOTNET_INSTALL_DIR=$(Join-Path $base 'dotnet')" >> $env:GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
key: nuget-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj') }}
|
||||
restore-keys: nuget-${{ runner.os }}-
|
||||
|
||||
- name: Restore (NuGet audit fails on moderate+ advisories)
|
||||
run: dotnet restore CommandForge.slnx
|
||||
|
||||
@@ -58,40 +68,43 @@ jobs:
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: test-results
|
||||
path: TestResults
|
||||
if-no-files-found: ignore
|
||||
retention-days: 14
|
||||
|
||||
package:
|
||||
# Publishes and packs exactly like release.yml, so a packaging regression (e.g. the Elevator
|
||||
# missing from the publish folder) fails the PR instead of the tagged release.
|
||||
# missing from the publish folder) fails the pull request instead of the tagged release.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
- name: Keep .NET SDK installs in the runner tool cache (host mode)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$base = if ($env:RUNNER_TOOL_CACHE) { $env:RUNNER_TOOL_CACHE } else { Join-Path $env:LOCALAPPDATA 'gitea-runner\toolcache' }
|
||||
"DOTNET_INSTALL_DIR=$(Join-Path $base 'dotnet')" >> $env:GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
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)
|
||||
shell: pwsh
|
||||
run: ./scripts/pack.ps1 -Version 0.0.1
|
||||
|
||||
- name: Upload installer preview
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: installer-preview
|
||||
path: Releases/*-Setup.exe
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Notify CI Failure
|
||||
|
||||
# A failed run of the workflows below on main posts to Discord through the ops repo's
|
||||
# notify-ci-failure.yml (its script is loaded at `ops_ref`, the same commit as `uses:`). Neither file
|
||||
# checks out the triggering run's code: they read run metadata only, and the shared workflow passes
|
||||
# every untrusted field to the notifier through `env:`. Pull-request runs are skipped there (it only
|
||||
# reports the default branch). Requires the repository secret DISCORD_CI_WEBHOOK.
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build", "Qodana", "Security"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.gitea/workflows/notify-ci-failure.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
default_branch: main
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_CI_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}
|
||||
@@ -0,0 +1,26 @@
|
||||
name: Notify Release Pipeline
|
||||
|
||||
# Every finished run of release.yml (success, failure or cancelled) is reported to Discord through
|
||||
# the ops repo's notify-release-pipeline.yml. It matches the producer by its exact `name:`, so
|
||||
# renaming release.yml's `name: Release` silently breaks this filter.
|
||||
# Requires the repository secret DISCORD_RELEASE_PIPELINE_WEBHOOK.
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Release"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.gitea/workflows/notify-release-pipeline.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_RELEASE_PIPELINE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PIPELINE_WEBHOOK }}
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Qodana
|
||||
|
||||
# JetBrains Qodana for .NET (`qodana-dotnet`, Rider's engine, on the Ultimate licence of the Qodana
|
||||
# Cloud project): ReSharper's C#, XAML and .resx inspections, the IntelliJ platform's Markdown and
|
||||
# XML inspections and JetBrains' security rules, over the whole solution. Every setting is in
|
||||
# qodana.yaml; the gate there is zero problems.
|
||||
#
|
||||
# Runs the Qodana CLI through the ops repo's reusable-qodana.yml (JetBrains/qodana-action needs
|
||||
# GitHub's APIs). Gitea has no code-scanning UI: the results go to Qodana Cloud and to the run's
|
||||
# `qodana-report` artifact (SARIF and the linter's logs, for a reader without a Qodana Cloud account).
|
||||
#
|
||||
# - Native mode on `windows-latest` (host mode on the maintainer's PC): WPF (net10.0-windows) only
|
||||
# loads on Windows, and the linter reads the projects with the SDK global.json names.
|
||||
# - The solution is built first (prepare-command), so a build that fails is one red step with the
|
||||
# compiler's own message rather than a report of unresolved symbols.
|
||||
# - Advisory: not a required check of `main`, so a finding, a Qodana Cloud outage or a lapsed licence
|
||||
# is a red job beside a green build, never a blocked merge. Runs started by renovate-bot skip it
|
||||
# (the reusable's rule: a same-repo pull request gets the repository's secrets).
|
||||
# Requires the repository secret QODANA_TOKEN.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
qodana:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/reusable-qodana.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
runs-on: windows-latest
|
||||
dotnet-global-json-file: global.json
|
||||
prepare-command: dotnet build CommandForge.slnx -c Release
|
||||
artifact-name: qodana-report
|
||||
secrets:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
@@ -0,0 +1,235 @@
|
||||
name: Release
|
||||
|
||||
# A signed `vX.Y.Z` tag on main releases CommandForge (RELEASING.md; ops runbook §3.3 and §5.1):
|
||||
#
|
||||
# build publish + Velopack pack (scripts/pack.ps1) on the maintainer's PC (host mode), the
|
||||
# CycloneDX SBOM, SHA256SUMS and the release notes (scripts/release-assets.ps1), an
|
||||
# optional VirusTotal scan, then `vpk upload s3` to Cloudflare R2: packages first, the
|
||||
# feed (releases.win.json) last, so a client never sees a feed whose files are missing.
|
||||
# Installed copies (2.3.0 and later) update from https://releases.poli0981.dev/commandforge.
|
||||
# publish the ops repo's publish-r2.yml puts SHA256SUMS and the SBOM under <version>/.
|
||||
# release a Gitea release with the notes and the links (no binaries: the forge's disk is not for
|
||||
# them, runbook §1).
|
||||
# announce Discord, through the ops repo's announce-release.yml: a release made with the job
|
||||
# token fires no `release` event, so announce-release.yml would never run by itself.
|
||||
#
|
||||
# Manual run (Actions → Release → Run workflow) on a branch is a DRY RUN: it builds, packs, writes
|
||||
# the SBOM/checksums/notes from <Version> in Directory.Build.props, and reads the previous release
|
||||
# from R2 (a check of the R2 credentials), but uploads nothing; the files stay as the `r2-release`
|
||||
# artifact. Uploads, the release and the announcement happen only for a `v*` tag. A file uploaded
|
||||
# under a versioned name is never replaced: to ship a fix, bump the version.
|
||||
#
|
||||
# Release credentials (user-level secrets R2_RELEASES_ACCESS_KEY_ID / _SECRET_ACCESS_KEY, variable
|
||||
# R2_ACCOUNT_ID) exist only in steps of this tag/dispatch-only workflow (runbook §2 rule 10), as VPK_*
|
||||
# environment variables, never on a command line. Optional repository secret VT_API_KEY turns on
|
||||
# the VirusTotal scan. No dependency caches: a poisoned cache could end up inside the installer.
|
||||
# No code signing yet (SECURITY.md), no build-provenance attestations (no OIDC on Gitea, D7).
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build, pack and upload to R2
|
||||
runs-on: windows-latest # host mode on the maintainer's PC (PowerShell)
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
version: ${{ steps.ver.outputs.version }}
|
||||
env:
|
||||
IS_TAG: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
# Velopack's S3 options (vpk reads VPK_<OPTION>): bucket poli0981-releases, folder commandforge/
|
||||
VPK_BUCKET: poli0981-releases
|
||||
VPK_PREFIX: commandforge/
|
||||
VPK_ENDPOINT: https://${{ vars.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Keep .NET SDK installs in the runner tool cache (host mode)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$base = if ($env:RUNNER_TOOL_CACHE) { $env:RUNNER_TOOL_CACHE } else { Join-Path $env:LOCALAPPDATA 'gitea-runner\toolcache' }
|
||||
"DOTNET_INSTALL_DIR=$(Join-Path $base 'dotnet')" >> $env:GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
# A tag must name the version Directory.Build.props carries (the release commit sets both).
|
||||
- name: Resolve the version
|
||||
id: ver
|
||||
shell: pwsh
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
R2_ACCOUNT_ID: ${{ vars.R2_ACCOUNT_ID }}
|
||||
run: |
|
||||
function Fail([string]$msg) { Write-Host "::error::$msg"; exit 1 }
|
||||
$props = "$(dotnet msbuild src/CommandForge.Domain/CommandForge.Domain.csproj -getProperty:Version | Select-Object -Last 1)".Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or $props -notmatch '^\d+\.\d+\.\d+$') { Fail "Unexpected <Version> '$props' in Directory.Build.props" }
|
||||
if ($env:IS_TAG -eq 'true') {
|
||||
$version = $env:REF_NAME -replace '^v', ''
|
||||
if ($version -ne $props) { Fail "Tag $($env:REF_NAME) does not match <Version> $props in Directory.Build.props" }
|
||||
} else {
|
||||
$version = $props
|
||||
Write-Host "::notice::Dry run on $($env:REF_NAME): builds $version, uploads nothing."
|
||||
}
|
||||
if ($env:R2_ACCOUNT_ID -notmatch '^[0-9a-f]{32}$') { Fail 'Actions variable R2_ACCOUNT_ID is missing or not a 32-hex Cloudflare account ID' }
|
||||
"version=$version" >> $env:GITHUB_OUTPUT
|
||||
Write-Host "Releasing CommandForge $version"
|
||||
|
||||
- name: Restore pinned tools (vpk, CycloneDX)
|
||||
run: dotnet tool restore
|
||||
|
||||
# The previous release, so vpk can build a delta package. Nothing to find before the first
|
||||
# release on R2 (2.3.0): the step then fails and the job goes on.
|
||||
- name: Download the previous release from R2
|
||||
continue-on-error: true
|
||||
shell: pwsh
|
||||
env:
|
||||
VPK_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
VPK_SECRET: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
run: |
|
||||
dotnet vpk download s3 --channel win --outputDir Releases
|
||||
exit $LASTEXITCODE
|
||||
|
||||
- name: Publish + pack (Velopack)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
run: ./scripts/pack.ps1 -Version $env:VERSION
|
||||
|
||||
# A step's own env is not visible to its `if:`, so a step of its own looks for the key.
|
||||
- name: Look for VT_API_KEY
|
||||
id: vtkey
|
||||
shell: pwsh
|
||||
env:
|
||||
VT_API_KEY: ${{ secrets.VT_API_KEY }}
|
||||
run: |
|
||||
"available=$(if ($env:VT_API_KEY) { 'true' } else { 'false' })" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: VirusTotal scan (optional)
|
||||
id: vt
|
||||
if: ${{ env.IS_TAG == 'true' && steps.vtkey.outputs.available == 'true' }}
|
||||
uses: crazy-max/ghaction-virustotal@936d8c5c00afe97d3d9a1af26d017cfdf26800a2 # v5.0.0
|
||||
with:
|
||||
vt_api_key: ${{ secrets.VT_API_KEY }}
|
||||
files: |
|
||||
Releases/CommandForge-win-Setup.exe
|
||||
Releases/CommandForge-${{ steps.ver.outputs.version }}-full.nupkg
|
||||
|
||||
- name: SBOM, SHA256SUMS and release notes
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
VT_ANALYSIS: ${{ steps.vt.outputs.analysis }}
|
||||
run: ./scripts/release-assets.ps1 -Version $env:VERSION -VirusTotalAnalysis "$env:VT_ANALYSIS"
|
||||
|
||||
# vpk uploads the packages, the installer and the portable zip first and the feed last, and
|
||||
# keeps the 10 newest releases in the feed folder (the only deletion CI does, runbook §3.3).
|
||||
# Should R2 refuse the AWS SDK's default checksums, the upload is tried once more with
|
||||
# --disableChecksumValidation, and the log says so.
|
||||
- name: Upload to R2 (Velopack)
|
||||
if: ${{ env.IS_TAG == 'true' }}
|
||||
shell: pwsh
|
||||
env:
|
||||
VPK_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
VPK_SECRET: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
run: |
|
||||
dotnet vpk upload s3 --channel win --outputDir Releases --keepMaxReleases 10
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host '::warning::vpk upload s3 failed; trying once more with --disableChecksumValidation'
|
||||
dotnet vpk upload s3 --channel win --outputDir Releases --keepMaxReleases 10 --disableChecksumValidation
|
||||
}
|
||||
exit $LASTEXITCODE
|
||||
|
||||
- name: Smoke test the public files
|
||||
if: ${{ env.IS_TAG == 'true' }}
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
run: |
|
||||
$base = 'https://releases.poli0981.dev/commandforge'
|
||||
foreach ($name in 'releases.win.json', 'CommandForge-win-Setup.exe', 'CommandForge-win-Portable.zip', "CommandForge-$($env:VERSION)-full.nupkg") {
|
||||
$code = curl.exe -sS -o NUL -I -w '%{http_code}' --retry 3 --retry-all-errors "$base/$name"
|
||||
Write-Host "HEAD $base/$name -> $code"
|
||||
if ($code -ne '200') { Write-Host "::error::Not reachable after upload: $base/$name"; exit 1 }
|
||||
}
|
||||
$feed = curl.exe -fsS --retry 3 "$base/releases.win.json" | ConvertFrom-Json
|
||||
if (-not ($feed.Assets | Where-Object { $_.Version -eq $env:VERSION })) { Write-Host "::error::releases.win.json does not list $($env:VERSION)"; exit 1 }
|
||||
|
||||
- name: Keep the release files
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: r2-release
|
||||
path: r2-release/
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
publish:
|
||||
name: SHA256SUMS and SBOM to R2
|
||||
needs: build
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/publish-r2.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
app: commandforge
|
||||
artifact: r2-release
|
||||
versioned-dir: versioned # versioned/2.3.0/SHA256SUMS → commandforge/2.3.0/SHA256SUMS
|
||||
runs-on: ubuntu-latest
|
||||
secrets:
|
||||
R2_RELEASES_ACCESS_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
R2_RELEASES_SECRET_ACCESS_KEY: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
|
||||
release:
|
||||
name: Gitea release (notes + links)
|
||||
needs: [build, publish]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write # which of contents / releases Gitea enforces is unverified (runbook §3.2 item 5)
|
||||
releases: write
|
||||
steps:
|
||||
- name: Download the release files
|
||||
uses: christopherhx/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # v4
|
||||
with:
|
||||
name: r2-release
|
||||
path: r2-release
|
||||
|
||||
- name: Create the release
|
||||
uses: https://gitea.com/actions/gitea-release-action@5a83c90484ef4355121df5eb60558c8ce66e81ac # v1.3.7
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: CommandForge ${{ needs.build.outputs.version }}
|
||||
body_path: r2-release/release-notes.md
|
||||
|
||||
announce:
|
||||
needs: release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/announce-release.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
tag_override: ${{ github.ref_name }}
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -0,0 +1,82 @@
|
||||
name: Security
|
||||
|
||||
# Gitea has no CodeQL, no dependency review and no code-scanning UI (ops runbook §1, migration
|
||||
# decision D7). This workflow covers instead:
|
||||
#
|
||||
# workflow-lint actionlint + shellcheck on .gitea/workflows/*.yml (CodeQL's `actions` analysis
|
||||
# is gone; Opengrep's GitHub Actions rules below also check for injection)
|
||||
# scan the ops repo's security.yml: gitleaks (full history), Opengrep (SAST, report
|
||||
# only), osv-scanner (lockfiles; this repo has none, so it has nothing to scan)
|
||||
# and a `dotnet restore` with NuGetAudit that fails on high/critical advisories
|
||||
# (NU1903/NU1904). build.yml's restore already fails on moderate ones.
|
||||
#
|
||||
# Weekly as well, so a new advisory against unchanged dependencies turns it red: Friday 14:11 UTC
|
||||
# = 21:11 Vietnam (a free slot in the ops repo's cron registry; the runner is the maintainer's PC
|
||||
# and only runs 13:00–16:00 UTC).
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '11 14 * * 5'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
# Both linters as release binaries at pinned versions, SHA-256 verified (the pins of the ops
|
||||
# repo's ops-lint.yml). Renovate does not update them: bump version and checksum together.
|
||||
workflow-lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
ACTIONLINT_VERSION: 1.7.12
|
||||
ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 # actionlint_1.7.12_linux_amd64.tar.gz
|
||||
SHELLCHECK_VERSION: v0.11.0
|
||||
SHELLCHECK_SHA256: 8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198 # shellcheck-v0.11.0.linux.x86_64.tar.xz
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install actionlint ${{ env.ACTIONLINT_VERSION }} + shellcheck ${{ env.SHELLCHECK_VERSION }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tmp="${RUNNER_TEMP:-/tmp}"
|
||||
bin="$tmp/lint-bin"
|
||||
mkdir -p "$bin"
|
||||
curl -fsSL --retry 3 -o "$tmp/actionlint.tar.gz" \
|
||||
"https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
|
||||
echo "${ACTIONLINT_SHA256} $tmp/actionlint.tar.gz" | sha256sum -c -
|
||||
tar -xzf "$tmp/actionlint.tar.gz" -C "$bin" actionlint
|
||||
curl -fsSL --retry 3 -o "$tmp/shellcheck.tar.xz" \
|
||||
"https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
|
||||
echo "${SHELLCHECK_SHA256} $tmp/shellcheck.tar.xz" | sha256sum -c -
|
||||
tar -xJf "$tmp/shellcheck.tar.xz" -C "$bin" --strip-components=1 "shellcheck-${SHELLCHECK_VERSION}/shellcheck"
|
||||
echo "$bin" >> "$GITHUB_PATH"
|
||||
|
||||
# The files by name: actionlint only finds .github/workflows by itself. .github/actionlint.yaml
|
||||
# ignores only the Gitea features actionlint does not know; everything else stays an error.
|
||||
- name: actionlint (workflow syntax and expressions)
|
||||
run: |
|
||||
actionlint -version
|
||||
actionlint -color -config-file .github/actionlint.yaml \
|
||||
-shellcheck "$(command -v shellcheck)" .gitea/workflows/*.yml
|
||||
|
||||
scan:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/security.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
dotnet: true
|
||||
dotnet-runs-on: windows-latest # WPF (net10.0-windows) restores only on Windows
|
||||
dotnet-solution: CommandForge.slnx
|
||||
@@ -3,14 +3,13 @@
|
||||
This project adopts the **[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)**.
|
||||
|
||||
In short: be respectful and constructive. Harassment, insults, personal attacks, and other
|
||||
behavior that violates
|
||||
[GitHub's Acceptable Use Policies](https://docs.github.com/site-policy/acceptable-use-policies)
|
||||
are not tolerated in this project's spaces (issues, pull requests, discussions, and comments).
|
||||
abusive behavior are not tolerated in this project's spaces (issues, merge requests, e-mail and
|
||||
comments, on the GitLab mirror or anywhere else the project is discussed).
|
||||
|
||||
Please read the full text linked above.
|
||||
|
||||
## Reporting
|
||||
|
||||
To report unacceptable behavior, email **[code@poli0981.dev](mailto:code@poli0981.dev)**. Reports
|
||||
are handled privately; don't put sensitive details in a public issue. You can also use GitHub's
|
||||
**Report content** option on the comment or issue concerned.
|
||||
are handled privately; don't put sensitive details in a public issue. On the GitLab mirror you can
|
||||
also use GitLab's **Report abuse** option on the comment or issue concerned.
|
||||
+66
-20
@@ -2,7 +2,45 @@
|
||||
|
||||
Thanks for your interest! CommandForge is a GPLv3, offline-first Windows tool that runs
|
||||
system-level commands, so **safety and clarity matter more than speed**. Please read this before
|
||||
opening an issue or pull request.
|
||||
opening an issue or merge request.
|
||||
|
||||
## Where things live
|
||||
|
||||
- **Source (canonical):** [`git.poli0981.dev/poli0981/CommandForge`](https://git.poli0981.dev/poli0981/CommandForge), the maintainer's
|
||||
Gitea. Its registration is closed, so it is read-only for everyone else; CI (Gitea Actions) runs
|
||||
there.
|
||||
- **Issues and merge requests:** the public mirror [`gitlab.com/poli0981/CommandForge`](https://gitlab.com/poli0981/CommandForge),
|
||||
which Gitea keeps up to date. GitLab CI does not run on the mirror: the maintainer applies an
|
||||
accepted merge request on Gitea, where CI runs, and the mirror then shows it as merged (or it is
|
||||
closed with a link to the commit).
|
||||
- **Patches by e-mail:** `git format-patch` / `git send-email` to
|
||||
[code@poli0981.dev](mailto:code@poli0981.dev) work too.
|
||||
- **Security:** [security@poli0981.dev](mailto:security@poli0981.dev) only, never a public issue
|
||||
(see [SECURITY.md](SECURITY.md)).
|
||||
|
||||
## Maintenance mode: what we accept
|
||||
|
||||
**CommandForge is stable and in maintenance mode** since version 2.2.0 (November 2026). It does
|
||||
what it set out to do — run vetted Windows maintenance commands from a safe, categorized window —
|
||||
so the work now goes into keeping it secure, correct and accessible, not into new features.
|
||||
|
||||
**Still done:**
|
||||
|
||||
1. **Dependency updates**, regularly.
|
||||
2. **Security fixes.** A High or Critical vulnerability in a dependency or in the toolchain — for
|
||||
example the .NET runtime the app ships with, or Node.js, which the CI's actions run on — gets
|
||||
an urgent patch release; a Moderate one goes into the next routine update. A new
|
||||
feature is added only when it is genuinely necessary, for example to keep the app safe or
|
||||
working on a new Windows build.
|
||||
3. **Major platform updates**, such as moving to a newer .NET.
|
||||
4. **Issues and pull requests** that add or remove catalog commands; fix bugs, UI/UX problems or
|
||||
accessibility barriers; or fix commands that are outdated, use the wrong syntax or could be
|
||||
harmful (a harmful one is reported privately, see [SECURITY.md](SECURITY.md)).
|
||||
5. **Translation fixes** for English, Vietnamese, Japanese, Simplified Chinese and Spanish: wording
|
||||
that doesn't suit the culture or the local tone, and spelling that could mislead.
|
||||
|
||||
**Not accepted:** issues and merge requests for new features, unless the feature clearly fits the
|
||||
project and is genuinely necessary; others are closed with a link to this section.
|
||||
|
||||
## Quick start
|
||||
|
||||
@@ -19,34 +57,42 @@ See [BUILD.md](../BUILD.md) for packaging and CI.
|
||||
|
||||
## Reporting issues
|
||||
|
||||
- Use the issue templates (Bug report / Feature request).
|
||||
- Open an [issue on the GitLab mirror](https://gitlab.com/poli0981/CommandForge/-/issues/new) and pick a template: **Bug**,
|
||||
**Command**, **Translation**, **Accessibility** or **Feature request** (within the policy above).
|
||||
In the app, **More → Report a bug** fills the Bug template in for you.
|
||||
- **Get straight to the point**: what you expected, what happened, exact steps, your Windows
|
||||
version/build and the app version (**More → About** in the app).
|
||||
- For **security vulnerabilities, do NOT open a public issue** — see [SECURITY.md](SECURITY.md).
|
||||
- Questions and ideas: [Discussions](https://github.com/poli0981/CommandForge/discussions), or
|
||||
email [code@poli0981.dev](mailto:code@poli0981.dev).
|
||||
- Questions: e-mail [code@poli0981.dev](mailto:code@poli0981.dev).
|
||||
- An accessibility barrier can also go to
|
||||
[accessibility@poli0981.dev](mailto:accessibility@poli0981.dev) — see
|
||||
[ACCESSIBILITY.md](../ACCESSIBILITY.md).
|
||||
|
||||
## Pull requests
|
||||
## Merge requests and patches
|
||||
|
||||
- Keep PRs **focused and small**; one logical change per PR.
|
||||
- Keep changes **focused and small**; one logical change per merge request or patch series.
|
||||
- Match existing style; run `dotnet format` and keep the build at **0 warnings** (analyzers,
|
||||
including SonarAnalyzer, run as part of the build).
|
||||
- **Don't delete or disable tests** to make CI pass; add tests for new behavior. SonarCloud's
|
||||
quality gate expects at least 80% test coverage on new code (XAML code-behind excepted), so put
|
||||
logic in view models and helpers that tests can reach.
|
||||
- **Sign your commits** (GPG, SSH or S/MIME) — `main` only accepts verified signatures. Commit
|
||||
messages follow [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
- **Don't delete or disable tests** to make CI pass; add tests for new behavior, and put logic in
|
||||
view models and helpers that tests can reach (XAML code-behind is hard to test).
|
||||
- **Sign your commits** (GPG or SSH) where you can; the maintainer's commits and release tags are
|
||||
signed. Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
(`fix(catalog): …`, `feat(ui): …`).
|
||||
- PRs need the required checks to pass: `build`, `package`, CodeQL (`Analyze (csharp)`,
|
||||
`Analyze (actions)`) and `dependency-review`. The SonarCloud quality gate is reported on PRs from
|
||||
this repository too (fork PRs don't get the analysis token).
|
||||
- **Dependencies:** package versions live in each `.csproj` (GitHub's dependency graph doesn't read
|
||||
`Directory.Packages.props`). Discuss a new package before adding it; runtime dependencies must be
|
||||
GPLv3-compatible (dependency review enforces a license allow-list).
|
||||
- The maintainer runs your change through CI on Gitea before merging: `Build` (`build` and
|
||||
`package`) must pass, and `Security` (gitleaks, Opengrep, osv-scanner, NuGetAudit, actionlint)
|
||||
and the Qodana report (zero problems expected) are checked too.
|
||||
- **Dependencies:** package versions live in each `.csproj` (not in `Directory.Packages.props`).
|
||||
Discuss a new package before adding it; runtime dependencies must be GPLv3-compatible. Renovate
|
||||
proposes updates on its own.
|
||||
- **UI text** goes in the `.resx` files, never hardcoded, and every key needs a value in all five
|
||||
languages: `Strings.resx` (English), `Strings.vi.resx`, `Strings.ja.resx`, `Strings.zh-Hans.resx`
|
||||
and `Strings.es.resx`. A test fails when a key the UI uses is missing from any of them.
|
||||
Machine-translated text is fine if you say so; native-speaker fixes are very welcome.
|
||||
- **Accessibility:** every control that shows no text gets an `AutomationProperties.Name` from the
|
||||
`.resx`; list items are named by what they show (an `ItemContainerStyle`); icons are
|
||||
`ctl:DecorativeIcon`, which keeps their glyphs from screen readers; nothing is shown by colour
|
||||
alone. The accessibility tests check most of this; say in the PR what you tried with the keyboard
|
||||
alone and with Narrator ([ACCESSIBILITY.md](../ACCESSIBILITY.md#for-contributors)).
|
||||
- **Disclose AI assistance.** AI-assisted contributions are welcome — just say so in the PR
|
||||
description.
|
||||
|
||||
@@ -88,12 +134,12 @@ To protect users, the following are **closed without review** and may result in
|
||||
ban — no exceptions:
|
||||
|
||||
- **Suspected malicious code.** If a PR appears to contain a supply-chain attack, obfuscation,
|
||||
credential harvesting, a cryptominer, or any malware — even if CodeQL and Dependabot don't flag
|
||||
credential harvesting, a cryptominer, or any malware — even if the automated scans don't flag
|
||||
it — the maintainer may investigate manually. **Detection equals a ban.**
|
||||
- **Unverified or suspicious links** in issues, PRs, or comments (pastebin scrapers, redirect
|
||||
chains, unfamiliar shortlinks, link-shortener URLs without context).
|
||||
- **Behavior or language violating**
|
||||
[GitHub's Acceptable Use Policies](https://docs.github.com/site-policy/acceptable-use-policies).
|
||||
- **Behavior or language violating** the [Code of Conduct](CODE_OF_CONDUCT.md), or the terms of
|
||||
the site where it is posted (GitLab's, on the mirror).
|
||||
- **Off-topic / rambling reports** that don't get to the point (e.g. *"Good morning, today is a
|
||||
beautiful day, I was just wondering if maybe…"*). Get straight to the problem.
|
||||
- **PRs that touch hundreds of files for a one-line fix** (a typical sign of an auto-formatter run
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# ACCESSIBILITY.md sends every accessibility barrier here. It is its own form rather than part of the
|
||||
# bug report because a barrier needs different facts: what the reporter uses to read or operate the
|
||||
# screen, and how far it stops them. Nothing here asks about the reporter themself.
|
||||
name: Accessibility problem
|
||||
description: Something in CommandForge can't be reached, read or seen — with the keyboard, a screen reader, a contrast theme, Magnifier, a larger text size or another aid
|
||||
labels: ["accessibility"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for telling us. **You never need to tell us anything about yourself or a disability** — what you use
|
||||
and what happened is enough. Screenshots and recordings help but are optional. Accessibility fixes are always
|
||||
in scope.
|
||||
|
||||
If you couldn't read or answer a **Caution or Dangerous confirmation**, say so below: it is a safety problem
|
||||
too, and it is handled first.
|
||||
|
||||
Rather not post in public? Write to **accessibility@poli0981.dev** instead. What CommandForge
|
||||
aims for and what it can't do yet: [ACCESSIBILITY.md](../src/branch/main/ACCESSIBILITY.md).
|
||||
|
||||
- type: textarea
|
||||
id: task
|
||||
attributes:
|
||||
label: What were you trying to do?
|
||||
placeholder: "e.g. run a command from the catalog, read a command's output, change the theme"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened instead?
|
||||
description: What you heard, saw or could not do — and what you expected.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: How to get there
|
||||
placeholder: |
|
||||
1. Open the catalog (Ctrl+F)
|
||||
2. Tab to …
|
||||
3. …
|
||||
|
||||
- type: input
|
||||
id: app-version
|
||||
attributes:
|
||||
label: CommandForge version
|
||||
description: More (⋯) → About, or Settings → About
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: Windows version
|
||||
placeholder: "Windows 11 24H2 (26100) — run winver"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: aid
|
||||
attributes:
|
||||
label: What do you use?
|
||||
multiple: true
|
||||
options:
|
||||
- Keyboard only
|
||||
- Narrator
|
||||
- NVDA
|
||||
- JAWS
|
||||
- Windows Magnifier
|
||||
- A Windows contrast theme
|
||||
- A larger text size or display scaling
|
||||
- Voice Access or other speech input
|
||||
- Something else (say below)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: aid-version
|
||||
attributes:
|
||||
label: Its version, if you know it
|
||||
placeholder: "e.g. NVDA 2026.1"
|
||||
|
||||
- type: dropdown
|
||||
id: severity
|
||||
attributes:
|
||||
label: How much does it stop you?
|
||||
description: Optional — the maintainer sets it when reading the report (ACCESSIBILITY.md, "How serious it is").
|
||||
options:
|
||||
- Not sure
|
||||
- Critical — I can't do the task at all
|
||||
- Serious — only with great difficulty or a workaround
|
||||
- Moderate — it is tiring or inconsistent
|
||||
- Minor — it barely gets in the way
|
||||
|
||||
- type: textarea
|
||||
id: more
|
||||
attributes:
|
||||
label: Anything else
|
||||
description: A screenshot, a recording, or the log file from More (⋯) → Report a bug (you review it before attaching).
|
||||
@@ -6,9 +6,13 @@ body:
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for the report. **Get straight to the point** — vague or off-topic reports may be
|
||||
closed (see [CONTRIBUTING.md](../blob/main/.github/CONTRIBUTING.md)).
|
||||
**Do not report security vulnerabilities here** — use
|
||||
[private reporting](../security/advisories/new) instead.
|
||||
closed (see [CONTRIBUTING.md](../src/branch/main/.github/CONTRIBUTING.md)).
|
||||
**Do not report security vulnerabilities here** — e-mail
|
||||
**security@poli0981.dev** instead.
|
||||
|
||||
A catalog command that is outdated or uses the wrong syntax has its own form (**Command — add,
|
||||
fix or remove**), and so does a barrier for the keyboard, a screen reader or larger text
|
||||
(**Accessibility problem**). In the app, **More (⋯) → Report a bug** fills this form in.
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
@@ -30,7 +34,7 @@ body:
|
||||
id: app-version
|
||||
attributes:
|
||||
label: CommandForge version
|
||||
description: More (⋯) → About, or Settings → About (e.g. 2.0.0)
|
||||
description: More (⋯) → About CommandForge (e.g. 2.2.0)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
@@ -45,8 +49,8 @@ body:
|
||||
attributes:
|
||||
label: Logs (optional)
|
||||
description: |
|
||||
Optionally attach exported logs (Tools → Export logs). **Review them first** — they may
|
||||
contain machine-specific paths/names. Do not paste secrets.
|
||||
Optionally attach the log from **More (⋯) → Report a bug → Export log (.zip)**. **Review it
|
||||
first** — it may contain machine-specific paths and names. Do not paste secrets.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
@@ -54,5 +58,5 @@ body:
|
||||
options:
|
||||
- label: I'm using the latest release.
|
||||
required: true
|
||||
- label: This is not a security vulnerability (those go through private reporting).
|
||||
- label: This is not a security vulnerability (those go to security@poli0981.dev).
|
||||
required: true
|
||||
@@ -0,0 +1,83 @@
|
||||
name: Command — add, fix or remove
|
||||
description: Propose a catalog command, or report one that is outdated or uses the wrong syntax
|
||||
labels: ["catalog"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Every command in CommandForge is a vetted entry of its read-only catalog. A request is checked
|
||||
against Microsoft's documentation and tried before it ships — see
|
||||
[Adding a command](../src/branch/main/.github/CONTRIBUTING.md#adding-a-command).
|
||||
|
||||
**A command that could cause harm** — it deletes what it shouldn't, weakens security, or does
|
||||
something other than it says — is a security problem: e-mail it to
|
||||
**security@poli0981.dev**, not here.
|
||||
- type: dropdown
|
||||
id: request
|
||||
attributes:
|
||||
label: What should change?
|
||||
options:
|
||||
- Add a command
|
||||
- Fix a command (outdated, wrong syntax, wrong danger level)
|
||||
- Remove a command
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: command
|
||||
attributes:
|
||||
label: Command (to fix or remove)
|
||||
description: Its title as the app shows it, or its ID from the command's details.
|
||||
placeholder: e.g. Flush DNS cache (net.flushdns)
|
||||
- type: textarea
|
||||
id: command-line
|
||||
attributes:
|
||||
label: Command line
|
||||
description: The exact command line it should run (for a new or fixed command).
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: purpose
|
||||
attributes:
|
||||
label: What it does and why
|
||||
description: What the command does and who needs it; for a fix, what goes wrong today.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: danger-level
|
||||
attributes:
|
||||
label: Danger level
|
||||
description: |
|
||||
Safe: read-only or undone the way it was made. Caution: changes system state, recoverable.
|
||||
Dangerous: may lose data or leave Windows unstable.
|
||||
options:
|
||||
- Safe
|
||||
- Caution
|
||||
- Dangerous
|
||||
- Not sure
|
||||
- type: dropdown
|
||||
id: admin
|
||||
attributes:
|
||||
label: Needs administrator rights?
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
- Not sure
|
||||
- type: input
|
||||
id: windows-versions
|
||||
attributes:
|
||||
label: Windows versions
|
||||
description: Where it works, or where it stopped working.
|
||||
placeholder: e.g. Windows 11 24H2 and later
|
||||
- type: textarea
|
||||
id: sources
|
||||
attributes:
|
||||
label: Sources
|
||||
description: Microsoft's documentation, or another reliable reference for the command and its syntax.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Confirmations
|
||||
options:
|
||||
- label: The command is a tool that comes with Windows (nothing downloaded from elsewhere).
|
||||
required: true
|
||||
- label: It is not a command that could cause harm (those go to security@poli0981.dev).
|
||||
required: true
|
||||
@@ -1,8 +1,14 @@
|
||||
# Gitea reads these forms (.github/ISSUE_TEMPLATE), but only the maintainer can open issues there:
|
||||
# the instance's registration is closed. Everyone else uses the public mirror on GitLab, which reads
|
||||
# .gitlab/issue_templates instead.
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Security vulnerability (private)
|
||||
url: https://github.com/poli0981/CommandForge/security/advisories/new
|
||||
about: Report security vulnerabilities privately — do NOT open a public issue.
|
||||
- name: Question / discussion
|
||||
url: https://github.com/poli0981/CommandForge/discussions
|
||||
about: Ask a question or discuss ideas before filing an issue.
|
||||
- name: Report an issue or open a merge request (GitLab mirror)
|
||||
url: https://gitlab.com/poli0981/CommandForge/-/issues/new
|
||||
about: Issues and merge requests from everyone go to the public mirror on GitLab.
|
||||
- name: Security vulnerability or harmful command (private, by e-mail)
|
||||
url: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/SECURITY.md
|
||||
about: Write to security@poli0981.dev; do NOT open a public issue, here or on GitLab.
|
||||
- name: Accessibility statement
|
||||
url: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/ACCESSIBILITY.md
|
||||
about: What works with the keyboard, screen readers and larger text, and the known limitations.
|
||||
@@ -1,13 +1,23 @@
|
||||
name: Feature request
|
||||
description: Suggest a feature or a new command for the catalog
|
||||
description: A new feature, only when it fits the project and is genuinely necessary (maintenance mode)
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for the idea. Keep it concise and specific. For a **new command**, note that every
|
||||
command must be a vetted, read-only catalog entry (no arbitrary execution) — see
|
||||
[CONTRIBUTING.md](../blob/main/.github/CONTRIBUTING.md).
|
||||
**CommandForge is in maintenance mode.** A new feature is added only when it clearly fits the
|
||||
project and is genuinely necessary — for example, to keep the app safe or working on a new
|
||||
Windows build. Other requests are closed with a link to
|
||||
[the policy](../src/branch/main/.github/CONTRIBUTING.md#maintenance-mode-what-we-accept).
|
||||
|
||||
A catalog command to add, fix or remove has its own form: **Command — add, fix or remove**.
|
||||
- type: checkboxes
|
||||
id: scope
|
||||
attributes:
|
||||
label: Maintenance mode
|
||||
options:
|
||||
- label: I have read the maintenance-mode policy, and this is not a catalog command.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
@@ -15,11 +25,18 @@ body:
|
||||
description: What are you trying to do, and why is it hard today?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: necessity
|
||||
attributes:
|
||||
label: Why is it necessary?
|
||||
description: What breaks, or stays unsafe or out of reach, without it?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposed solution
|
||||
description: What should CommandForge do? For a new command, give the exact command line and its danger level.
|
||||
description: What should CommandForge do?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
name: Translation fix
|
||||
description: Wording that doesn't suit the culture or the local tone, or spelling that could mislead
|
||||
labels: ["translation"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
CommandForge is shown in English, Vietnamese, Japanese, Simplified Chinese and Spanish. The
|
||||
text other than English is AI-translated, so corrections from people who speak the language
|
||||
are very welcome.
|
||||
- type: dropdown
|
||||
id: language
|
||||
attributes:
|
||||
label: Language
|
||||
options:
|
||||
- English
|
||||
- Tiếng Việt
|
||||
- 日本語
|
||||
- 简体中文
|
||||
- Español
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: where
|
||||
attributes:
|
||||
label: Where in the app
|
||||
placeholder: e.g. Settings › Appearance, or the confirmation of a Dangerous command
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: current
|
||||
attributes:
|
||||
label: Text today
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: suggestion
|
||||
attributes:
|
||||
label: Suggested text
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: reason
|
||||
attributes:
|
||||
label: What is wrong with it?
|
||||
options:
|
||||
- It doesn't suit the culture or the local tone
|
||||
- The spelling or wording could mislead
|
||||
- The meaning is wrong
|
||||
- Something else
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: more
|
||||
attributes:
|
||||
label: Anything else
|
||||
description: Why the suggested text is better, or other places with the same wording.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Confirmations
|
||||
options:
|
||||
- label: I'm using the latest release (the text may have changed already).
|
||||
required: true
|
||||
@@ -11,13 +11,20 @@ Do NOT delete tests or use --no-verify to bypass hooks.
|
||||
|
||||
<!-- e.g. Closes #123 -->
|
||||
|
||||
## Scope
|
||||
|
||||
<!-- CommandForge is in maintenance mode: .github/CONTRIBUTING.md#maintenance-mode-what-we-accept -->
|
||||
|
||||
- [ ] This is within maintenance mode: a dependency or security update, a platform update, a catalog command added, fixed or removed, a bug, UI/UX or accessibility fix, or a translation fix — or a new feature agreed in an issue as genuinely necessary
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `dotnet build -c Release` passes with **0 warnings**
|
||||
- [ ] `dotnet test` passes (and I added/updated tests for new behavior)
|
||||
- [ ] `dotnet format --verify-no-changes` passes; no unrelated reformatting
|
||||
- [ ] No tests deleted/disabled; hooks not bypassed (`--no-verify` not used)
|
||||
- [ ] My commits are signed (`main` requires verified signatures)
|
||||
- [ ] My commits are signed (GPG or SSH)
|
||||
- [ ] New or changed UI text is in all five `Strings*.resx` files (EN, VI, JA, zh-Hans, ES) — no hardcoded strings
|
||||
- [ ] If I added a command: it's a vetted catalog entry with correct `requiresAdmin`/`dangerLevel`, strings in all five languages, and no arbitrary-execution path
|
||||
- [ ] If I changed a screen: every control without text has an `AutomationProperties.Name` from the `.resx`, list items are named by what they show, icons are `ctl:DecorativeIcon`, and I tried it with the keyboard alone (and Narrator if I could) — see [ACCESSIBILITY.md](../ACCESSIBILITY.md#for-contributors)
|
||||
- [ ] **AI disclosure:** I have disclosed any AI assistance used (delete if none)
|
||||
+28
-17
@@ -6,18 +6,24 @@ CommandForge runs system-level commands, some as administrator, so security is a
|
||||
|
||||
| Version | Supported |
|
||||
|---|---|
|
||||
| 2.0.x (latest) | ✅ |
|
||||
| < 2.0 | ❌ — please update |
|
||||
| 2.3.x (latest) | ✅ |
|
||||
| < 2.3 | ❌ — please update (2.2.0 and older can't update themselves: install the latest release once by hand, see [UPDATES.md](../UPDATES.md)) |
|
||||
|
||||
Only the **latest release** receives security fixes. Please update before reporting.
|
||||
|
||||
CommandForge is in **maintenance mode** since 2.2.0, and security work goes on: a High or Critical
|
||||
vulnerability in CommandForge, a dependency or the toolchain (the .NET runtime it ships with, for
|
||||
example) gets an urgent patch release; a Moderate one goes into the next routine update. A catalog
|
||||
command that could cause harm is reported here too, privately.
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
**Do not open a public issue for security vulnerabilities.** Report privately in either of these ways:
|
||||
**Report privately by e-mail: [security@poli0981.dev](mailto:security@poli0981.dev).**
|
||||
|
||||
- **[GitHub private vulnerability reporting](https://github.com/poli0981/CommandForge/security/advisories/new)**
|
||||
(Security → Advisories → Report a vulnerability) — preferred, or
|
||||
- **email: [security@poli0981.dev](mailto:security@poli0981.dev)**.
|
||||
**Do not open a public issue for security vulnerabilities** — not on the GitLab mirror
|
||||
(`gitlab.com/poli0981/CommandForge`), where issues are public, and not anywhere else. If one is
|
||||
opened there by mistake, it is made confidential and the conversation continues by e-mail. (GitHub's
|
||||
private vulnerability reporting is gone with the GitHub account.)
|
||||
|
||||
Please include:
|
||||
|
||||
@@ -61,8 +67,9 @@ runs elevated.
|
||||
can't be turned off. A System Restore Point can be created first.
|
||||
- **Containment.** Commands whose output is captured run in a kill-on-close job object, so closing
|
||||
or crashing the app doesn't leave them running.
|
||||
- **No telemetry.** The only network connection the app makes is the GitHub update check (see
|
||||
[PRIVACY.md](../PRIVACY.md)).
|
||||
- **No telemetry.** The only network connection the app makes is the update check against
|
||||
`https://releases.poli0981.dev/commandforge` (see [PRIVACY.md](../PRIVACY.md)). The feed is
|
||||
static files over HTTPS; no token or account is involved.
|
||||
|
||||
### Known limitations
|
||||
|
||||
@@ -85,17 +92,21 @@ runs elevated.
|
||||
Releases are **not Authenticode-signed yet**, so SmartScreen may warn about an unknown publisher
|
||||
and some antivirus engines may show false positives (common for admin tools). Instead:
|
||||
|
||||
- Every release is built by GitHub Actions from a tagged commit and carries **build-provenance
|
||||
attestations** for the installer and packages. Verify a download with
|
||||
`gh attestation verify <file> --repo poli0981/CommandForge`.
|
||||
- **SHA-256 checksums** (`checksums.txt`), an **SPDX SBOM** (`sbom.spdx.json`) and **VirusTotal**
|
||||
scan links come with every release.
|
||||
- Every release is built by the release workflow on Gitea Actions
|
||||
(`git.poli0981.dev/poli0981/CommandForge`) from a signed tag on `main`; the workflow and its
|
||||
logs are public. Build-provenance attestations ended with the move from GitHub (Gitea has no
|
||||
OIDC signing).
|
||||
- **SHA-256 checksums** (`<version>/SHA256SUMS`), a **CycloneDX SBOM** (`<version>/sbom.cdx.json`)
|
||||
and, when a scan was made, **VirusTotal** links come with every release, under
|
||||
`https://releases.poli0981.dev/commandforge/`.
|
||||
- The code is **not obfuscated** (obfuscation is a leading cause of false positives), and the
|
||||
source is public under the GPLv3.
|
||||
- CI runs **CodeQL** (C# and GitHub Actions), **dependency review**, **OpenSSF Scorecard**,
|
||||
**SonarCloud** and **Snyk**; every restore audits direct and transitive NuGet packages;
|
||||
Dependabot keeps dependencies and the SHA-pinned actions current; `main` only accepts pull
|
||||
requests that pass the required checks.
|
||||
- CI runs **Qodana** (JetBrains' inspections and security rules), **gitleaks** over the whole
|
||||
history, **Opengrep** (SAST), **osv-scanner**, and a **NuGetAudit** restore that fails on known
|
||||
vulnerabilities in direct and transitive packages; the workflows are linted with **actionlint**
|
||||
and every action is pinned to a commit SHA. A self-hosted **Renovate** keeps dependencies and
|
||||
those pins current, with separate pull requests for security fixes; `main` is protected and
|
||||
takes changes through pull requests that pass the build.
|
||||
|
||||
Code signing (Azure Trusted Signing, or SignPath Foundation for open source) is planned for a
|
||||
future release.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# actionlint settings (security.yml, job `workflow-lint`, and a local `actionlint` run from the
|
||||
# repository root), as in the ops repository poli0981/.github. Only Gitea features that actionlint
|
||||
# does not know are ignored here; everything else stays an error.
|
||||
paths:
|
||||
.gitea/workflows/*.yml:
|
||||
ignore:
|
||||
# Gitea's own token scope for releases (ops runbook §3.2 item 5)
|
||||
- 'unknown permission scope "releases"'
|
||||
# Gitea resolves full-URL actions; a bare owner/repo goes to github.com (ops runbook §1)
|
||||
- 'specifying action "https://gitea\.com/[^"]+" in invalid format'
|
||||
@@ -1,51 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: nuget
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "deps"
|
||||
labels: ["dependencies", "nuget"]
|
||||
cooldown:
|
||||
default-days: 3
|
||||
semver-major-days: 14
|
||||
groups:
|
||||
microsoft-extensions:
|
||||
patterns: ["Microsoft.Extensions.*"]
|
||||
serilog:
|
||||
patterns: ["Serilog*"]
|
||||
# The Velopack library and the vpk CLI (.config/dotnet-tools.json) must move together.
|
||||
velopack:
|
||||
patterns: ["Velopack", "vpk"]
|
||||
testing:
|
||||
patterns: ["xunit*", "Microsoft.NET.Test.Sdk", "coverlet.*"]
|
||||
# Includes the SonarScanner CLI pinned in .config/dotnet-tools.json.
|
||||
build-tooling:
|
||||
patterns: ["SonarAnalyzer.CSharp", "dotnet-sonarscanner", "Microsoft.Windows.CsWin32"]
|
||||
|
||||
- package-ecosystem: dotnet-sdk
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
commit-message:
|
||||
prefix: "build"
|
||||
labels: ["dependencies", "dotnet-sdk"]
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
labels: ["dependencies", "github-actions"]
|
||||
cooldown:
|
||||
default-days: 3
|
||||
groups:
|
||||
actions:
|
||||
patterns: ["*"]
|
||||
@@ -1,27 +0,0 @@
|
||||
name: Announce Release
|
||||
|
||||
# Posts a release announcement to Discord (reuses the shared workflow in poli0981/.github).
|
||||
# Tag releases are announced by release.yml itself (a release published with GITHUB_TOKEN does
|
||||
# not fire the `release` event); this workflow covers releases published by hand and re-runs.
|
||||
# Requires repo secret DISCORD_RELEASES_WEBHOOK (or DISCORD_REPO_WEBHOOK); optional
|
||||
# DISCORD_PING_ROLE_ID.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag to announce (e.g. v2.0.0)
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main, 2026-07-06
|
||||
with:
|
||||
tag_override: ${{ github.event.inputs.tag || '' }}
|
||||
secrets: inherit
|
||||
@@ -1,67 +0,0 @@
|
||||
name: CodeQL
|
||||
|
||||
# Project-specific CodeQL (not the shared reusable workflow): the C# code is a WPF
|
||||
# (net10.0-windows) app that only builds on Windows from a .slnx solution. The workflows
|
||||
# themselves are analysed too (`actions` language).
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '37 14 * * 1' # Mondays 14:37 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: csharp
|
||||
os: windows-latest
|
||||
build-mode: manual
|
||||
- language: actions
|
||||
os: ubuntu-latest
|
||||
build-mode: none
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- if: matrix.language == 'csharp'
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
queries: security-extended
|
||||
|
||||
- if: matrix.build-mode == 'manual'
|
||||
name: Build
|
||||
# Roslyn analyzers add nothing to CodeQL's extraction and slow the traced build down.
|
||||
run: dotnet build CommandForge.slnx -c Release -p:RunAnalyzers=false
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
@@ -1,32 +0,0 @@
|
||||
name: Dependency Review
|
||||
|
||||
# Blocks pull requests that add dependencies with known vulnerabilities (moderate or worse) or
|
||||
# with licenses that are not compatible with GPLv3.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # summary comment on failure
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
||||
with:
|
||||
fail-on-severity: moderate
|
||||
comment-summary-in-pr: on-failure
|
||||
allow-licenses: >-
|
||||
MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, 0BSD, Zlib, BSL-1.0,
|
||||
Unlicense, CC0-1.0, MPL-2.0, OFL-1.1, LGPL-2.1-or-later, LGPL-3.0-only,
|
||||
LGPL-3.0-or-later, GPL-3.0-only, GPL-3.0-or-later
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Notify CI Failure
|
||||
|
||||
# Posts a Discord alert when the Build or SonarCloud workflow fails on main (reuses the shared
|
||||
# workflow in poli0981/.github). Requires repo secret DISCORD_CI_WEBHOOK.
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build", "SonarCloud"]
|
||||
types: [completed]
|
||||
|
||||
# The reusable workflow requests actions: read; without granting it here every run was a
|
||||
# startup_failure (the repository default token is read-only for contents only).
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
# Both workflows only run on `push` for main, so this limits alerts to main without trusting
|
||||
# forgeable values (branch names, actor logins) — and skips pull-request runs (including
|
||||
# Dependabot's), which have no access to the webhook secret anyway.
|
||||
if: >-
|
||||
github.event.workflow_run.conclusion == 'failure' &&
|
||||
github.event.workflow_run.event == 'push'
|
||||
uses: poli0981/.github/.github/workflows/notify-ci-failure.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main, 2026-07-06
|
||||
secrets: inherit
|
||||
@@ -1,191 +0,0 @@
|
||||
name: Release
|
||||
|
||||
# Triggered by pushing a SemVer tag (vX.Y.Z). Builds a self-contained, Velopack-packaged
|
||||
# release and publishes it to GitHub Releases with build-provenance attestations, SHA-256
|
||||
# checksums, an SPDX SBOM and (optionally) a VirusTotal scan. No code signing yet (see SECURITY.md).
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version without the leading v (e.g. 2.0.0)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write # create the release and upload assets
|
||||
id-token: write # OIDC for build-provenance attestations
|
||||
attestations: write
|
||||
outputs:
|
||||
tag: ${{ steps.ver.outputs.tag }}
|
||||
env:
|
||||
REPO_URL: https://github.com/${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VT_API_KEY: ${{ secrets.VT_API_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Resolve version and tag
|
||||
id: ver
|
||||
shell: pwsh
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
INPUT_VERSION: ${{ github.event.inputs.version }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
if ($env:EVENT_NAME -eq 'workflow_dispatch') {
|
||||
$version = $env:INPUT_VERSION
|
||||
$tag = "v$version"
|
||||
} else {
|
||||
$tag = $env:REF_NAME
|
||||
$version = $tag -replace '^v', ''
|
||||
}
|
||||
if ($version -notmatch '^\d+\.\d+\.\d+$') { throw "Version '$version' is not X.Y.Z" }
|
||||
"version=$version" >> $env:GITHUB_OUTPUT
|
||||
"tag=$tag" >> $env:GITHUB_OUTPUT
|
||||
Write-Host "Releasing $version (tag $tag)"
|
||||
|
||||
- name: Restore pinned tools (vpk)
|
||||
run: dotnet tool restore
|
||||
|
||||
- name: Download previous release (delta base)
|
||||
continue-on-error: true # the very first release has nothing to download
|
||||
shell: pwsh
|
||||
run: dotnet vpk download github --repoUrl $env:REPO_URL --token $env:GH_TOKEN
|
||||
|
||||
- name: Publish + pack (Velopack)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
run: ./scripts/pack.ps1 -Version $env:VERSION
|
||||
|
||||
- name: Attest build provenance
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
||||
with:
|
||||
# Only what this run built: Releases/ also holds the previous version's full package,
|
||||
# downloaded above just to compute the delta.
|
||||
subject-path: |
|
||||
Releases/*-Setup.exe
|
||||
Releases/*-Portable.zip
|
||||
Releases/CommandForge-${{ steps.ver.outputs.version }}-*.nupkg
|
||||
|
||||
# Upload as a DRAFT first: publishing is what makes installed copies auto-update, so the
|
||||
# release only goes live once every asset (SBOM, checksums, scan links) is attached.
|
||||
- name: Create draft GitHub Release (Velopack)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: >-
|
||||
dotnet vpk upload github
|
||||
--repoUrl $env:REPO_URL
|
||||
--token $env:GH_TOKEN
|
||||
--releaseName "CommandForge $env:VERSION"
|
||||
--tag $env:TAG
|
||||
|
||||
- name: SBOM + SHA-256 checksums
|
||||
shell: pwsh
|
||||
env:
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
run: |
|
||||
$rel = Join-Path (Get-Location) 'Releases'
|
||||
$sbom = Join-Path $rel 'sbom.spdx.json'
|
||||
gh api "repos/$env:REPOSITORY/dependency-graph/sbom" --jq '.sbom' | Out-File $sbom -Encoding utf8NoBOM
|
||||
$checksums = Join-Path $rel 'checksums.txt'
|
||||
# Hash exactly what the release offers for download: the assets vpk uploaded plus the
|
||||
# SBOM (Releases/ also holds unpublished files, such as the previous full package).
|
||||
$published = @(gh release view $env:TAG --json assets --jq '.assets[].name') + 'sbom.spdx.json'
|
||||
# Filter with Where-Object, not Get-ChildItem -Exclude (which returns nothing without a
|
||||
# trailing wildcard/-Recurse and once produced an empty checksums.txt).
|
||||
Get-ChildItem -Path $rel -File |
|
||||
Where-Object { $_.Name -ne 'checksums.txt' -and $published -contains $_.Name } |
|
||||
Get-FileHash -Algorithm SHA256 |
|
||||
ForEach-Object { '{0} {1}' -f $_.Hash.ToLower(), (Split-Path $_.Path -Leaf) } |
|
||||
Out-File $checksums -Encoding ascii
|
||||
gh release upload $env:TAG $sbom $checksums --clobber
|
||||
|
||||
# Set before publishing, so the release and its Discord announcement never go out empty.
|
||||
- name: Release notes from CHANGELOG.md
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: |
|
||||
$changelog = (Get-Content CHANGELOG.md -Raw) -replace "`r`n", "`n"
|
||||
$pattern = "(?ms)^## \[$([regex]::Escape($env:VERSION))\][^\n]*\n(.*?)(?=^## \[|^\[[^\]]+\]: |\z)"
|
||||
$section = [regex]::Match($changelog, $pattern, 'None', [TimeSpan]::FromSeconds(5))
|
||||
if ($section.Success -and $section.Groups[1].Value.Trim()) {
|
||||
$section.Groups[1].Value.Trim() | gh release edit $env:TAG --notes-file -
|
||||
} else {
|
||||
Write-Warning "CHANGELOG.md has no section for $env:VERSION; the release notes stay empty."
|
||||
}
|
||||
|
||||
- name: Publish the release
|
||||
shell: pwsh
|
||||
env:
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: gh release edit $env:TAG --draft=false --latest
|
||||
|
||||
- name: VirusTotal scan (optional)
|
||||
id: vt
|
||||
if: env.VT_API_KEY != ''
|
||||
uses: crazy-max/ghaction-virustotal@936d8c5c00afe97d3d9a1af26d017cfdf26800a2 # v5.0.0
|
||||
with:
|
||||
vt_api_key: ${{ env.VT_API_KEY }}
|
||||
files: |
|
||||
Releases/*-Setup.exe
|
||||
Releases/CommandForge-${{ steps.ver.outputs.version }}-full.nupkg
|
||||
|
||||
# The action's own update_release_body only works on `release` events, and this workflow
|
||||
# runs on tag pushes, so the report links are appended here.
|
||||
- name: Add VirusTotal links to the release notes
|
||||
if: steps.vt.outputs.analysis != ''
|
||||
shell: pwsh
|
||||
env:
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
ANALYSIS: ${{ steps.vt.outputs.analysis }}
|
||||
run: |
|
||||
# ANALYSIS is "path=analysis-url,path=analysis-url"; link each file's permanent report.
|
||||
$links = foreach ($pair in $env:ANALYSIS -split ',') {
|
||||
$file = ($pair -split '=', 2)[0]
|
||||
$hash = (Get-FileHash $file -Algorithm SHA256).Hash.ToLower()
|
||||
'- [{0}](https://www.virustotal.com/gui/file/{1})' -f (Split-Path $file -Leaf), $hash
|
||||
}
|
||||
$body = (gh release view $env:TAG --json body --jq '.body') -join "`n"
|
||||
$notes = (@($body.TrimEnd(), '', '### VirusTotal', '') + $links) -join "`n"
|
||||
$notes | gh release edit $env:TAG --notes-file -
|
||||
|
||||
announce:
|
||||
# A release published with GITHUB_TOKEN does not fire the `release` event, so the standalone
|
||||
# announce workflow never ran for tag releases — call the shared announcer directly instead.
|
||||
needs: release
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main, 2026-07-06
|
||||
with:
|
||||
tag_override: ${{ needs.release.outputs.tag }}
|
||||
secrets: inherit
|
||||
@@ -1,45 +0,0 @@
|
||||
name: Scorecard
|
||||
|
||||
# OpenSSF Scorecard supply-chain checks; results land in Security → Code scanning.
|
||||
|
||||
on:
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '25 6 * * 1' # Mondays 06:25 UTC
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write # upload SARIF
|
||||
id-token: write # publish results to the OpenSSF API / badge
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: scorecard-sarif
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
- uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -1,126 +0,0 @@
|
||||
name: SonarCloud
|
||||
|
||||
# CI-based SonarCloud analysis (it replaced Automatic Analysis, which can't import coverage): the
|
||||
# solution is built between the scanner's begin and end steps, the tests run with OpenCover
|
||||
# coverage, and the SonarCloud GitHub App reports the quality gate on pull requests. The scanner
|
||||
# turns TreatWarningsAsErrors off for its build, so build.yml stays the warnings-as-errors check.
|
||||
# Requires the repository secret SONAR_TOKEN.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
token:
|
||||
# Pull requests from forks and from Dependabot get no repository secrets. Checking for the token
|
||||
# skips those runs without trusting actor or repository names from the event.
|
||||
name: Check for SONAR_TOKEN
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions: {}
|
||||
outputs:
|
||||
available: ${{ steps.check.outputs.available }}
|
||||
steps:
|
||||
- name: Check for SONAR_TOKEN
|
||||
id: check
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
if [ -n "$SONAR_TOKEN" ]; then
|
||||
echo "available=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "available=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::SONAR_TOKEN is not available to this run (fork or Dependabot pull request); skipping the analysis."
|
||||
fi
|
||||
|
||||
analysis:
|
||||
name: SonarCloud
|
||||
needs: token
|
||||
if: needs.token.outputs.available == 'true'
|
||||
# WPF (net10.0-windows) only builds on Windows.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0 # full history: SonarCloud uses blame to tell new code from old
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
# Both caches stay outside the workspace: the scanner also analyzes every .json, .yml and .ps1
|
||||
# file under the repository root.
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: nuget-sonar-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj', '.config/dotnet-tools.json') }}
|
||||
restore-keys: nuget-sonar-${{ runner.os }}-
|
||||
|
||||
- name: Cache SonarCloud analyzers and JRE
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: sonar-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }}
|
||||
restore-keys: sonar-${{ runner.os }}-
|
||||
|
||||
- name: Restore pinned tools (dotnet-sonarscanner)
|
||||
run: dotnet tool restore
|
||||
|
||||
# The project version drives SonarCloud's "previous version" new-code period.
|
||||
# Roslyn rules already fail the build in build.yml, so their Info-level suggestions aren't
|
||||
# imported as external issues. Coverage skips XAML code-behind and the two entry points (the
|
||||
# app and the Elevator); the catalog JSON and the .resx files repeat structure by design.
|
||||
- name: Begin analysis
|
||||
shell: pwsh
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
$version = "$(dotnet msbuild src/CommandForge.Domain/CommandForge.Domain.csproj -getProperty:Version | Select-Object -Last 1)".Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or $version -notmatch '^\d+\.\d+\.\d+$') { throw "Unexpected project version '$version'." }
|
||||
$scannerArgs = @(
|
||||
'begin', '/k:poli0981_CommandForge', '/o:poli0981', "/v:$version",
|
||||
'/d:sonar.host.url=https://sonarcloud.io', "/d:sonar.token=$env:SONAR_TOKEN",
|
||||
'/d:sonar.cs.opencover.reportsPaths=TestResults/**/coverage.opencover.xml',
|
||||
'/d:sonar.cs.vstest.reportsPaths=TestResults/*.trx',
|
||||
'/d:sonar.cs.roslyn.ignoreIssues=true',
|
||||
'/d:sonar.exclusions=**/bin/**,**/obj/**,**/TestResults/**',
|
||||
'/d:sonar.coverage.exclusions=**/*.xaml.cs,**/Program.cs',
|
||||
'/d:sonar.cpd.exclusions=**/Catalog/*.json,**/*.resx'
|
||||
)
|
||||
dotnet sonarscanner @scannerArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "SonarScanner begin failed with exit code $LASTEXITCODE." }
|
||||
|
||||
- name: Build
|
||||
# Real source paths in the PDBs (not the /_/ deterministic ones), so coverage maps to files.
|
||||
run: dotnet build CommandForge.slnx -c Release --no-incremental -p:ContinuousIntegrationBuild=false
|
||||
|
||||
- name: Test with coverage
|
||||
run: >-
|
||||
dotnet test CommandForge.slnx -c Release --no-build
|
||||
--collect "XPlat Code Coverage;Format=opencover"
|
||||
--logger "trx;LogFileName=test-results.trx"
|
||||
--results-directory TestResults
|
||||
|
||||
- name: End analysis
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: dotnet sonarscanner end "/d:sonar.token=$env:SONAR_TOKEN"
|
||||
@@ -24,6 +24,8 @@ publish/
|
||||
AppPackages/
|
||||
*.nupkg
|
||||
*.snupkg
|
||||
# scripts/release-assets.ps1 (SBOM, SHA256SUMS, release notes)
|
||||
r2-release/
|
||||
|
||||
# ── .NET / NuGet ────────────────────────────────────────────────
|
||||
project.lock.json
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
Thank you for telling us. You never need to tell us anything about yourself or a disability: what you
|
||||
use and what happened is enough. Screenshots and recordings help but are optional. Accessibility fixes
|
||||
are always in scope.
|
||||
|
||||
If you couldn't read or answer a Caution or Dangerous confirmation, say so below: it is a safety
|
||||
problem too, and it is handled first.
|
||||
|
||||
Rather not post in public? Write to accessibility@poli0981.dev instead. What CommandForge aims for and
|
||||
what it can't do yet: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/ACCESSIBILITY.md
|
||||
-->
|
||||
|
||||
## What were you trying to do?
|
||||
|
||||
<!-- e.g. run a command from the catalog, read a command's output, change the theme -->
|
||||
|
||||
## What happened instead?
|
||||
|
||||
<!-- What you heard, saw or could not do, and what you expected. -->
|
||||
|
||||
## How to get there
|
||||
|
||||
1. Open the catalog (Ctrl+F)
|
||||
2. Tab to …
|
||||
3. …
|
||||
|
||||
## CommandForge version
|
||||
|
||||
<!-- More (⋯) → About, or Settings → About -->
|
||||
|
||||
## Windows version
|
||||
|
||||
<!-- e.g. Windows 11 24H2 (26100): run winver -->
|
||||
|
||||
## What do you use?
|
||||
|
||||
<!-- Keyboard only / Narrator / NVDA / JAWS / Windows Magnifier / a Windows contrast theme /
|
||||
a larger text size or display scaling / Voice Access or other speech input / something else -->
|
||||
|
||||
## Its version, if you know it
|
||||
|
||||
<!-- e.g. NVDA 2026.1 -->
|
||||
|
||||
## How much does it stop you?
|
||||
|
||||
<!-- Optional: Not sure / Critical (I can't do the task at all) / Serious (only with great difficulty or
|
||||
a workaround) / Moderate (it is tiring or inconsistent) / Minor (it barely gets in the way) -->
|
||||
|
||||
## Anything else
|
||||
|
||||
<!-- A screenshot, a recording, or the log file from More (⋯) → Report a bug (you review it before
|
||||
attaching). -->
|
||||
|
||||
/label ~accessibility
|
||||
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Thanks for the report. Get straight to the point: vague or off-topic reports may be closed (see
|
||||
CONTRIBUTING.md: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md).
|
||||
Do NOT report security vulnerabilities here: e-mail security@poli0981.dev instead.
|
||||
|
||||
A catalog command that is outdated or uses the wrong syntax has its own template (Command), and so
|
||||
does a barrier for the keyboard, a screen reader or larger text (Accessibility). In the app,
|
||||
More (⋯) → Report a bug fills this template in.
|
||||
-->
|
||||
|
||||
## What happened?
|
||||
|
||||
<!-- What you expected vs. what actually happened. -->
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Open …
|
||||
2. Run command …
|
||||
3. See …
|
||||
|
||||
## CommandForge version
|
||||
|
||||
<!-- More (⋯) → About CommandForge, e.g. 2.3.0 -->
|
||||
|
||||
## Windows version / build
|
||||
|
||||
<!-- e.g. Windows 11 23H2 (22631): run `winver` -->
|
||||
|
||||
## Logs (optional)
|
||||
|
||||
<!-- Optionally attach the log from More (⋯) → Report a bug → Export log (.zip). Review it first: it
|
||||
may contain machine-specific paths and names. Do not paste secrets. -->
|
||||
|
||||
## Confirmations
|
||||
|
||||
- [ ] I'm using the latest release.
|
||||
- [ ] This is not a security vulnerability (those go to security@poli0981.dev).
|
||||
|
||||
/label ~bug
|
||||
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
Every command in CommandForge is a vetted entry of its read-only catalog. A request is checked
|
||||
against Microsoft's documentation and tried before it ships: see "Adding a command" in
|
||||
https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md#adding-a-command
|
||||
|
||||
A command that could cause harm (it deletes what it shouldn't, weakens security, or does something
|
||||
other than it says) is a security problem: e-mail security@poli0981.dev, do NOT report it here.
|
||||
-->
|
||||
|
||||
## What should change?
|
||||
|
||||
<!-- One of: Add a command / Fix a command (outdated, wrong syntax, wrong danger level) / Remove a command -->
|
||||
|
||||
## Command (to fix or remove)
|
||||
|
||||
<!-- Its title as the app shows it, or its ID from the command's details, e.g. Flush DNS cache (net.flushdns) -->
|
||||
|
||||
## Command line
|
||||
|
||||
<!-- The exact command line it should run (for a new or fixed command). -->
|
||||
|
||||
```shell
|
||||
|
||||
```
|
||||
|
||||
## What it does and why
|
||||
|
||||
<!-- What the command does and who needs it; for a fix, what goes wrong today. -->
|
||||
|
||||
## Danger level
|
||||
|
||||
<!-- Safe: read-only or undone the way it was made. Caution: changes system state, recoverable.
|
||||
Dangerous: may lose data or leave Windows unstable. Or: Not sure. -->
|
||||
|
||||
## Needs administrator rights?
|
||||
|
||||
<!-- Yes / No / Not sure -->
|
||||
|
||||
## Windows versions
|
||||
|
||||
<!-- Where it works, or where it stopped working, e.g. Windows 11 24H2 and later -->
|
||||
|
||||
## Sources
|
||||
|
||||
<!-- Microsoft's documentation, or another reliable reference for the command and its syntax. -->
|
||||
|
||||
## Confirmations
|
||||
|
||||
- [ ] The command is a tool that comes with Windows (nothing downloaded from elsewhere).
|
||||
- [ ] It is not a command that could cause harm (those go to security@poli0981.dev).
|
||||
|
||||
/label ~catalog
|
||||
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
CommandForge is in maintenance mode. A new feature is added only when it clearly fits the project
|
||||
and is genuinely necessary, for example to keep the app safe or working on a new Windows build.
|
||||
Other requests are closed with a link to the policy:
|
||||
https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md#maintenance-mode-what-we-accept
|
||||
|
||||
A catalog command to add, fix or remove has its own template: Command.
|
||||
-->
|
||||
|
||||
## Maintenance mode
|
||||
|
||||
- [ ] I have read the maintenance-mode policy, and this is not a catalog command.
|
||||
|
||||
## Problem / motivation
|
||||
|
||||
<!-- What are you trying to do, and why is it hard today? -->
|
||||
|
||||
## Why is it necessary?
|
||||
|
||||
<!-- What breaks, or stays unsafe or out of reach, without it? -->
|
||||
|
||||
## Proposed solution
|
||||
|
||||
<!-- What should CommandForge do? -->
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
/label ~enhancement
|
||||
@@ -0,0 +1,31 @@
|
||||
<!--
|
||||
CommandForge is shown in English, Vietnamese, Japanese, Simplified Chinese and Spanish. The text other
|
||||
than English is AI-translated, so corrections from people who speak the language are very welcome.
|
||||
-->
|
||||
|
||||
## Language
|
||||
|
||||
<!-- English / Tiếng Việt / 日本語 / 简体中文 / Español -->
|
||||
|
||||
## Where in the app
|
||||
|
||||
<!-- e.g. Settings › Appearance, or the confirmation of a Dangerous command -->
|
||||
|
||||
## Text today
|
||||
|
||||
## Suggested text
|
||||
|
||||
## What is wrong with it?
|
||||
|
||||
<!-- It doesn't suit the culture or the local tone / The spelling or wording could mislead /
|
||||
The meaning is wrong / Something else -->
|
||||
|
||||
## Anything else
|
||||
|
||||
<!-- Why the suggested text is better, or other places with the same wording. -->
|
||||
|
||||
## Confirmations
|
||||
|
||||
- [ ] I'm using the latest release (the text may have changed already).
|
||||
|
||||
/label ~translation
|
||||
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Keep merge requests focused and small. Read CONTRIBUTING.md before submitting:
|
||||
https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md
|
||||
|
||||
This is the GitLab mirror. GitLab CI does not run here: the maintainer applies the change on Gitea
|
||||
(the canonical repository), where CI runs, and the mirror then shows this merge request as merged.
|
||||
Do NOT delete tests or use --no-verify to bypass hooks.
|
||||
-->
|
||||
|
||||
## Summary
|
||||
|
||||
<!-- What does this merge request change, and why? -->
|
||||
|
||||
## Related issue
|
||||
|
||||
<!-- e.g. Closes #123 -->
|
||||
|
||||
## Scope
|
||||
|
||||
<!-- CommandForge is in maintenance mode: .github/CONTRIBUTING.md#maintenance-mode-what-we-accept -->
|
||||
|
||||
- [ ] This is within maintenance mode: a dependency or security update, a platform update, a catalog command added, fixed or removed, a bug, UI/UX or accessibility fix, or a translation fix, or a new feature agreed in an issue as genuinely necessary
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `dotnet build -c Release` passes with **0 warnings**
|
||||
- [ ] `dotnet test` passes (and I added/updated tests for new behavior)
|
||||
- [ ] `dotnet format --verify-no-changes` passes; no unrelated reformatting
|
||||
- [ ] No tests deleted/disabled; hooks not bypassed (`--no-verify` not used)
|
||||
- [ ] New or changed UI text is in all five `Strings*.resx` files (EN, VI, JA, zh-Hans, ES), no hardcoded strings
|
||||
- [ ] If I added a command: it's a vetted catalog entry with correct `requiresAdmin`/`dangerLevel`, strings in all five languages, and no arbitrary-execution path
|
||||
- [ ] If I changed a screen: every control without text has an `AutomationProperties.Name` from the `.resx`, list items are named by what they show, icons are `ctl:DecorativeIcon`, and I tried it with the keyboard alone (and Narrator if I could): see ACCESSIBILITY.md, "For contributors"
|
||||
- [ ] **AI disclosure:** I have disclosed any AI assistance used (delete if none)
|
||||
@@ -0,0 +1,190 @@
|
||||
# Accessibility
|
||||
|
||||
CommandForge should be usable by everyone who maintains a Windows PC — with a keyboard alone, with
|
||||
a screen reader, with a Windows contrast theme or Magnifier, with larger text, and without telling
|
||||
colours apart. This page says what CommandForge aims for, what works today, how that is checked,
|
||||
what does not work yet and what to do instead, and how to tell us about a barrier. It is written
|
||||
for the person who has just met one.
|
||||
|
||||
CommandForge is a desktop program: its own window, its dialogs and the notifications it shows.
|
||||
The commands it runs are Windows' own tools (winget, DISM, PowerShell and others), so the text
|
||||
they print is theirs.
|
||||
|
||||
*Last reviewed on 2026-11-16 for version 2.2.0 by the maintainer, poli0981. In the app: More (⋯) ▸
|
||||
About CommandForge ▸ Accessibility.*
|
||||
|
||||
## What CommandForge aims for
|
||||
|
||||
- **WCAG 2.2 at level AA**, applied to desktop software as W3C's
|
||||
[WCAG2ICT](https://www.w3.org/TR/wcag2ict-22/) guidance explains. This is a goal that guides the
|
||||
work, not a claim: no formal evaluation has been made, and CommandForge does not say it conforms
|
||||
to any standard.
|
||||
- **Every task can be done with the keyboard alone.**
|
||||
- **A screen reader can read every control and every value**, in the language CommandForge is shown
|
||||
in, and hears what changes: a command starting, needing permission, finishing.
|
||||
- **Text and controls keep their contrast** in the light and the dark theme and under Windows
|
||||
contrast themes, and **colour is never the only way something is shown.**
|
||||
- **Text follows your size settings**: the app's own font size and Windows' Text size.
|
||||
|
||||
Accessibility fixes are always in scope, whatever else the project is or isn't taking on.
|
||||
|
||||
## What works today
|
||||
|
||||
### The keyboard
|
||||
|
||||
| Keys | What they do |
|
||||
|---|---|
|
||||
| **Tab** and **Shift+Tab** | Move through a page or a dialog in reading order. In a list, Tab moves into the buttons of the selected row (its star, Undo, Run again). |
|
||||
| The **arrow keys** | Move inside a list: commands, History, the console's output, the Log viewer, the Command Palette's results. On a splitter, they resize the panes. |
|
||||
| **F6** and **Shift+F6** | Jump between the navigation pane, the page and the console. |
|
||||
| **Enter** or **Space** | Press the button, switch or box that has the focus. **Enter** on a command in the catalog moves to its **Run** button; on a run in History it opens that command; in the Command Palette it opens the highlighted one. |
|
||||
| **Esc** | Closes a dialog the way its **Cancel** or **Close** button does: nothing is changed. |
|
||||
| **Ctrl+K**, **Ctrl+F**, **Ctrl+H**, **Ctrl+,**, **Ctrl+L** | Open the Command Palette, search the current list, Home, Settings, the Log viewer — and move the keyboard into that page. |
|
||||
|
||||
Every shortcut is in the user guide, under [Keyboard shortcuts](USAGE.md#keyboard-shortcuts), and in
|
||||
the app under More (⋯) ▸ Keyboard shortcuts.
|
||||
|
||||
- **A risky command can't be run by accident.** A Caution command asks first, with **Cancel**
|
||||
focused and as the default; a Dangerous one waits until its name or ID is typed — the ID is read
|
||||
out with the box.
|
||||
- **Ctrl+Q does nothing while you are typing** in a text box (other than a search box), so a slip
|
||||
can't close the app in the middle of an edit.
|
||||
|
||||
### Screen readers
|
||||
|
||||
- **Every button, switch, box and list item has a name**, from the same translations as the screen.
|
||||
A button repeated on every row names its row — *Undo: Flush DNS cache*, *Move up: Clean temporary
|
||||
files*, *Add to favorites: Check disk*.
|
||||
- **A command is read with its risk**: *Reset Windows Update, Caution, Requires admin, May require
|
||||
restart* — what a sighted user reads from the coloured dot and the badges.
|
||||
- **Every page has a heading**: its title is a heading of the first level, each section one of the
|
||||
second, so a screen reader's heading keys move from section to section.
|
||||
- **What appears is said as it appears**: a command starting, waiting for administrator permission,
|
||||
finishing (with its result, exit code and time, and whether Windows must restart), how many
|
||||
commands a search found, the highlighted result in the Command Palette (*Flush DNS cache, Safe, 2
|
||||
of 14*), every notification at the bottom of the window, and an update's progress.
|
||||
- **The console and the Log viewer can be read line by line**, and an error line starts with
|
||||
*Error*.
|
||||
- **Icons are left out**: they only decorate the word beside them, so a screen reader never stops on
|
||||
a symbol. A notice on a page is read in full with its kind first — *Warning: These commands are
|
||||
not part of the vetted catalog…*
|
||||
- **Dialogs say they are dialogs**, keep the focus inside them until they close, and give it back.
|
||||
|
||||
### Seeing the screen
|
||||
|
||||
- **Light, dark, or the same as Windows** (Settings ▸ Appearance ▸ Theme). Every colour comes from
|
||||
the theme.
|
||||
- **Windows contrast themes** (Settings ▸ Accessibility ▸ Contrast themes) always win over the app's
|
||||
own theme, as soon as you turn one on or off. Dimmed text and badge icons are drawn at full
|
||||
strength under a contrast theme.
|
||||
- **Text size**: the app's own font size (Small, Medium, Large) is multiplied by Windows' **Text
|
||||
size** (Settings ▸ Accessibility ▸ Text size, up to 225 %), picked up when you come back to the
|
||||
app; at the largest sizes the navigation pane widens to fit its labels. **Display scaling** works
|
||||
at any size, on every screen, and so does **Magnifier** (Windows logo key + Plus).
|
||||
- **Colour is never the only signal**: risk levels always come with their word or an icon, and an
|
||||
error line in the console has a bar at its left as well as its colour.
|
||||
- **Animations follow Windows' Animation effects setting**: with it off, pages switch at once.
|
||||
|
||||
### Languages
|
||||
|
||||
CommandForge is shown in English, Vietnamese, Japanese, Simplified Chinese or Spanish (Settings ▸
|
||||
Appearance ▸ Language), and the names a screen reader reads come from the same translations. The
|
||||
documents — the user guide, this page, the legal texts — are in English.
|
||||
|
||||
## How it is checked
|
||||
|
||||
- **On every build**, by the project's tests: every control that shows no text has a name; the
|
||||
items of a list are named by what they show, not by a program type; every page title is a
|
||||
heading; the app declares that it follows each screen's scaling; no colour is written into a
|
||||
screen; every icon is kept out of a screen reader's way; this page's links work and it never
|
||||
claims conformance. The key every name uses must exist in all five languages. Other tests run the
|
||||
fixes on real controls of the WPF-UI library the app is built with, so a library update that
|
||||
renames one of their parts is caught before a release.
|
||||
- **By an automated scan**: Axe.Windows, Microsoft's UI Automation rules (the engine of Accessibility
|
||||
Insights for Windows), over every page of the running app, the first-start terms and the console
|
||||
after a command, in the light and the dark theme and at Windows' largest Text size. Version 2.2.0
|
||||
passes it with no error.
|
||||
- **By hand**: the maintainer used CommandForge 2.1.0 with the keyboard alone (mouse disconnected)
|
||||
and with Narrator on Windows 11 in November 2026 and found no major problem. Version 2.2.0 then
|
||||
fixed everything a review of every screen found — the result of a command was not announced, the
|
||||
console could not be read line by line, the Command Palette's highlight was silent, and some lists
|
||||
read a program type instead of their text, among others. The 2.2.0 build was checked the same way
|
||||
before its release, and with a Windows contrast theme, a larger Text size and Animation effects
|
||||
off.
|
||||
- **Not tested yet**: NVDA, JAWS, Voice Access, touch, and Windows 10. They should work through the
|
||||
same Windows interface Narrator uses, but nobody has checked.
|
||||
|
||||
## Known limitations
|
||||
|
||||
Each one with what to do instead. A barrier that is not on this list is worth reporting.
|
||||
|
||||
- **A command's output is the text Windows' tool prints**, in Windows' language, sometimes with
|
||||
progress bars drawn out of characters. Read it line by line, or use **Copy all** or **Save** above
|
||||
the console to read it elsewhere.
|
||||
- **There are no access keys** (Alt with an underlined letter): with five languages they would clash.
|
||||
Use the shortcuts above, Tab and F6.
|
||||
- **The title bar's Minimize, Maximize and Close buttons are not Tab stops** (screen readers still
|
||||
find them by name). Use **Alt+F4** or **Ctrl+Q** to close, and Windows' own **Windows logo key +
|
||||
arrow** keys to maximize, restore or minimize.
|
||||
- **Expanding a card in Settings still animates** when Windows' Animation effects is off: the
|
||||
animation belongs to the WPF-UI library the app is built with.
|
||||
- **At the largest sizes** (Large font with Windows' Text size near 225 %), some pages and dialogs
|
||||
need scrolling, and the title bar's search box shows the start of its text (its tooltip and its
|
||||
name have all of it; Ctrl+K opens it).
|
||||
- **Icons keep their size**: Windows' Text size enlarges text only. Display scaling (Settings ▸
|
||||
System ▸ Display ▸ Scale) or Magnifier enlarges everything.
|
||||
- **The windows Windows itself shows** — the administrator (UAC) prompt, choosing a file — are
|
||||
Windows', not CommandForge's.
|
||||
|
||||
## Report an accessibility problem
|
||||
|
||||
1. Open an issue on the GitLab mirror with the
|
||||
[Accessibility template](https://gitlab.com/poli0981/CommandForge/-/issues/new?issuable_template=Accessibility),
|
||||
or write to **[accessibility@poli0981.dev](mailto:accessibility@poli0981.dev)** if you'd rather not
|
||||
use GitLab or not post in public.
|
||||
2. Say what you were trying to do and what happened instead; your CommandForge version (More ▸ About)
|
||||
and your Windows version; and what you use — the keyboard alone, Narrator, NVDA, JAWS, Magnifier,
|
||||
a contrast theme, a larger text size — with its version. The steps to get there help, and so does
|
||||
a screenshot or a recording, but neither is required. **You never need to tell us anything about
|
||||
yourself or a disability.**
|
||||
3. If you want to attach details from your PC, **More ▸ Report a bug** gathers them and exports the
|
||||
log as a file you review first; nothing is uploaded by itself.
|
||||
|
||||
**A safety prompt you could not perceive or answer** — a Caution or Dangerous confirmation — is a
|
||||
safety problem as well: say so in the report, and it is handled first.
|
||||
|
||||
### How serious it is
|
||||
|
||||
You do not have to choose; the maintainer sets it when reading the report.
|
||||
|
||||
| Severity | What it means | For example |
|
||||
|---|---|---|
|
||||
| **Critical** | A task cannot be done at all. | A Dangerous command's confirmation cannot be answered with the keyboard; the terms cannot be accepted on first start; a command's result is never conveyed. |
|
||||
| **Serious** | It can be done only with great difficulty or a workaround. | A command's output can be read only after saving it to a file. |
|
||||
| **Moderate** | It is tiring or inconsistent. | A name that differs from what the screen shows; an extra stop for Tab. |
|
||||
| **Minor** | It barely gets in the way. | A tooltip the keyboard cannot reach, when its words are shown elsewhere too. |
|
||||
|
||||
### What happens next
|
||||
|
||||
CommandForge has one maintainer, so there are no promised times. Every report is read and answered,
|
||||
without doubting what you describe. Critical problems come before other work; a workaround, when
|
||||
there is one, is written on the issue; the fix ships in a release, and the issue is closed once you
|
||||
say it works for you — or when a fix has been out for a while and nobody has answered.
|
||||
|
||||
## Who looks after this
|
||||
|
||||
The maintainer, poli0981, keeps this page and the checks behind it, and reviews both for each release
|
||||
that changes a screen. A change to CommandForge that moves anything on this page changes the page in
|
||||
the same pull request.
|
||||
|
||||
## For contributors
|
||||
|
||||
A change to the app keeps what the tests above hold: a name, from the translations in all five
|
||||
languages, for every control that shows no text and every list item; colours only from the theme.
|
||||
Say in the pull request what you checked with the keyboard and with Narrator (Accessibility Insights
|
||||
for Windows is a good companion). The rules are in [CONTRIBUTING.md](.github/CONTRIBUTING.md).
|
||||
|
||||
## Feedback
|
||||
|
||||
To improve this page, open an issue or a pull request. A barrier goes through the form above, so that
|
||||
it is not lost.
|
||||
@@ -37,10 +37,10 @@ dotnet format CommandForge.slnx --verify-no-changes # CI gate
|
||||
```
|
||||
|
||||
The build treats warnings as errors and enforces the .NET analyzers, code style
|
||||
(`EnforceCodeStyleInBuild`) and **SonarAnalyzer.CSharp** (the same rules SonarCloud applies),
|
||||
(`EnforceCodeStyleInBuild`) and **SonarAnalyzer.CSharp** (Sonar's C# rules as a Roslyn analyzer),
|
||||
including unused-using and unused-member rules.
|
||||
|
||||
To see coverage the way CI measures it (Coverlet, OpenCover format):
|
||||
To measure test coverage (Coverlet, OpenCover format):
|
||||
|
||||
```bash
|
||||
dotnet test CommandForge.slnx --collect "XPlat Code Coverage;Format=opencover"
|
||||
@@ -49,12 +49,16 @@ dotnet test CommandForge.slnx --collect "XPlat Code Coverage;Format=opencover"
|
||||
## Dependencies
|
||||
|
||||
- Package versions live in **each `.csproj`**; SonarAnalyzer is referenced once from
|
||||
`Directory.Build.props`. Central Package Management is deliberately not used: GitHub's dependency
|
||||
graph (Dependabot alerts, dependency review, the release SBOM) doesn't read
|
||||
`Directory.Packages.props`.
|
||||
`Directory.Build.props`. Central Package Management is not used (a convention from the GitHub
|
||||
days, when the dependency graph didn't read `Directory.Packages.props`; Renovate reads both).
|
||||
- Every restore runs a **NuGet audit** of direct and transitive packages; moderate or higher
|
||||
advisories fail the build.
|
||||
- Dependabot groups updates (Velopack and the `vpk` tool move together) with a cooldown.
|
||||
- A self-hosted **Renovate** on Gitea (the shared preset `poli0981/renovate-config`, plus
|
||||
`renovate.json`) proposes updates: minor and patch ones grouped, each held for 3 days after
|
||||
release, security fixes at once. Velopack and the `vpk` tool move together; majors wait for
|
||||
approval on the Dependency Dashboard, and new majors of the .NET SDK and of
|
||||
`Microsoft.Extensions.*` are never proposed: moving to a new .NET major is a deliberate
|
||||
migration, done by hand.
|
||||
|
||||
## Publish (self-contained) + package
|
||||
|
||||
@@ -86,30 +90,33 @@ It writes these artifacts to `Releases/`:
|
||||
present; see [UPDATES.md](UPDATES.md))
|
||||
- `releases.win.json` / `RELEASES` — the update manifest read by the app
|
||||
|
||||
`scripts/release-assets.ps1 -Version <X.Y.Z>`, run after `pack.ps1`, adds what a release publishes
|
||||
next to them: the CycloneDX SBOM, `SHA256SUMS` and the release notes, under `r2-release/` (the
|
||||
release workflow runs both; locally they are a dry run).
|
||||
|
||||
> No Authenticode signing yet — see [SECURITY.md](.github/SECURITY.md). Don't add a signing step
|
||||
> until Azure Trusted Signing (or SignPath Foundation for OSS) is set up.
|
||||
|
||||
## CI
|
||||
|
||||
All workflows pin actions to full commit SHAs and use least-privilege permissions.
|
||||
CI runs on **Gitea Actions** at `git.poli0981.dev/poli0981/CommandForge`, on the maintainer's
|
||||
own runner: `windows-latest` jobs run in host mode on a Windows 11 PC, `ubuntu-latest` jobs in
|
||||
Docker. The runner is online when the PC is on, so a run can wait; scheduled jobs only fall in
|
||||
13:00–16:00 UTC. The shared workflows come from the ops repository `poli0981/.github`, pinned by
|
||||
commit SHA (its migration runbook is `docs/GITEA-MIGRATION.md` there). All workflows pin actions
|
||||
to full commit SHAs and use least-privilege permissions.
|
||||
|
||||
| Workflow | What it does |
|
||||
|---|---|
|
||||
| `build.yml` | `build`: restore, `dotnet format --verify-no-changes`, Release build, tests (results and coverage uploaded). `package`: publish and `vpk pack` exactly like a release. |
|
||||
| `codeql.yml` | CodeQL for C# (Windows, manual build) and for the workflows themselves (`actions`). |
|
||||
| `sonarcloud.yml` | SonarCloud analysis with test coverage: the SonarScanner for .NET (pinned in `.config/dotnet-tools.json`) wraps a Release build and an OpenCover test run, and the SonarCloud app reports the quality gate on the PR. Needs the `SONAR_TOKEN` secret, so PRs from forks and Dependabot are skipped. |
|
||||
| `dependency-review.yml` | Fails a PR that adds a dependency with a moderate+ vulnerability or a license outside the GPLv3-compatible allow-list. |
|
||||
| `scorecard.yml` | OpenSSF Scorecard, reported to code scanning. |
|
||||
| `release.yml` | Tag-triggered release — see [RELEASING.md](RELEASING.md). |
|
||||
| `notify-ci-failure.yml` | Posts a Discord alert when the Build or SonarCloud workflow fails on `main` (needs the `DISCORD_CI_WEBHOOK` secret). |
|
||||
| `build.yml` | `build`: restore, `dotnet format --verify-no-changes`, Release build, tests (results and coverage kept as an artifact). `package`: publish and `vpk pack` exactly like a release. |
|
||||
| `security.yml` | `workflow-lint`: actionlint + shellcheck on the workflows. `scan` (ops `security.yml`): gitleaks over the full history, Opengrep (SAST, report only), osv-scanner, and a NuGetAudit restore that fails on high/critical advisories. Also weekly, Friday 14:11 UTC. |
|
||||
| `qodana.yml` | JetBrains Qodana for .NET (Rider's inspections, native mode on Windows) over the whole solution, after a Release build, through the ops `reusable-qodana.yml` (Qodana CLI); settings in `qodana.yaml`, and the gate is zero problems. Results go to Qodana Cloud and the `qodana-report` artifact. Advisory. Needs the `QODANA_TOKEN` secret. |
|
||||
| `release.yml` | Tag-triggered release to Cloudflare R2 and a Gitea release — see [RELEASING.md](RELEASING.md). A manual run on a branch is a dry run. |
|
||||
| `announce-release.yml` | Posts a release to Discord (also called by `release.yml`). |
|
||||
| `notify-ci-failure.yml` | Posts a Discord alert when Build, Qodana or Security fails on `main` (`DISCORD_CI_WEBHOOK`). |
|
||||
| `notify-release-pipeline.yml` | Posts every Release run's result to Discord (`DISCORD_RELEASE_PIPELINE_WEBHOOK`). |
|
||||
|
||||
The SonarCloud quality gate ("Sonar way") expects new code to be at least 80% covered by tests,
|
||||
with no new issues. XAML code-behind and the two entry points (`Program.cs` of the app and of the
|
||||
Elevator) are left out of coverage. Roslyn rules aren't imported as external issues there, since
|
||||
the build already fails on them. Snyk also checks every PR.
|
||||
|
||||
`main` is protected by a repository ruleset: changes land through pull requests; `build`,
|
||||
`package`, `Analyze (csharp)`, `Analyze (actions)` and `dependency-review` must pass; and a PR
|
||||
can't introduce CodeQL errors or high-severity security alerts.
|
||||
`main` is protected on Gitea: no force push or deletion, and changes land through pull requests
|
||||
whose `Build` checks pass.
|
||||
|
||||
See [UPDATES.md](UPDATES.md) for how auto-update works.
|
||||
+133
-11
@@ -7,6 +7,126 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.3.0] — 2026-11-26
|
||||
|
||||
CommandForge has moved off GitHub, where the account behind the project was suspended: the source
|
||||
now lives at [git.poli0981.dev](https://git.poli0981.dev/poli0981/CommandForge), issues go to the
|
||||
[GitLab mirror](https://gitlab.com/poli0981/CommandForge/-/issues), and releases and updates come
|
||||
from `releases.poli0981.dev`. **If you have 2.2.0 or older, install this version once by hand**
|
||||
([installer](https://releases.poli0981.dev/commandforge/CommandForge-win-Setup.exe)): those
|
||||
versions look for updates on GitHub and will never find one. Run it over your installation; your
|
||||
settings, favorites, history, recipes and commands stay.
|
||||
|
||||
### Fixed
|
||||
- **Updates** work again: the app checks `https://releases.poli0981.dev/commandforge` (Cloudflare
|
||||
R2) for new versions, the only address it contacts on its own. When a check fails, the message
|
||||
names "the update server" instead of GitHub; offline, not found (404), refused or rate-limited
|
||||
(403/429) and server errors (5xx) are still told apart.
|
||||
- **Links** that opened GitHub open the project on Gitea: **Source code** (it was "GitHub") in
|
||||
About and Settings, the user guide, the accessibility statement, and the full texts of the EULA,
|
||||
GPLv3, Disclaimer and Privacy policy ("Read the full text online").
|
||||
|
||||
### Changed
|
||||
- **Report a bug** opens a new issue on the GitLab mirror with the title and the Bug template
|
||||
already answered: what happened (and a crash's error code), the app version and the Windows
|
||||
version. Nothing is sent until you submit it.
|
||||
- **Privacy policy:** the update check goes to `releases.poli0981.dev`, served by Cloudflare,
|
||||
instead of GitHub. Nothing else changed (no telemetry, no data collected), so you aren't asked to
|
||||
accept the terms again.
|
||||
- **Security reports** go to security@poli0981.dev only; accessibility barriers to the GitLab
|
||||
*Accessibility* template or accessibility@poli0981.dev.
|
||||
- **Release files:** every release publishes `SHA256SUMS` and a CycloneDX SBOM next to its files
|
||||
(`releases.poli0981.dev/commandforge/<version>/`). The checksums cover what the version ships:
|
||||
the installer, the portable zip and its packages. (The `checksums.txt` of 2.1.0 and 2.2.0 had
|
||||
wrong lines for the two feed files, which are rewritten on every release.)
|
||||
- **CI** runs on Gitea Actions: Build, Security (gitleaks, Opengrep, osv-scanner, NuGetAudit,
|
||||
actionlint) and Qodana through its CLI replace CodeQL, SonarCloud, OpenSSF Scorecard and
|
||||
dependency review; a self-hosted Renovate replaces Dependabot.
|
||||
- Dependencies: SonarAnalyzer 10.37; the CycloneDX tool 6.3.2 (release SBOM) is added and the
|
||||
SonarScanner removed. The app keeps the .NET 10.0.15 runtime (SDK 10.0.404), still the latest.
|
||||
|
||||
### Removed
|
||||
- Build-provenance attestations (`gh attestation verify`), GitHub Discussions and GitHub's private
|
||||
vulnerability reporting: none of them exists outside GitHub. Releases are still built from signed
|
||||
tags by a public workflow, with checksums, an SBOM and an optional VirusTotal scan.
|
||||
|
||||
## [2.2.0] — 2026-11-16
|
||||
|
||||
CommandForge is now **stable and in maintenance mode** (see
|
||||
[Project status](https://github.com/poli0981/CommandForge#project-status)). This release brings an
|
||||
accessibility review of every screen, the November 2026 .NET security update and Qodana code
|
||||
analysis.
|
||||
|
||||
### Added
|
||||
- **Accessibility statement**: [ACCESSIBILITY.md](https://github.com/poli0981/CommandForge/blob/main/ACCESSIBILITY.md)
|
||||
says what works with the keyboard, screen readers, contrast themes and larger text, what doesn't
|
||||
yet, and how to report a barrier: an *Accessibility problem* issue form or
|
||||
accessibility@poli0981.dev. In the app: More (⋯) → About CommandForge → Accessibility.
|
||||
- **F6 / Shift+F6** move between the navigation pane, the page and the console.
|
||||
- **Windows' Text size** (Settings › Accessibility › Text size) now enlarges the app's text too, on
|
||||
top of its own Small / Medium / Large.
|
||||
|
||||
### Changed
|
||||
- **Maintenance mode**: the work now goes into security, dependency and platform updates, catalog
|
||||
commands, and bug, UI/UX, accessibility and translation fixes; a new feature only when it is
|
||||
genuinely necessary. The policy is in
|
||||
[CONTRIBUTING.md](https://github.com/poli0981/CommandForge/blob/main/.github/CONTRIBUTING.md#maintenance-mode-what-we-accept),
|
||||
and the issue forms follow it, with two new ones: *Command — add, fix or remove* and
|
||||
*Translation fix*.
|
||||
- Code quality: JetBrains Qodana for .NET now inspects `main` and every pull request from CI, next
|
||||
to SonarCloud: Rider's C#, XAML and resource inspections and JetBrains' security rules, run
|
||||
natively on Windows. The gate is zero problems. Its first report also fixed a process object that
|
||||
could be left undisposed when a command's program could not be found, and the command history
|
||||
being read outside the lock it is written under.
|
||||
- Dependencies: Microsoft.Extensions.DependencyInjection 10.0.15, CsWin32 0.3.371, SonarAnalyzer
|
||||
10.36, SonarScanner for .NET 12.1.0, xUnit v3 4.0.3, Microsoft.NET.Test.Sdk 18.12.0, coverlet
|
||||
10.1.1; in CI, setup-dotnet 6.1.0 and CodeQL action 4.39.3.
|
||||
- Dependabot no longer proposes new major versions of .NET or Microsoft.Extensions: moving to a
|
||||
new .NET major is a deliberate migration, done by hand.
|
||||
|
||||
### Fixed
|
||||
- **Screen readers** (Narrator, NVDA, JAWS) now hear what appears: a command starting, waiting for
|
||||
administrator permission and finishing — with its result, exit code, time and whether Windows must
|
||||
restart —, how many commands a search found, the Command Palette's highlighted result and its
|
||||
position, every notification, and an update's progress.
|
||||
- **The console and the Log viewer** can be read line by line with the arrow keys; an error line is
|
||||
read as an error and has a bar at its left, not only a colour.
|
||||
- **Lists, options and buttons** are read by their text instead of a program type name (the language
|
||||
lists, the Recipes command list, My commands, the Log viewer, the shortcuts list), commands with
|
||||
their risk level and badges, and a button repeated on every row names its row ("Undo: …").
|
||||
- **Keyboard**: after Ctrl+H, Ctrl+, or Ctrl+L, or choosing a page in the pane, the keyboard moves
|
||||
into that page; a command opened from Home, History or the palette gets the focus in the catalog;
|
||||
Enter opens the selected command in the catalog and in History; Tab reaches a row's star, Undo and
|
||||
Run again; the catalog's splitters move with the arrow keys; every window and dialog starts with
|
||||
the keyboard inside it, and a Caution confirmation on Cancel.
|
||||
- **Unnamed controls** got names: the navigation pane's toggle and its two lists, the title bar's
|
||||
buttons (Maximize is read as Restore down while the window is maximized), a search box's clear
|
||||
button, the Settings cards and expanders, the Debug panel's tabs and
|
||||
the four "Read on GitHub" links; the Dangerous confirmation also reads the command's ID, and
|
||||
Settings' theme and font size choices are read as groups. The log level list is translated.
|
||||
- **Icons are no longer read** as stray symbols: they only decorate the word beside them, so a
|
||||
screen reader skips them. A notice on a page is read in full with its kind ("Warning: These
|
||||
commands are not part of the vetted catalog…"); before, a screen reader could not reach its text.
|
||||
A blank line in the console is read as "Blank line", and the frame around each page is no longer
|
||||
an empty stop for Tab.
|
||||
- **Seeing the screen**: dimmed text and badge icons are drawn at full strength under a Windows
|
||||
contrast theme, low-contrast grey text is darker, cut-off text shows in full as a tooltip, page
|
||||
transitions follow Windows' Animation effects setting, and lists and cards no longer clip larger
|
||||
text. At the largest text sizes the navigation pane widens to fit its labels, the catalog's
|
||||
filters and a command's badges wrap instead of running off the edge, and the title bar's search
|
||||
box ends in "…" with its full text as a tooltip.
|
||||
- **Ctrl+Q** no longer closes the app while you are typing in a text box (a search box excepted).
|
||||
- **Report a bug** opens GitHub's *Bug report* form with the description, the crash code and the
|
||||
versions filled in. Before, GitHub showed anyone who isn't a collaborator the list of forms
|
||||
instead, and what the app had filled in was lost.
|
||||
|
||||
### Security
|
||||
- Built with the .NET 10.0.404 SDK, so the app ships the .NET 10.0.15 runtime (the November 2026
|
||||
security update).
|
||||
- Links and folders are opened only when they are `https:` or `mailto:` addresses or existing
|
||||
folders: Windows runs whatever the shell is handed, so a `file:` address or an unknown protocol is
|
||||
refused.
|
||||
|
||||
## [2.1.0] — 2026-10-26
|
||||
|
||||
Three new categories and 37 new commands (the catalog grows from 261 to 298), the October 2026
|
||||
@@ -297,14 +417,16 @@ Initial public release.
|
||||
checksums (and an optional VirusTotal scan). No telemetry — the only network use is checking
|
||||
GitHub for updates.
|
||||
|
||||
[Unreleased]: https://github.com/poli0981/CommandForge/compare/v2.1.0...HEAD
|
||||
[2.1.0]: https://github.com/poli0981/CommandForge/compare/v2.0.0...v2.1.0
|
||||
[2.0.0]: https://github.com/poli0981/CommandForge/compare/v1.5.1...v2.0.0
|
||||
[1.5.1]: https://github.com/poli0981/CommandForge/compare/v1.5.0...v1.5.1
|
||||
[1.5.0]: https://github.com/poli0981/CommandForge/compare/v1.4.0...v1.5.0
|
||||
[1.4.0]: https://github.com/poli0981/CommandForge/compare/v1.3.0...v1.4.0
|
||||
[1.3.0]: https://github.com/poli0981/CommandForge/compare/v1.2.0...v1.3.0
|
||||
[1.2.0]: https://github.com/poli0981/CommandForge/compare/v1.1.1...v1.2.0
|
||||
[1.1.1]: https://github.com/poli0981/CommandForge/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://github.com/poli0981/CommandForge/compare/v1.0.0...v1.1.0
|
||||
[1.0.0]: https://github.com/poli0981/CommandForge/releases/tag/v1.0.0
|
||||
[Unreleased]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.3.0...main
|
||||
[2.3.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.2.0...v2.3.0
|
||||
[2.2.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.1.0...v2.2.0
|
||||
[2.1.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.0.0...v2.1.0
|
||||
[2.0.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.5.1...v2.0.0
|
||||
[1.5.1]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.5.0...v1.5.1
|
||||
[1.5.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.4.0...v1.5.0
|
||||
[1.4.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.3.0...v1.4.0
|
||||
[1.3.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.2.0...v1.3.0
|
||||
[1.2.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.1.1...v1.2.0
|
||||
[1.1.1]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.0.0...v1.1.0
|
||||
[1.0.0]: https://git.poli0981.dev/poli0981/CommandForge/src/tag/v1.0.0
|
||||
@@ -10,7 +10,14 @@
|
||||
|
||||
- **Chỉ Windows 10 (22H2) và 11**, x64 (ARM64 nếu được).
|
||||
- **Open-source, GPLv3.**
|
||||
- Cài & cập nhật bằng **Velopack** (unpackaged, không qua Store).
|
||||
- Cài & cập nhật bằng **Velopack** (unpackaged, không qua Store); feed + gói trên Cloudflare R2 `https://releases.poli0981.dev/commandforge`.
|
||||
- Mã nguồn chuẩn trên **Gitea** `git.poli0981.dev/poli0981/CommandForge` (tài khoản GitHub đã bị khóa từ 11/2026); issue/MR qua mirror GitLab `gitlab.com/poli0981/CommandForge` (xem [mục 9](#9-forge--ci)).
|
||||
- **Trạng thái: ổn định, chế độ bảo trì** từ v2.2.0 (2026-11-16). Chỉ nhận: cập nhật dependency;
|
||||
vá bảo mật (High/Critical → bản vá khẩn, Moderate → đợt cập nhật định kỳ kế tiếp); nâng cấp nền
|
||||
tảng lớn (.NET mới); thêm/bớt/sửa lệnh catalog (lỗi thời, sai cú pháp, có thể gây hại — loại gây
|
||||
hại báo riêng qua email `security@`); sửa lỗi, UI/UX, accessibility; sửa bản dịch. Tính năng mới
|
||||
chỉ khi thật sự phù hợp và cần thiết. Nguồn chuẩn của chính sách:
|
||||
`.github/CONTRIBUTING.md#maintenance-mode-what-we-accept`.
|
||||
|
||||
---
|
||||
|
||||
@@ -21,8 +28,8 @@
|
||||
3. **Khởi động lại:** Phát hiện cần reboot bằng **exit code `3010`** (`ERROR_SUCCESS_REBOOT_REQUIRED`), không chỉ parse text.
|
||||
4. **Ranh giới kiến trúc:** `Domain` không phụ thuộc gì. `Application` chỉ phụ thuộc `Domain`. `Infrastructure`/`Wpf` hiện thực các interface của `Application`. **Không bao giờ** để `Domain`/`Application` tham chiếu WPF hay Win32.
|
||||
5. **Không obfuscate.** Mã GPLv3 vốn công khai; obfuscate vừa vô nghĩa vừa gây false-positive antivirus.
|
||||
6. **Hiện chưa ký số Authenticode** (sẽ thêm Azure Trusted Signing/SignPath sau — xem `docs/Build.md`). Đừng thêm bước ký Authenticode vào build/CI lúc này. Attestation build-provenance (Sigstore, `actions/attest-build-provenance`), SBOM và checksums trong `release.yml` là được phép và phải giữ.
|
||||
7. **Không telemetry.** Mạng duy nhất được phép: gọi GitHub để kiểm tra cập nhật. Bất kỳ thu thập dữ liệu nào khác đều bị cấm (vi phạm `docs/Privacy.md`).
|
||||
6. **Hiện chưa ký số Authenticode** (sẽ thêm Azure Trusted Signing/SignPath sau — xem `docs/Build.md`). Đừng thêm bước ký Authenticode vào build/CI lúc này. SBOM (CycloneDX) và `SHA256SUMS` do `scripts/release-assets.ps1` tạo trong `release.yml` (tải lên `releases.poli0981.dev/commandforge/<version>/`) là bắt buộc và phải giữ. Attestation build-provenance đã bỏ khi rời GitHub (Gitea không có OIDC — quyết định D7 của runbook).
|
||||
7. **Không telemetry.** Mạng duy nhất được phép: kiểm tra/tải cập nhật từ `https://releases.poli0981.dev/commandforge` (`ProductLinks.UpdateFeed`). Bất kỳ thu thập dữ liệu nào khác đều bị cấm (vi phạm `docs/Privacy.md`).
|
||||
8. **Xác nhận trước lệnh nguy hiểm.** Lệnh `Caution`/`Dangerous` phải có hộp thoại xác nhận; không cho phép tắt xác nhận với nhóm `Dangerous`.
|
||||
|
||||
---
|
||||
@@ -32,8 +39,8 @@
|
||||
- **.NET 10 (LTS), C# 14** · **WPF** + **WPF-UI 4.3** (Fluent, lepoco) — đã thay Material Design từ v2.0.0
|
||||
- **CommunityToolkit.Mvvm** (MVVM) · **Microsoft.Extensions.DependencyInjection** (`ServiceCollection` + `ValidateOnBuild`; **không** dùng Generic Host)
|
||||
- **CsWin32** (P/Invoke) · **Serilog** (logging) · `System.Threading.Channels`
|
||||
- **Velopack** (`vpk` pin làm local tool trong `.config/dotnet-tools.json`) cho cài đặt + cập nhật qua GitHub Releases
|
||||
- Test: **xUnit v3** (`xunit.v3.mtp-off`, chạy qua VSTest) · **SonarAnalyzer.CSharp** chạy trong build
|
||||
- **Velopack** (`vpk` pin làm local tool trong `.config/dotnet-tools.json`) cho cài đặt + cập nhật qua Cloudflare R2 (HTTP source); **CycloneDX** (local tool) tạo SBOM khi phát hành
|
||||
- Test: **xUnit v3** (`xunit.v3.mtp-off`, chạy qua VSTest) · **SonarAnalyzer.CSharp** (Roslyn analyzer) chạy trong build · **Qodana** trong CI (không còn SonarCloud — D1)
|
||||
- i18n: `.resx` 5 ngôn ngữ (EN/VI/JA/zh-Hans/ES)
|
||||
|
||||
---
|
||||
@@ -44,7 +51,7 @@
|
||||
src/
|
||||
CommandForge.Domain/ # entities thuần
|
||||
CommandForge.Application/ # use-cases + interfaces (ports)
|
||||
CommandForge.Infrastructure/ # Process, registry, Velopack, GitHub, Serilog
|
||||
CommandForge.Infrastructure/ # Process, registry, Velopack, Serilog
|
||||
CommandForge.Wpf/ # View + ViewModel + DI bootstrap + .resx (namespace: CommandForge.Desktop)
|
||||
helper/
|
||||
CommandForge.Elevator/ # tiến trình phụ chạy lệnh Admin (named pipe)
|
||||
@@ -67,7 +74,7 @@ dotnet tool restore
|
||||
pwsh ./scripts/pack.ps1 -Version <ver>
|
||||
```
|
||||
|
||||
Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` → `release.yml` (xem `RELEASING.md`).
|
||||
Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` (khớp `<Version>`) → `.gitea/workflows/release.yml` → R2 + release Gitea + Discord (xem `RELEASING.md`). Chạy tay Release trên nhánh = dry run (không upload).
|
||||
|
||||
---
|
||||
|
||||
@@ -75,8 +82,13 @@ Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` → `release.yml` (xem `RE
|
||||
|
||||
- Code, định danh, comment kỹ thuật: **tiếng Anh**. Chuỗi hiển thị cho người dùng: **`.resx` (EN/VI/JA/zh-Hans/ES)** — không hardcode chuỗi UI; mỗi key phải có ở cả 5 file (test `ResxKeyTests` quét UI để kiểm tra).
|
||||
- Namespace tầng giao diện là `CommandForge.Desktop` (project/assembly/exe vẫn tên `CommandForge.Wpf`): namespace `CommandForge.Wpf` che namespace gốc `Wpf` của WPF-UI trong code XAML sinh ra.
|
||||
- **Accessibility** (xem `ACCESSIBILITY.md`): control không có chữ phải có `AutomationProperties.Name`
|
||||
từ `.resx`; item của danh sách được đặt tên qua `ItemContainerStyle`; icon dùng `ctl:DecorativeIcon`
|
||||
(không dùng `ui:SymbolIcon`/`new SymbolIcon` — glyph vùng Unicode riêng bị Narrator đọc); không
|
||||
truyền thông tin chỉ bằng màu; thông báo cho Narrator qua `INotificationService.Announce`.
|
||||
`AccessibilityTests` và `WpfAccessibilityRuntimeTests` (STA, template WPF-UI thật) kiểm tra.
|
||||
- WPF-UI: mỗi trang (UserControl trong NavigationView) phải đặt `Foreground="{DynamicResource TextFillColorPrimaryBrush}"` ở gốc (Frame không truyền màu chữ xuống); lớp con của `ContentDialog` phải gọi `SetResourceReference(StyleProperty, typeof(ContentDialog))` — `XamlConventionsTests` kiểm tra cả hai. Cỡ chữ dùng `DynamicResource AppFontSize*`.
|
||||
- Version package đặt trong **từng `.csproj`** (không dùng Central Package Management — dependency graph của GitHub không đọc `Directory.Packages.props`).
|
||||
- Version package đặt trong **từng `.csproj`** (không dùng Central Package Management — quy ước có từ thời GitHub; Renovate đọc được cả hai).
|
||||
- Nullable reference types **bật**; `TreatWarningsAsErrors` **bật**; analyzers **bật**.
|
||||
- `async/await` xuyên suốt cho I/O; không `async void` (trừ event handler); luôn truyền `CancellationToken`.
|
||||
- MVVM bằng source-generator của CommunityToolkit (`[ObservableProperty]`, `[RelayCommand]`).
|
||||
@@ -113,6 +125,16 @@ Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` → `release.yml` (xem `RE
|
||||
|
||||
> ⚠️ Thư mục `docs/` nằm trong `.gitignore` (tài liệu nội bộ, chỉ có trên máy).
|
||||
|
||||
**Tài liệu công khai (ở gốc repo, được commit):** `README.md`, `USAGE.md` (hướng dẫn người dùng — link "User guide" trong app), `CHANGELOG.md`, `BUILD.md`, `RELEASING.md`, `UPDATES.md`, `PRIVACY.md`, `EULA.md`, `DISCLAIMER.md`, `THIRD-PARTY-NOTICES.md`, `MAINTAINERS.md`, `LICENSE`, và trong `.github/`: `SECURITY.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`. Legal Gate trỏ tới EULA/PRIVACY/DISCLAIMER/LICENSE công khai.
|
||||
**Tài liệu công khai (ở gốc repo, được commit):** `README.md`, `ACCESSIBILITY.md` (tuyên bố trợ năng — mục tiêu WCAG 2.2 AA, không phải tuyên bố tuân thủ; link "Accessibility" trong About), `USAGE.md` (hướng dẫn người dùng — link "User guide" trong app), `CHANGELOG.md`, `BUILD.md`, `RELEASING.md`, `UPDATES.md`, `PRIVACY.md`, `EULA.md`, `DISCLAIMER.md`, `THIRD-PARTY-NOTICES.md`, `MAINTAINERS.md`, `LICENSE`, và trong `.github/`: `SECURITY.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`. Legal Gate trỏ tới EULA/PRIVACY/DISCLAIMER/LICENSE công khai (trên Gitea, qua `ProductLinks`). Template issue/MR cho GitLab ở `.gitlab/`; `.github/ISSUE_TEMPLATE` giữ cho Gitea.
|
||||
|
||||
**Email liên hệ (@poli0981.dev):** `security@` (lỗ hổng, cùng GitHub private vulnerability reporting) · `privacy@` · `legal@` · `copyright@` / `dmca@` / `takedown@` (bản quyền, DMCA, yêu cầu gỡ bỏ khác) · `code@` (mã nguồn, đóng góp, báo cáo Code of Conduct) · `collab@` · `press@` · `sponsor@`. Không dùng `games@` cho dự án này.
|
||||
**Email liên hệ (@poli0981.dev):** `security@` (lỗ hổng — kênh riêng tư duy nhất, không bao giờ qua issue công khai) · `accessibility@` (rào cản trợ năng, cùng template *Accessibility* trên GitLab) · `privacy@` · `legal@` · `copyright@` / `dmca@` / `takedown@` (bản quyền, DMCA, yêu cầu gỡ bỏ khác) · `code@` (mã nguồn, đóng góp, báo cáo Code of Conduct) · `collab@` · `press@` · `sponsor@`. Không dùng `games@` cho dự án này.
|
||||
|
||||
---
|
||||
|
||||
## 9. Forge & CI
|
||||
|
||||
- **Gitea** (`https://git.poli0981.dev`, Gitea 28.x) là nhà chính; remote `origin` = Gitea (SSH cổng 2222), `github` = remote cũ (tài khoản bị khóa — **không bao giờ push/xóa**). Mirror công khai GitLab nhận issue/MR; registration của Gitea đóng. Runbook di chuyển: `E:\.github\docs\GITEA-MIGRATION.md` (repo ops `poli0981/.github`).
|
||||
- CI = **Gitea Actions** trong `.gitea/workflows/` (không còn `.github/workflows`). Runner là PC của maintainer: `windows-latest` = host mode (PowerShell, không cô lập; `setup-dotnet` cài vào tool cache), `ubuntu-latest` = Docker. Cron chỉ trong 13:00–16:00 UTC, phút lẻ, slot đăng ký trong `docs/migration/README.md` của repo ops (CommandForge: `Security` thứ Sáu 14:11 UTC).
|
||||
- Workflow dùng chung từ repo ops, **pin theo SHA của tag ops** (`# ops vYYYY.MM.N`) kèm `ops_ref` cùng SHA; Renovate không bump các pin này — bump tay khi repo ops có tag mới. Mọi action bên thứ ba pin SHA 40 ký tự + comment version. Upload artifact bằng `christopherhx/gitea-upload-artifact`.
|
||||
- Không có trên Gitea: CodeQL, Dependabot, SonarCloud, Scorecard, dependency review, attestations/OIDC, GitHub Pages/Discussions/Releases, `gh` CLI (dùng Gitea REST API với job token). Thay bằng: Qodana (CLI), `security.yml` (gitleaks, Opengrep, osv-scanner, NuGetAudit, actionlint), Renovate (`renovate.json` + preset `poli0981/renovate-config`).
|
||||
- Bí mật phát hành (`R2_RELEASES_*`, biến `R2_ACCOUNT_ID`, cấp user) chỉ dùng trong `release.yml` (tag/dispatch), qua biến môi trường `VPK_*`, không bao giờ trên dòng lệnh hay trong job `pull_request`/schedule.
|
||||
+3
-2
@@ -69,8 +69,9 @@ infringes your rights, please contact us first so it can be corrected quickly:
|
||||
- **Other takedown requests** (trademark, impersonation, unlawful content):
|
||||
[takedown@poli0981.dev](mailto:takedown@poli0981.dev)
|
||||
|
||||
Because the project is hosted on GitHub, you can also use GitHub's
|
||||
[DMCA Takedown Policy](https://docs.github.com/site-policy/content-removal-policies/dmca-takedown-policy).
|
||||
The source is hosted on the maintainer's own server (`git.poli0981.dev`), so these addresses are
|
||||
the way to reach the project. For content on its public mirror on GitLab, GitLab's own DMCA
|
||||
process also applies.
|
||||
|
||||
## Contact
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
<NuGetAuditLevel>low</NuGetAuditLevel>
|
||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901</WarningsNotAsErrors>
|
||||
|
||||
<!-- Normalized source paths in PDBs for CI builds (reproducible artifacts). -->
|
||||
<!-- Normalized source paths in PDBs for CI builds (reproducible artifacts). Gitea Actions sets
|
||||
GITHUB_ACTIONS=true too, for compatibility. -->
|
||||
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -50,17 +51,17 @@
|
||||
<Company>poli0981</Company>
|
||||
<Copyright>Copyright © 2026 poli0981</Copyright>
|
||||
<Description>Run complex Windows system commands through a visual, categorized interface.</Description>
|
||||
<RepositoryUrl>https://github.com/poli0981/CommandForge</RepositoryUrl>
|
||||
<PackageProjectUrl>https://github.com/poli0981/CommandForge</PackageProjectUrl>
|
||||
<RepositoryUrl>https://git.poli0981.dev/poli0981/CommandForge</RepositoryUrl>
|
||||
<PackageProjectUrl>https://git.poli0981.dev/poli0981/CommandForge</PackageProjectUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>2.1.0</Version>
|
||||
<Version>2.3.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Same rules SonarCloud applies, enforced at build time (warnings are errors). Package versions
|
||||
live in each .csproj: GitHub's dependency graph (Dependabot alerts, dependency review, the
|
||||
release SBOM) reads .csproj files but not Directory.Packages.props. -->
|
||||
<!-- Sonar's C# rules as a Roslyn analyzer, enforced at build time (warnings are errors). Package
|
||||
versions live in each .csproj, not in Directory.Packages.props (the project's convention;
|
||||
Renovate and the CycloneDX SBOM read them there). -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.35.0.4138">
|
||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.37.0.15768">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -40,9 +40,9 @@ the use of, or inability to use, the software. (Consistent with **GPLv3 §16**.)
|
||||
|
||||
## 5. Acceptable use
|
||||
|
||||
- Use the software in compliance with all applicable laws in your jurisdiction, and in compliance
|
||||
with the [GitHub Terms of Service](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
|
||||
when interacting with the project on GitHub.
|
||||
- Use the software in compliance with all applicable laws in your jurisdiction, and with the
|
||||
terms of the site you use when interacting with the project (for example GitLab's, for issues
|
||||
and merge requests on its mirror).
|
||||
- Use it only to administer **your own computers** or machines you are authorized to administer.
|
||||
- Do **not** use the software to damage, disrupt, defraud, or otherwise act unlawfully, or to
|
||||
violate the rights or privacy of others (including data-protection laws such as the GDPR and
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
CommandForge is currently maintained by:
|
||||
|
||||
- [@poli0981](https://github.com/poli0981) — author & maintainer
|
||||
- [poli0981](https://git.poli0981.dev/poli0981) — author & maintainer
|
||||
|
||||
Contact: [code@poli0981.dev](mailto:code@poli0981.dev) for the code and contributions; see the
|
||||
[README](README.md#contact) for the other addresses (security, privacy, legal…).
|
||||
|
||||
+14
-12
@@ -1,12 +1,12 @@
|
||||
# Privacy Policy — CommandForge
|
||||
|
||||
> This is a plain-language summary, not legal advice. Last updated: 2026-10-21.
|
||||
> This is a plain-language summary, not legal advice. Last updated: 2026-11-26.
|
||||
|
||||
## Summary
|
||||
|
||||
**CommandForge does not collect, store on any server, or transmit any of your personal data.**
|
||||
The app runs entirely **locally** on your machine. The **only** network connection the app itself
|
||||
makes is to GitHub, to check for and download software updates.
|
||||
makes is to `releases.poli0981.dev`, to check for and download software updates.
|
||||
|
||||
## Data stored on your PC (never leaves your machine)
|
||||
|
||||
@@ -31,12 +31,15 @@ details such as file paths, your user name or device names.
|
||||
|
||||
## Network connections
|
||||
|
||||
- **Update check:** the app contacts **GitHub** (the releases API and asset downloads) when it
|
||||
starts, if *Check for updates on startup* is on (the default), and whenever you choose **Check
|
||||
for updates** (`F5`). As with any download, GitHub sees your IP address and the request; see
|
||||
[GitHub's Privacy Statement](https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement).
|
||||
We receive no data from it.
|
||||
- **Links you open** — GitHub, the user guide, the license, *Report a bug* — open in your browser.
|
||||
- **Update check:** the app downloads the update feed (and, when you choose to update, the
|
||||
update package) from **`releases.poli0981.dev`** when it starts, if *Check for updates on
|
||||
startup* is on (the default), and whenever you choose **Check for updates** (`F5`). The files
|
||||
are stored on Cloudflare R2 and served by Cloudflare, which sees your IP address and the request
|
||||
like any web server; see [Cloudflare's Privacy Policy](https://www.cloudflare.com/privacypolicy/).
|
||||
The project keeps no logs of these downloads and receives no data from them. (Versions 2.2.0
|
||||
and older contacted GitHub instead.)
|
||||
- **Links you open** — the source code on `git.poli0981.dev`, the user guide, the license,
|
||||
*Report a bug* on GitLab — open in your browser, under those sites' own policies.
|
||||
- The app makes **no other network connections**. Some **commands you choose to run** use the
|
||||
network by their nature (for example winget, DNS and connectivity tests, Windows Update); that
|
||||
traffic goes between Windows and those services, not to us.
|
||||
@@ -48,7 +51,7 @@ tracking of any kind.
|
||||
|
||||
## Bug reports
|
||||
|
||||
*Report a bug* opens a pre-filled GitHub issue form in your browser with the app version, your
|
||||
*Report a bug* opens a pre-filled issue on the project's GitLab mirror in your browser with the app version, your
|
||||
Windows version and, after a crash, the error details. **Nothing is sent until you submit the form
|
||||
yourself**, and you can edit it first. If you attach exported logs, **review them before sharing**
|
||||
— they may include paths, user names or device names you may not wish to publish.
|
||||
@@ -66,6 +69,5 @@ to review the terms again on startup.
|
||||
## Contact
|
||||
|
||||
- Privacy questions: **[privacy@poli0981.dev](mailto:privacy@poli0981.dev)**
|
||||
- Security issues: see [SECURITY.md](.github/SECURITY.md) (security@poli0981.dev or private
|
||||
vulnerability reporting).
|
||||
- Repository: https://github.com/poli0981/CommandForge
|
||||
- Security issues: see [SECURITY.md](.github/SECURITY.md) (security@poli0981.dev).
|
||||
- Repository: https://git.poli0981.dev/poli0981/CommandForge (issues: https://gitlab.com/poli0981/CommandForge/-/issues)
|
||||
@@ -1,8 +1,23 @@
|
||||
# CommandForge
|
||||
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/releases)
|
||||
[](#project-status)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/actions?workflow=build.yml)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/actions?workflow=security.yml)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/actions?workflow=qodana.yml)
|
||||
[](ACCESSIBILITY.md)
|
||||

|
||||
[](LICENSE)
|
||||
|
||||
> Run powerful Windows maintenance commands from a clean, categorized GUI — no need to
|
||||
> memorize syntax.
|
||||
|
||||
> **Where things live** (since November 2026, when the GitHub account was suspended): source at
|
||||
> [`git.poli0981.dev/poli0981/CommandForge`](https://git.poli0981.dev/poli0981/CommandForge) (canonical). Mirror for issues and merge
|
||||
> requests: [`gitlab.com/poli0981/CommandForge`](https://gitlab.com/poli0981/CommandForge).
|
||||
> Downloads and updates: [`releases.poli0981.dev/commandforge/`](#install). Patches and questions:
|
||||
> `code@poli0981.dev`. Security: `security@poli0981.dev` (see [SECURITY.md](.github/SECURITY.md)).
|
||||
|
||||
CommandForge is an open-source Windows desktop app that wraps common system commands
|
||||
(winget, DISM, SFC, God Mode, registry tweaks, network reset, power plans, diagnostics…)
|
||||
in a visual, categorized interface. Every command is shown to you **before** it runs, with a
|
||||
@@ -10,8 +25,8 @@ clear danger level, a confirmation for anything risky, and an optional System Re
|
||||
|
||||
- **Windows 10 (22H2) and Windows 11**, x64.
|
||||
- **Open source, GPLv3.**
|
||||
- **Offline-first. No telemetry.** The only network connection the app makes is to GitHub, to
|
||||
check for updates.
|
||||
- **Offline-first. No telemetry.** The only network connection the app makes is the update
|
||||
check, to `releases.poli0981.dev`.
|
||||
- Installed and auto-updated with [Velopack](https://velopack.io/) (per-user, no UAC for updates).
|
||||
|
||||
> Built by a solo developer with AI assistance — see the [Disclaimer](DISCLAIMER.md) and the
|
||||
@@ -19,6 +34,18 @@ clear danger level, a confirmation for anything risky, and an optional System Re
|
||||
|
||||
---
|
||||
|
||||
## Project status
|
||||
|
||||
**Stable, maintenance only** since version 2.2.0 (November 2026). CommandForge does what it set
|
||||
out to do, so the work now goes into keeping it secure, correct and accessible: dependency and
|
||||
security updates (a High or Critical vulnerability gets an urgent patch release), major platform
|
||||
updates such as a newer .NET, catalog commands added, fixed or removed, bug, UI/UX and
|
||||
accessibility fixes, and translation fixes. A new feature is added only when it is genuinely
|
||||
necessary. The whole policy is in
|
||||
[CONTRIBUTING.md](.github/CONTRIBUTING.md#maintenance-mode-what-we-accept).
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
- **298 vetted commands in 15 categories** — System & Maintenance, Updates & Packages, Tweaks &
|
||||
@@ -47,6 +74,9 @@ clear danger level, a confirmation for anything risky, and an optional System Re
|
||||
restart.
|
||||
- **Diagnostics** — Log Viewer, Debug panel, local logs with retention, and a crash dialog with a
|
||||
"Report a bug" flow that never sends anything by itself.
|
||||
- **Accessible** — everything works with the keyboard alone (`F6` moves between the navigation
|
||||
pane, the page and the console), Narrator hears what each command does and how it ended, and the
|
||||
app follows Windows contrast themes and Text size. See [ACCESSIBILITY.md](ACCESSIBILITY.md).
|
||||
|
||||
New here? Read the **[user guide](USAGE.md)**.
|
||||
|
||||
@@ -54,13 +84,18 @@ New here? Read the **[user guide](USAGE.md)**.
|
||||
|
||||
## Install
|
||||
|
||||
1. Download **`CommandForge-win-Setup.exe`** from the
|
||||
[latest release](https://github.com/poli0981/CommandForge/releases/latest).
|
||||
1. Download **[`CommandForge-win-Setup.exe`](https://releases.poli0981.dev/commandforge/CommandForge-win-Setup.exe)**
|
||||
(or the [portable zip](https://releases.poli0981.dev/commandforge/CommandForge-win-Portable.zip)).
|
||||
Every release, its notes and its checksums are on the [releases page](https://git.poli0981.dev/poli0981/CommandForge/releases).
|
||||
2. Run it. The app installs per-user (no admin rights needed) and updates itself from future
|
||||
releases.
|
||||
|
||||
Already on 1.x? The app offers 2.0 as a normal update; your settings, favorites, history, recipes
|
||||
and commands carry over.
|
||||
Already installed? The app offers each new release as a normal update; your settings, favorites,
|
||||
history, recipes and commands carry over.
|
||||
|
||||
> **Coming from 2.2.0 or older?** Those versions checked GitHub for updates, and the GitHub account
|
||||
> is gone, so they will never see a new version. Download the installer above once and run it over
|
||||
> your installation: your data stays, and from 2.3.0 on updates come from `releases.poli0981.dev`.
|
||||
|
||||
### "Unknown publisher" and verifying your download
|
||||
|
||||
@@ -68,23 +103,19 @@ CommandForge is **not Authenticode-signed yet** (see [SECURITY.md](.github/SECUR
|
||||
SmartScreen may warn about an unknown publisher, and some antivirus engines may flag it (common
|
||||
for system-administration tools). To proceed: **More info → Run anyway**.
|
||||
|
||||
Every release is built by GitHub Actions from a tagged commit. You can check your download first:
|
||||
Every release is built by the release workflow on Gitea Actions from a signed tag, and its log is
|
||||
public. You can check your download first:
|
||||
|
||||
- **Build provenance** — with the [GitHub CLI](https://cli.github.com/), confirm the file was built
|
||||
by this repository's release workflow:
|
||||
|
||||
```powershell
|
||||
gh attestation verify .\CommandForge-win-Setup.exe --repo poli0981/CommandForge
|
||||
```
|
||||
|
||||
- **SHA-256** — compare with `checksums.txt` on the release page (case doesn't matter):
|
||||
- **SHA-256** — compare with `SHA256SUMS` of that release
|
||||
(`https://releases.poli0981.dev/commandforge/<version>/SHA256SUMS`, linked from the release
|
||||
notes; case doesn't matter):
|
||||
|
||||
```powershell
|
||||
(Get-FileHash .\CommandForge-win-Setup.exe -Algorithm SHA256).Hash
|
||||
```
|
||||
|
||||
- The release notes link a **VirusTotal** scan, and each release ships an SPDX **SBOM**
|
||||
(`sbom.spdx.json`).
|
||||
- Each release ships a CycloneDX **SBOM** (`sbom.cdx.json`, next to `SHA256SUMS`), and the release
|
||||
notes link a **VirusTotal** scan when one was made.
|
||||
|
||||
---
|
||||
|
||||
@@ -108,6 +139,7 @@ See [BUILD.md](BUILD.md) for packaging and CI, and [UPDATES.md](UPDATES.md) for
|
||||
| Topic | File |
|
||||
|---|---|
|
||||
| User guide | [USAGE.md](USAGE.md) |
|
||||
| Accessibility | [ACCESSIBILITY.md](ACCESSIBILITY.md) |
|
||||
| Release history | [CHANGELOG.md](CHANGELOG.md) |
|
||||
| Build, test, publish, release | [BUILD.md](BUILD.md) · [RELEASING.md](RELEASING.md) |
|
||||
| Update mechanism (Velopack) | [UPDATES.md](UPDATES.md) |
|
||||
@@ -124,13 +156,16 @@ See [BUILD.md](BUILD.md) for packaging and CI, and [UPDATES.md](UPDATES.md) for
|
||||
|
||||
## Contact
|
||||
|
||||
Bugs and feature requests go to [GitHub Issues](https://github.com/poli0981/CommandForge/issues),
|
||||
and questions to [Discussions](https://github.com/poli0981/CommandForge/discussions). For
|
||||
everything else:
|
||||
Bugs, catalog commands, translations and accessibility problems go to the issues of the
|
||||
[GitLab mirror](https://gitlab.com/poli0981/CommandForge/-/issues) (pick the matching template;
|
||||
see [Project status](#project-status) for what is accepted). The repository on Gitea is read-only
|
||||
for everyone but the maintainer. Patches can also come by e-mail (`git format-patch`) to
|
||||
code@poli0981.dev. For everything else:
|
||||
|
||||
| Topic | Address |
|
||||
|---|---|
|
||||
| Security vulnerabilities (private) | security@poli0981.dev, or [private vulnerability reporting](https://github.com/poli0981/CommandForge/security/advisories/new) |
|
||||
| Security vulnerabilities (private, never a public issue) | security@poli0981.dev |
|
||||
| Accessibility barriers | accessibility@poli0981.dev, or the [Accessibility template](https://gitlab.com/poli0981/CommandForge/-/issues/new?issuable_template=Accessibility) on GitLab |
|
||||
| Privacy | privacy@poli0981.dev |
|
||||
| Terms, licensing and other legal questions | legal@poli0981.dev |
|
||||
| Copyright questions and permissions | copyright@poli0981.dev |
|
||||
|
||||
+53
-43
@@ -1,16 +1,22 @@
|
||||
# Releasing CommandForge
|
||||
|
||||
Releases are automated by [`release.yml`](.github/workflows/release.yml), triggered by pushing a
|
||||
SemVer tag.
|
||||
Releases are automated by [`release.yml`](.gitea/workflows/release.yml) on Gitea Actions,
|
||||
triggered by pushing a signed SemVer tag. The files go to Cloudflare R2
|
||||
(`https://releases.poli0981.dev/commandforge/`), the notes and links to a release on
|
||||
[Gitea](https://git.poli0981.dev/poli0981/CommandForge/releases). The forge itself stores no
|
||||
binaries.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Make sure `main` is green and contains everything for the release.
|
||||
2. Choose a SemVer version `X.Y.Z`. In a pull request, move the `[Unreleased]` notes in
|
||||
[CHANGELOG.md](CHANGELOG.md) under `## [X.Y.Z] — <date>`, add the compare link at the bottom,
|
||||
and set `<Version>` in `Directory.Build.props` (the dev-build default; the release build stamps
|
||||
the tag's version anyway). Merge it.
|
||||
3. Tag the merge commit on `main` with a **signed, annotated** tag and push it:
|
||||
and set `<Version>` in `Directory.Build.props` to `X.Y.Z` (the workflow refuses a tag that
|
||||
doesn't match it). Merge it.
|
||||
3. Optional dry run: **Actions → Release → Run workflow** on `main`. It builds, packs, writes the
|
||||
SBOM, checksums and notes, and reads the previous release from R2 (which checks the R2
|
||||
credentials), but uploads nothing; the files stay as the run's `r2-release` artifact.
|
||||
4. Tag the merge commit on `main` with a **signed, annotated** tag and push it:
|
||||
|
||||
```bash
|
||||
git switch main && git pull
|
||||
@@ -18,54 +24,58 @@ SemVer tag.
|
||||
git push origin vX.Y.Z
|
||||
```
|
||||
|
||||
The `release tags` ruleset protects `v*` tags: once pushed, a release tag can't be moved or
|
||||
deleted (only a repository admin can bypass this).
|
||||
4. The **Release** workflow runs on `windows-latest` and:
|
||||
- resolves the version from the tag (`vX.Y.Z` → `X.Y.Z`);
|
||||
- restores the pinned `vpk` tool and **downloads the previous release** so a delta package can
|
||||
be computed;
|
||||
5. The **Release** workflow runs on the Windows runner (host mode on the maintainer's PC) and:
|
||||
- checks that the tag matches `<Version>`;
|
||||
- restores the pinned tools (`vpk`, CycloneDX) and **downloads the previous release** from R2
|
||||
(`vpk download s3`) so a delta package can be computed;
|
||||
- publishes and packages with Velopack (`scripts/pack.ps1`);
|
||||
- creates **build-provenance attestations** for `Setup.exe`, the portable zip and this
|
||||
version's `.nupkg` files;
|
||||
- uploads everything as a **draft** GitHub Release, attaches the **SPDX SBOM**
|
||||
(`sbom.spdx.json`) and **`checksums.txt`** (SHA-256 of every published asset), sets the
|
||||
release notes to this version's section of `CHANGELOG.md`, then **publishes** it as the
|
||||
latest release — installed copies only see the update once every asset is in place;
|
||||
- if `VT_API_KEY` is set, submits `Setup.exe` and the full package to **VirusTotal** and appends
|
||||
the scan links to the release notes;
|
||||
- writes the **CycloneDX SBOM**, **`SHA256SUMS`** and the release notes (this version's section
|
||||
of `CHANGELOG.md` plus the download links) with `scripts/release-assets.ps1`;
|
||||
- if `VT_API_KEY` is set, submits `Setup.exe` and the full package to **VirusTotal** and adds
|
||||
the report links to the notes;
|
||||
- uploads to R2 with `vpk upload s3`: packages, installer and portable zip first, the feed
|
||||
(`releases.win.json`, `RELEASES`) last, keeping the ten newest releases; installed copies see
|
||||
the update from that moment;
|
||||
- checks that the feed, the installer, the portable zip and the full package answer `200`;
|
||||
- puts `SHA256SUMS` and `sbom.cdx.json` under `commandforge/X.Y.Z/` (the ops repo's
|
||||
`publish-r2.yml`; a file there is never overwritten);
|
||||
- creates the Gitea release `vX.Y.Z` with the notes and the links;
|
||||
- calls the shared announcer (`poli0981/.github`) to post the release to Discord.
|
||||
5. Check the release page: the assets are all there, and the attestation verifies:
|
||||
6. Check the [release page](https://git.poli0981.dev/poli0981/CommandForge/releases) and the
|
||||
files, for example:
|
||||
|
||||
```bash
|
||||
gh release download vX.Y.Z --pattern "*-Setup.exe"
|
||||
gh attestation verify CommandForge-win-Setup.exe --repo poli0981/CommandForge
|
||||
```powershell
|
||||
curl.exe -sI https://releases.poli0981.dev/commandforge/releases.win.json
|
||||
curl.exe -s https://releases.poli0981.dev/commandforge/X.Y.Z/SHA256SUMS
|
||||
```
|
||||
|
||||
The notes are the CHANGELOG section followed by the **VirusTotal** links; edit them on the
|
||||
release page if you want a shorter summary (keep the VirusTotal section). The SHA-256 sums are
|
||||
in `checksums.txt`.
|
||||
Edit the notes on the release page if you want a shorter summary (keep the download links,
|
||||
the checksums and the VirusTotal section).
|
||||
|
||||
You can also run the workflow manually (**Actions → Release → Run workflow**) with a `version`
|
||||
input; the upload step then creates the `vX.Y.Z` tag.
|
||||
A versioned file on R2 is never replaced. If a release fails after its packages were uploaded,
|
||||
fix the cause and release the next patch version rather than re-tagging.
|
||||
|
||||
## Repository secrets
|
||||
## Secrets and variables
|
||||
|
||||
| Secret | Used for | Required |
|
||||
|---|---|---|
|
||||
| `GITHUB_TOKEN` | Create the release, upload assets, read the SBOM | automatic |
|
||||
| `VT_API_KEY` | VirusTotal scan + links | optional (step skipped if unset) |
|
||||
| `DISCORD_RELEASES_WEBHOOK` (or `DISCORD_REPO_WEBHOOK`) | Release announcement to Discord | optional |
|
||||
| `DISCORD_PING_ROLE_ID` | Role ping on stable releases | optional |
|
||||
| `DISCORD_CI_WEBHOOK` | Build/SonarCloud failure alerts to Discord | optional |
|
||||
| `SONAR_TOKEN` | SonarCloud analysis and coverage (`sonarcloud.yml`) | for the SonarCloud workflow (runs without it are skipped) |
|
||||
| Name | Kind | Where | Used for |
|
||||
|---|---|---|---|
|
||||
| `R2_RELEASES_ACCESS_KEY_ID`, `R2_RELEASES_SECRET_ACCESS_KEY` | secret | user level (Gitea → Settings → Actions) | `vpk download/upload s3` and `publish-r2.yml`: an R2 API token with Object Read & Write on `poli0981-releases` only |
|
||||
| `R2_ACCOUNT_ID` | variable | user level | The R2 endpoint (`https://<id>.r2.cloudflarestorage.com`) |
|
||||
| `GITEA_TOKEN` (`github.token`) | automatic | | Create the Gitea release; read it for the announcement |
|
||||
| `VT_API_KEY` | secret | user or repository level | VirusTotal scan + links (optional; skipped if unset) |
|
||||
| `DISCORD_RELEASES_WEBHOOK` (or `DISCORD_REPO_WEBHOOK`) | secret | repository | Release announcement to Discord |
|
||||
| `DISCORD_PING_ROLE_ID` | secret | repository | Role ping on stable releases (optional) |
|
||||
| `DISCORD_RELEASE_PIPELINE_WEBHOOK` | secret | repository | Result of every Release run |
|
||||
| `DISCORD_CI_WEBHOOK` | secret | repository | Build / Qodana / Security failures on `main` |
|
||||
| `QODANA_TOKEN` | secret | repository | Qodana Cloud project token; selects the Ultimate licence (`qodana.yml`) |
|
||||
|
||||
> `poli0981` is a user account (not an org), so secrets are set **per repository**
|
||||
> (Settings → Secrets and variables → Actions).
|
||||
Release credentials are only ever used by `release.yml`, which runs on a tag or a manual
|
||||
dispatch, never on a pull request or a schedule.
|
||||
|
||||
## Code signing
|
||||
|
||||
Not done yet: releases ship without an Authenticode signature, so users may see a SmartScreen
|
||||
"unknown publisher" warning. Mitigations: build-provenance attestations, SHA-256 checksums, an
|
||||
SBOM, VirusTotal, no obfuscation, and public source. When Azure Trusted Signing (or SignPath
|
||||
Foundation) is configured, add a signing step between `dotnet publish` and `vpk pack` in
|
||||
`scripts/pack.ps1`, and update [SECURITY.md](.github/SECURITY.md).
|
||||
"unknown publisher" warning. Mitigations: SHA-256 checksums, an SBOM, VirusTotal, public build
|
||||
logs, no obfuscation, and public source. When Azure Trusted Signing (or SignPath Foundation) is
|
||||
configured, add a signing step between `dotnet publish` and `vpk pack` in `scripts/pack.ps1`, and
|
||||
update [SECURITY.md](.github/SECURITY.md).
|
||||
@@ -11,7 +11,7 @@ versions.
|
||||
|---|---|---|---|
|
||||
| WPF-UI (+ WPF-UI.Abstractions) | 4.3.0 | MIT | https://github.com/lepoco/wpfui |
|
||||
| CommunityToolkit.Mvvm | 8.4.2 | MIT | https://github.com/CommunityToolkit/dotnet |
|
||||
| Microsoft.Extensions.DependencyInjection (+ .Abstractions) | 10.0.14 | MIT | https://github.com/dotnet/runtime |
|
||||
| Microsoft.Extensions.DependencyInjection (+ .Abstractions) | 10.0.15 | MIT | https://github.com/dotnet/runtime |
|
||||
| Serilog | 4.4.0 | Apache-2.0 | https://github.com/serilog/serilog |
|
||||
| Serilog.Sinks.File | 7.0.0 | Apache-2.0 | https://github.com/serilog/serilog-sinks-file |
|
||||
| Serilog.Sinks.Async | 2.1.0 | Apache-2.0 | https://github.com/serilog/serilog-sinks-async |
|
||||
@@ -25,14 +25,14 @@ and the Fluent System Icons (below); see the `ThirdPartyNotices.txt` in the WPF-
|
||||
|
||||
| Component | Version | License | Project |
|
||||
|---|---|---|---|
|
||||
| Microsoft.Windows.CsWin32 | 0.3.367 | MIT | https://github.com/microsoft/CsWin32 |
|
||||
| SonarAnalyzer.CSharp | 10.35.0.4138 | SONAR Source-Available License v1.0 | https://github.com/SonarSource/sonar-dotnet |
|
||||
| dotnet-sonarscanner (SonarScanner for .NET, CI only) | 12.0.0 | LGPL-3.0 | https://github.com/SonarSource/sonar-scanner-msbuild |
|
||||
| Microsoft.Windows.CsWin32 | 0.3.371 | MIT | https://github.com/microsoft/CsWin32 |
|
||||
| SonarAnalyzer.CSharp | 10.37.0.15768 | SONAR Source-Available License v1.0 | https://github.com/SonarSource/sonar-dotnet |
|
||||
| CycloneDX module for .NET (release SBOM only) | 6.3.2 | Apache-2.0 | https://github.com/CycloneDX/cyclonedx-dotnet |
|
||||
| vpk (Velopack CLI) | 1.2.161 | MIT | https://github.com/velopack/velopack |
|
||||
| xunit.v3 (`xunit.v3.mtp-off`) | 4.0.2 | Apache-2.0 | https://github.com/xunit/xunit |
|
||||
| xunit.v3 (`xunit.v3.mtp-off`) | 4.0.3 | Apache-2.0 | https://github.com/xunit/xunit |
|
||||
| xunit.runner.visualstudio | 4.0.1 | Apache-2.0 | https://github.com/xunit/visualstudio.xunit |
|
||||
| Microsoft.NET.Test.Sdk | 18.11.0 | MIT | https://github.com/microsoft/vstest |
|
||||
| coverlet.collector | 10.1.0 | MIT | https://github.com/coverlet-coverage/coverlet |
|
||||
| Microsoft.NET.Test.Sdk | 18.12.0 | MIT | https://github.com/microsoft/vstest |
|
||||
| coverlet.collector | 10.1.1 | MIT | https://github.com/coverlet-coverage/coverlet |
|
||||
|
||||
## Runtime & platform
|
||||
|
||||
|
||||
+42
-29
@@ -5,15 +5,21 @@ CommandForge installs and updates itself with [Velopack](https://velopack.io/).
|
||||
|
||||
## For users
|
||||
|
||||
1. Download `CommandForge-win-Setup.exe` from the
|
||||
[latest release](https://github.com/poli0981/CommandForge/releases/latest) and run it. It
|
||||
installs per-user under `%LocalAppData%\CommandForge`.
|
||||
2. After that, the app checks GitHub Releases for newer versions — on startup if **Settings →
|
||||
Updates → Check for updates on startup** is on (the default), or when you choose **More (⋯) →
|
||||
Check for updates** or press `F5`.
|
||||
1. Download [`CommandForge-win-Setup.exe`](https://releases.poli0981.dev/commandforge/CommandForge-win-Setup.exe)
|
||||
and run it. It installs per-user under `%LocalAppData%\CommandForge`. The
|
||||
[releases page](https://git.poli0981.dev/poli0981/CommandForge/releases) lists every version
|
||||
with its notes and checksums.
|
||||
2. After that, the app checks `https://releases.poli0981.dev/commandforge` for newer versions — on
|
||||
startup if **Settings → Updates → Check for updates on startup** is on (the default), or when
|
||||
you choose **More (⋯) → Check for updates** or press `F5`.
|
||||
3. When a newer version exists, choose **Download & restart**. The app downloads the update (a
|
||||
small **delta** when possible), then restarts into the new version.
|
||||
|
||||
> **Versions 2.2.0 and older** checked GitHub Releases. The GitHub account behind the project was
|
||||
> suspended in November 2026, so those versions find nothing (the check ends with "No release feed
|
||||
> was found") and can't update themselves. Install 2.3.0 or later once by hand, over the old
|
||||
> version: settings, favorites, history, recipes and your commands stay where they are.
|
||||
|
||||
Good to know:
|
||||
|
||||
- Closing the update dialog — including with its **X** button — cancels the download.
|
||||
@@ -22,45 +28,52 @@ Good to know:
|
||||
restart** again when the command is done.
|
||||
- Before applying an update, the app ends the admin session, because the elevated helper runs
|
||||
from the folder that Velopack replaces.
|
||||
- Errors are shown in plain words: offline or timed out, no release feed found (404), rate limited
|
||||
(403/429), and GitHub server error (5xx).
|
||||
- Errors are shown in plain words: offline or timed out, no release feed found (404), the update
|
||||
server refused or rate-limited the request (403/429), and a server error (5xx).
|
||||
|
||||
The only network connection involved is to GitHub (see [PRIVACY.md](PRIVACY.md)).
|
||||
The only network connection involved is to `releases.poli0981.dev` (see [PRIVACY.md](PRIVACY.md)).
|
||||
|
||||
## How it works under the hood
|
||||
|
||||
- `Program.Main` calls `VelopackApp.Build().Run()` before WPF starts, to handle the
|
||||
install/update/uninstall hooks.
|
||||
- The app checks for updates via
|
||||
`UpdateManager(new GithubSource("https://github.com/poli0981/CommandForge", null, prerelease: false))`.
|
||||
- The app checks for updates via `new UpdateManager("https://releases.poli0981.dev/commandforge")`
|
||||
(`ProductLinks.UpdateFeed`): Velopack's HTTP source reads `releases.win.json` there and downloads
|
||||
the packages it lists from the same folder. No token, no API.
|
||||
- The folder is a Cloudflare R2 bucket served through Cloudflare. The feed files
|
||||
(`releases.win.json`, `RELEASES`) and the stable-named installer and portable zip bypass the
|
||||
edge cache; every other file name carries its version and is never overwritten.
|
||||
- Download and apply are separate steps, so the app can end the admin session and check for a
|
||||
running command just before it restarts.
|
||||
- Auto-update works for the installed app and for the portable zip from the releases page (both
|
||||
carry Velopack's `Update.exe`). A build you run from source can't update; the app detects this
|
||||
and says so instead of offering an update.
|
||||
- Auto-update works for the installed app and for the portable zip (both carry Velopack's
|
||||
`Update.exe`). A build you run from source can't update; the app detects this and says so
|
||||
instead of offering an update.
|
||||
|
||||
## Release artifacts and the delta mechanism
|
||||
## Release files and the delta mechanism
|
||||
|
||||
Each release (see [RELEASING.md](RELEASING.md)) uploads the contents of `Releases/`:
|
||||
Each release (see [RELEASING.md](RELEASING.md)) puts these files under
|
||||
`https://releases.poli0981.dev/commandforge/`:
|
||||
|
||||
| Asset | Purpose |
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `CommandForge-win-Setup.exe` | First-time installer |
|
||||
| `CommandForge-win-Setup.exe` | First-time installer (always the newest release) |
|
||||
| `CommandForge-win-Portable.zip` | The app without an installer; extract it anywhere and it updates itself in place (settings and logs still go to `%AppData%\CommandForge`) |
|
||||
| `CommandForge-<version>-full.nupkg` | Full package (fallback / first install of a version) |
|
||||
| `CommandForge-<version>-delta.nupkg` | Delta from the previous version (small download) |
|
||||
| `releases.win.json` / `RELEASES` | Update manifest the client reads |
|
||||
| `checksums.txt` | SHA-256 of the assets (manual verification) |
|
||||
| `sbom.spdx.json` | SPDX software bill of materials |
|
||||
| `releases.win.json` / `RELEASES` | Update manifest the client reads (uploaded last) |
|
||||
| `<version>/SHA256SUMS` | SHA-256 of what that version ships: installer, portable zip, packages, SBOM |
|
||||
| `<version>/sbom.cdx.json` | CycloneDX software bill of materials |
|
||||
|
||||
The installer, the portable zip and the packages also have build-provenance attestations (see the
|
||||
[README](README.md#unknown-publisher-and-verifying-your-download)).
|
||||
There is no directory listing: the release notes on the
|
||||
[releases page](https://git.poli0981.dev/poli0981/CommandForge/releases) link each file. The
|
||||
feed keeps the ten newest releases.
|
||||
|
||||
Velopack needs the **previous** `-full.nupkg` present while packing to compute a delta. The
|
||||
release workflow runs `vpk download github` before `vpk pack`, so every release after the first
|
||||
produces **both** a `-full.nupkg` and a `-delta.nupkg`. Clients on the previous version (for
|
||||
example 1.5.1 when 2.0.0 ships) download only the delta; the full package remains the fallback. The very first release had no previous version, so it shipped only a full package.
|
||||
release workflow runs `vpk download s3` before `vpk pack`, so every release after the first one
|
||||
on R2 produces **both** a `-full.nupkg` and a `-delta.nupkg`; clients on the previous version
|
||||
download only the delta, and the full package remains the fallback. 2.3.0, the first release on
|
||||
R2, had no previous version there, so it shipped only a full package.
|
||||
|
||||
> If you ever build a release **locally**, run `dotnet vpk download github --repoUrl <repo>`
|
||||
> first so the prior full package is available for the delta — otherwise only a full package is
|
||||
> produced.
|
||||
> If you ever build a release **locally**, run
|
||||
> `dotnet vpk download http --url https://releases.poli0981.dev/commandforge` first so the prior
|
||||
> full package is available for the delta — otherwise only a full package is produced.
|
||||
@@ -1,7 +1,7 @@
|
||||
# CommandForge user guide
|
||||
|
||||
CommandForge runs Windows maintenance commands for you: pick a command, read what it will do, and
|
||||
run it. This guide covers version 2.0. For installing and verifying downloads, see the
|
||||
run it. This guide covers version 2.2. For installing and verifying downloads, see the
|
||||
[README](README.md#install).
|
||||
|
||||
- [First start](#first-start)
|
||||
@@ -15,6 +15,7 @@ run it. This guide covers version 2.0. For installing and verifying downloads, s
|
||||
- [Settings](#settings)
|
||||
- [Log viewer and Debug panel](#log-viewer-and-debug-panel)
|
||||
- [Keyboard shortcuts](#keyboard-shortcuts)
|
||||
- [Accessibility](#accessibility)
|
||||
- [Updates](#updates)
|
||||
- [Your data and uninstalling](#your-data-and-uninstalling)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
@@ -26,7 +27,7 @@ The first time you open CommandForge, it asks you to accept its terms:
|
||||
1. Pick your language in the list above the terms. English, Tiếng Việt, 日本語, 简体中文 and
|
||||
Español are available, and you can change it later in Settings.
|
||||
2. Read the summaries on the **EULA**, **GPLv3**, **Disclaimer** and **Privacy** tabs. **Read the
|
||||
full text on GitHub** opens the complete documents.
|
||||
full text online** opens the complete documents.
|
||||
3. Tick **I have read and agree to all of the terms**, then choose **Continue**.
|
||||
|
||||
You'll be asked again only if the terms change.
|
||||
@@ -181,13 +182,13 @@ Under **My commands** you can save your own command lines, such as a `ping` you
|
||||
|
||||
| Section | Options |
|
||||
|---|---|
|
||||
| **Appearance** | Theme (System, Light, Dark), Language, Font size (Small, Medium, Large). |
|
||||
| **Appearance** | Theme (System, Light, Dark), Language, Font size (Small, Medium, Large; Windows' own Text size enlarges it further). |
|
||||
| **Behavior & Safety** | Collapse the navigation pane by default; show Admin/Restart badges in lists; confirm before Caution commands; confirm before Dangerous commands (always on); tick "create a restore point" by default for risky admin commands; auto-scroll the console; warn before closing while a command is running. |
|
||||
| **Updates** | Check for updates on startup, the current version, the last check and **Check now**. |
|
||||
| **Backup & profiles** | **Export…** / **Import…** your appearance, behavior and favorites as a `.json` file, and save named profiles (for example "Gaming PC" or "Office") that you can **Apply** or **Delete**. |
|
||||
| **Logs** | Log level, log size, **Open log folder**, **Export logs (.zip)**, **Delete old logs**. |
|
||||
| **Advanced** | Run mode (whether this copy updates itself), the config folder, the Debug panel, and **Reset to defaults** (keeps your accepted terms and logs). |
|
||||
| **About** | Version, license and GitHub links. |
|
||||
| **About** | Version, license and source code links. |
|
||||
|
||||
Theme, language and font size change immediately; no restart needed.
|
||||
|
||||
@@ -211,22 +212,41 @@ Theme, language and font size change immediately; no restart needed.
|
||||
| `Ctrl+F` | Search the current list |
|
||||
| `Ctrl+H` | Home |
|
||||
| `Ctrl+B` | Show or hide the navigation pane |
|
||||
| `F6` / `Shift+F6` | Move between the navigation pane, the page and the console |
|
||||
| `Ctrl+,` | Settings |
|
||||
| `Ctrl+L` | Log viewer |
|
||||
| `F5` | Check for updates |
|
||||
| `Ctrl+Q` | Exit |
|
||||
| `↑` / `↓` | Move the selection (lists and palette) |
|
||||
| `Enter` | Open the selected command |
|
||||
| `↑` / `↓` | Move the selection (lists and palette); `Tab` then reaches the buttons of the selected row |
|
||||
| `Enter` | Open the selected command: in the catalog, go to its **Run** button; in History, open it in the catalog; in the palette, open it |
|
||||
| `Esc` | Close a dialog or cancel |
|
||||
|
||||
Shortcuts are paused while a dialog is open, and `AltGr` combinations never trigger them, so
|
||||
typing characters like `@` on international keyboards is safe. The list is also under **More →
|
||||
Keyboard shortcuts**.
|
||||
typing characters like `@` on international keyboards is safe. `Ctrl+Q` does nothing while you are
|
||||
typing in a text box (other than a search box), so a slip can't close the app mid-edit. The list is
|
||||
also under **More → Keyboard shortcuts**.
|
||||
|
||||
## Accessibility
|
||||
|
||||
- **Keyboard:** everything works without a mouse. After `Ctrl+H`, `Ctrl+,`, `Ctrl+L` or choosing a
|
||||
page in the navigation pane, the keyboard moves into that page; `F6` jumps between the pane, the
|
||||
page and the console. The console and the Log viewer can be read line by line with the arrow
|
||||
keys.
|
||||
- **Screen readers:** Narrator (and other screen readers) hear when a command starts, needs
|
||||
administrator permission, finishes (with its result and whether Windows must restart), how many
|
||||
commands a search found, and each notification.
|
||||
- **Seeing the screen:** the app follows Windows' contrast themes, its light/dark setting and its
|
||||
**Text size** setting (Settings › Accessibility › Text size), on top of the app's own font size.
|
||||
Risk levels are always shown with words or icons, never by color alone.
|
||||
|
||||
What works, what doesn't yet, and how to report a barrier:
|
||||
[ACCESSIBILITY.md](ACCESSIBILITY.md).
|
||||
|
||||
## Updates
|
||||
|
||||
The app checks GitHub for new versions on startup (unless you turned that off) and when you press
|
||||
`F5`.
|
||||
The app checks `releases.poli0981.dev` for new versions on startup (unless you turned that off)
|
||||
and when you press `F5`. Version 2.2.0 and older checked GitHub, which is gone: install the new
|
||||
version once by hand (see [UPDATES.md](UPDATES.md)).
|
||||
|
||||
- When an update is available, choose **Download & restart**.
|
||||
- Closing the dialog cancels the download.
|
||||
@@ -260,5 +280,5 @@ afterwards.
|
||||
new prompt. If admin commands keep failing, use **End admin session** and try again.
|
||||
- **Output looks garbled**: please report it with the command and your Windows display language.
|
||||
- **Something went wrong**: the error dialog has an **Error code** and **Copy details**.
|
||||
**Report a bug** (also in the More menu) opens a pre-filled GitHub issue. Nothing is sent until
|
||||
you submit it. Export the logs to attach them, but review them first.
|
||||
**Report a bug** (also in the More menu) opens a pre-filled issue on the project's GitLab
|
||||
mirror. Nothing is sent until you submit it. Export the logs to attach them, but review them first.
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "10.0.403",
|
||||
"version": "10.0.404",
|
||||
"rollForward": "latestFeature"
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
# Qodana's settings for .gitea/workflows/qodana.yml (the ops repo's reusable-qodana.yml, Qodana CLI).
|
||||
#
|
||||
# The linter is Qodana for .NET (`qodana-dotnet`: Rider's engine) in NATIVE mode, on the job's own
|
||||
# Windows runner with the .NET SDK that global.json names: the WPF projects (net10.0-windows) load
|
||||
# only on Windows. It needs the Ultimate licence of the Qodana Cloud project; the token is the
|
||||
# QODANA_TOKEN repository secret.
|
||||
#
|
||||
# Everything a run needs is here and nothing is a workflow argument, so `qodana scan` in the
|
||||
# repository root of a developer's PC (with QODANA_TOKEN set) reads the same settings. The linter's
|
||||
# version is the CLI's: the ops workflow pins the CLI (SHA-256 verified), the CLI its linter.
|
||||
version: "1.0"
|
||||
linter: qodana-dotnet
|
||||
withinDocker: false
|
||||
|
||||
# WHERE AN INSPECTION IS SWITCHED OFF: one of ReSharper's (C#, XAML, .resx) in .editorconfig
|
||||
# (`resharper_*_highlighting`), where Rider and ReSharper read it too. Here only what has no key
|
||||
# there: a whole severity, and the IntelliJ platform's own inspections (Markdown, XML). Each one with
|
||||
# its reason above it.
|
||||
profile:
|
||||
base:
|
||||
name: qodana.recommended
|
||||
groups:
|
||||
# A HINT is what the editor offers without underlining anything (ReSharper's lowest level; this
|
||||
# linter files it as TYPO, Qodana as Low): "invert if", "convert to LINQ", a trailing comma, and
|
||||
# every Roslyn analyzer message below the level this build makes an error. They are suggestions,
|
||||
# not problems, and the build already fails on every warning.
|
||||
- groupId: Hints
|
||||
groups:
|
||||
- "severity:TYPO"
|
||||
inspections:
|
||||
- group: Hints
|
||||
enabled: false
|
||||
# Windows application manifests: the linter has no schema for urn:schemas-microsoft-com:asm.v1
|
||||
# and reports every element of the file as undeclared.
|
||||
- inspection: XmlHighlighting
|
||||
ignore:
|
||||
- "src/CommandForge.Wpf/app.manifest"
|
||||
- "helper/CommandForge.Elevator/app.manifest"
|
||||
|
||||
dotnet:
|
||||
solution: CommandForge.slnx
|
||||
configuration: Release
|
||||
|
||||
# What is not CommandForge's code, or not in the repository: build, package and test output, local
|
||||
# tool caches, and the git-ignored local folders a developer's PC has (internal notes, IDE state).
|
||||
exclude:
|
||||
- name: All
|
||||
paths:
|
||||
- Releases
|
||||
- publish
|
||||
- TestResults
|
||||
- .nuget
|
||||
- docs
|
||||
- .claude
|
||||
- .idea
|
||||
- .vs
|
||||
# JETBRAINS' SECURITY RULES (the OpenGrep plugin) stay on, and the files their results were READ in
|
||||
# are listed here - so a new file that starts a process is reported. "A process started with
|
||||
# something that is not a literal" fired 11 times on the first run (2026-11-16): starting processes
|
||||
# is what CommandForge is for. What each file starts, and where its path and arguments come from,
|
||||
# is in tests/CommandForge.Tests/ProcessStartSitesTests.cs, which also fails on a new file. The
|
||||
# name is the plugin's one inspection, not a rule's: a rule's own id is honoured nowhere, so a
|
||||
# listed file is left out of all of the plugin's rules - the price.
|
||||
- name: OpenGrepInspection
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Execution/SystemProcessRunner.cs
|
||||
- src/CommandForge.Infrastructure/Elevation/BrokerElevationService.cs
|
||||
- src/CommandForge.Wpf/Services/ShellService.cs
|
||||
# The tests start what they test (a read-only PowerShell, the echo of the executor test).
|
||||
- tests
|
||||
# THE LINTER'S OWN FAULT, not the file's: resolving PInvoke.CreateJobObject(null, null) - CsWin32's
|
||||
# null-to-PCWSTR conversion - the engine loses the constructor and reports its locals, its field,
|
||||
# the class and the file's usings as unused. The compiler builds the file with warnings as errors
|
||||
# (IDE0005 fails a redundant using). The same engine fault is known from PInvoke.EnumDisplaySettings
|
||||
# (null, ...). To be removed when a linter build reads the file.
|
||||
- name: RedundantUsingDirective
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Execution/ProcessJob.cs
|
||||
- name: UnusedVariable.Compiler
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Execution/ProcessJob.cs
|
||||
- name: NotAccessedField.Compiler
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Execution/ProcessJob.cs
|
||||
- name: UnusedField.Compiler
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Execution/ProcessJob.cs
|
||||
- name: ClassCannotBeInstantiated
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Execution/ProcessJob.cs
|
||||
# The cancellation callback's token source: the registration that captures it is declared after
|
||||
# it, so it is disposed first, and disposing a registration waits for a callback that is running -
|
||||
# the source is never used after its disposal.
|
||||
- name: AccessToDisposedClosure
|
||||
paths:
|
||||
- src/CommandForge.Infrastructure/Elevation/BrokerElevationService.cs
|
||||
|
||||
# The gate: no problem at all. What the linter reports is settled where it is found — fixed, or its
|
||||
# inspection switched off with the reason beside it — so a count above zero is something new.
|
||||
failureConditions:
|
||||
severityThresholds:
|
||||
any: 0
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["local>poli0981/renovate-config"],
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Maintenance mode: a major lands only in a planned release with its migration. It waits on the Dependency Dashboard until it is ticked there; minor and patch updates come in the preset's grouped pull request.",
|
||||
"matchUpdateTypes": ["major"],
|
||||
"dependencyDashboardApproval": true
|
||||
},
|
||||
{
|
||||
"description": "The app stays on the .NET 10 LTS line: Microsoft.Extensions.* majors follow .NET majors, and moving to a new .NET major (the SDK in global.json included) is a migration done by hand, never a bot bump.",
|
||||
"matchPackageNames": ["Microsoft.Extensions.**", "dotnet-sdk"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "The Velopack library (CommandForge.Infrastructure, CommandForge.Wpf) and the vpk CLI (.config/dotnet-tools.json) must be the same version: one pull request of their own.",
|
||||
"matchPackageNames": ["Velopack", "vpk"],
|
||||
"groupName": "Velopack",
|
||||
"groupSlug": "velopack"
|
||||
}
|
||||
]
|
||||
}
|
||||
+3
-1
@@ -1,12 +1,14 @@
|
||||
#requires -Version 7
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Publishes CommandForge self-contained and packages it with Velopack (vpk) for GitHub Releases.
|
||||
Publishes CommandForge self-contained and packages it with Velopack (vpk).
|
||||
|
||||
.DESCRIPTION
|
||||
Produces, under Releases/:
|
||||
CommandForge-win-Setup.exe, CommandForge-win-Portable.zip, RELEASES, releases.win.json,
|
||||
*-full.nupkg, *-delta.nupkg
|
||||
scripts/release-assets.ps1 adds the SBOM, SHA256SUMS and the release notes; release.yml uploads
|
||||
the lot to Cloudflare R2 (https://releases.poli0981.dev/commandforge, `vpk upload s3`).
|
||||
Update is per-user (no UAC). The Elevator is published into the same folder by the
|
||||
PublishElevatorOnPublish MSBuild target, so vpk packages it automatically.
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
#requires -Version 7
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Writes the release's SBOM, SHA256SUMS and release notes next to the Velopack output.
|
||||
|
||||
.DESCRIPTION
|
||||
Run after scripts/pack.ps1 (release.yml does; it also runs locally, as a dry run). Produces:
|
||||
|
||||
<OutputDir>/versioned/<Version>/sbom.cdx.json CycloneDX SBOM of the solution (test projects
|
||||
left out; build-only packages listed with
|
||||
scope "excluded")
|
||||
<OutputDir>/versioned/<Version>/SHA256SUMS sha256sum format, one line per file below
|
||||
<OutputDir>/release-notes.md CHANGELOG.md section + download links
|
||||
|
||||
release.yml uploads `versioned/` to https://releases.poli0981.dev/commandforge/<Version>/ with the
|
||||
ops repo's publish-r2.yml, and uses release-notes.md as the Gitea release's body.
|
||||
|
||||
SHA256SUMS covers what this version ships: the installer and the portable zip (stable names
|
||||
at the folder root, replaced by the next release), this version's full and delta packages, and
|
||||
the SBOM. Not the feed files (releases.win.json, assets.win.json, RELEASES): `vpk upload`
|
||||
rewrites them on every release, so a checksum of them is stale at the next one.
|
||||
|
||||
.PARAMETER Version
|
||||
SemVer version without the leading 'v', e.g. 2.3.0.
|
||||
|
||||
.PARAMETER VirusTotalAnalysis
|
||||
Optional: the `analysis` output of crazy-max/ghaction-virustotal ("path=url,path=url"). Each
|
||||
file gets a link to its permanent VirusTotal report in the notes.
|
||||
|
||||
.EXAMPLE
|
||||
./scripts/pack.ps1 -Version 2.3.0; ./scripts/release-assets.ps1 -Version 2.3.0
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $Version,
|
||||
|
||||
[string] $ReleasesDir = 'Releases',
|
||||
|
||||
[string] $OutputDir = 'r2-release',
|
||||
|
||||
[string] $BaseUrl = 'https://releases.poli0981.dev/commandforge',
|
||||
|
||||
[string] $VirusTotalAnalysis = ''
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ($Version -notmatch '^\d+\.\d+\.\d+$') { throw "Version '$Version' is not X.Y.Z" }
|
||||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
Push-Location $repoRoot
|
||||
try {
|
||||
$releases = (Resolve-Path -LiteralPath $ReleasesDir).Path
|
||||
$versioned = Join-Path $OutputDir "versioned/$Version"
|
||||
New-Item -ItemType Directory -Force -Path $versioned | Out-Null
|
||||
|
||||
# --- What this version ships -------------------------------------------------------------
|
||||
$required = @('CommandForge-win-Setup.exe', 'CommandForge-win-Portable.zip', "CommandForge-$Version-full.nupkg")
|
||||
foreach ($name in $required) {
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $releases $name) -PathType Leaf)) {
|
||||
throw "$ReleasesDir is missing $name (run scripts/pack.ps1 -Version $Version first)"
|
||||
}
|
||||
}
|
||||
# The delta exists only when the previous release was downloaded before packing.
|
||||
$delta = "CommandForge-$Version-delta.nupkg"
|
||||
$shipped = @($required) + @(if (Test-Path -LiteralPath (Join-Path $releases $delta)) { $delta })
|
||||
|
||||
# --- SBOM (CycloneDX) ----------------------------------------------------------------------
|
||||
Write-Host "Writing the CycloneDX SBOM..." -ForegroundColor Cyan
|
||||
dotnet tool run dotnet-CycloneDX CommandForge.slnx `
|
||||
--exclude-test-projects `
|
||||
--configuration Release `
|
||||
--output $versioned `
|
||||
--filename sbom.cdx.json `
|
||||
--output-format Json `
|
||||
--set-name CommandForge `
|
||||
--set-version $Version
|
||||
if ($LASTEXITCODE -ne 0) { throw "CycloneDX failed with exit code $LASTEXITCODE" }
|
||||
$sbom = Join-Path $versioned 'sbom.cdx.json'
|
||||
|
||||
# --- SHA256SUMS ----------------------------------------------------------------------------
|
||||
$files = @($shipped | ForEach-Object { Get-Item -LiteralPath (Join-Path $releases $_) }) + (Get-Item -LiteralPath $sbom)
|
||||
$lines = $files |
|
||||
Sort-Object Name |
|
||||
ForEach-Object { '{0} {1}' -f (Get-FileHash -Algorithm SHA256 -LiteralPath $_.FullName).Hash.ToLowerInvariant(), $_.Name }
|
||||
# LF line endings, as sha256sum writes and `sha256sum -c` expects.
|
||||
[IO.File]::WriteAllText((Join-Path $versioned 'SHA256SUMS'), (($lines -join "`n") + "`n"), [Text.Encoding]::ASCII)
|
||||
$lines | ForEach-Object { Write-Host $_ }
|
||||
|
||||
# --- Release notes -------------------------------------------------------------------------
|
||||
$changelog = (Get-Content CHANGELOG.md -Raw) -replace "`r`n", "`n"
|
||||
$pattern = "(?ms)^## \[$([regex]::Escape($Version))\][^\n]*\n(.*?)(?=^## \[|^\[[^\]]+\]: |\z)"
|
||||
$section = [regex]::Match($changelog, $pattern, 'None', [TimeSpan]::FromSeconds(5))
|
||||
if (-not ($section.Success -and $section.Groups[1].Value.Trim())) {
|
||||
throw "CHANGELOG.md has no section for $Version"
|
||||
}
|
||||
|
||||
$vbase = "$BaseUrl/$Version"
|
||||
$notes = [Collections.Generic.List[string]]::new()
|
||||
$notes.Add($section.Groups[1].Value.Trim())
|
||||
$notes.AddRange([string[]]@(
|
||||
'', '## Download (Windows 10/11, x64)', '',
|
||||
"- Installer: [CommandForge-win-Setup.exe]($BaseUrl/CommandForge-win-Setup.exe)",
|
||||
"- Portable: [CommandForge-win-Portable.zip]($BaseUrl/CommandForge-win-Portable.zip)",
|
||||
"- [SHA256SUMS]($vbase/SHA256SUMS) · [SBOM (CycloneDX)]($vbase/sbom.cdx.json)",
|
||||
'',
|
||||
'The installer and the portable zip always hold the newest release; the checksums below are this one''s.',
|
||||
'Installed copies update from the app (More (⋯) → Check for updates). Versions 2.2.0 and older',
|
||||
'checked GitHub, which is gone: install this version once by hand, over the old one.',
|
||||
'', '```', ($lines -join "`n"), '```'))
|
||||
|
||||
if ($VirusTotalAnalysis) {
|
||||
$notes.AddRange([string[]]@('', '### VirusTotal', ''))
|
||||
foreach ($pair in $VirusTotalAnalysis -split ',') {
|
||||
$file = ($pair -split '=', 2)[0]
|
||||
if (-not $file) { continue }
|
||||
$hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $file).Hash.ToLowerInvariant()
|
||||
$notes.Add(('- [{0}](https://www.virustotal.com/gui/file/{1})' -f (Split-Path $file -Leaf), $hash))
|
||||
}
|
||||
}
|
||||
|
||||
$notesPath = Join-Path $OutputDir 'release-notes.md'
|
||||
[IO.File]::WriteAllText($notesPath, (($notes -join "`n") + "`n"), [Text.UTF8Encoding]::new($false))
|
||||
Write-Host "Release notes: $notesPath" -ForegroundColor Green
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public interface ISettingsService
|
||||
/// <summary>The terms version the user last accepted, or <see langword="null"/> if none.</summary>
|
||||
public string? AcceptedTermsVersion { get; set; }
|
||||
|
||||
/// <summary>Whether to check GitHub Releases for updates on startup (default <see langword="true"/>). Local-only.</summary>
|
||||
/// <summary>Whether to check the update feed for updates on startup (default <see langword="true"/>). Local-only.</summary>
|
||||
public bool AutoCheckForUpdates { get; set; }
|
||||
|
||||
/// <summary>The UI color theme (default <see cref="AppTheme.System"/>).</summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace CommandForge.Application.Ports;
|
||||
|
||||
/// <summary>
|
||||
/// Checks GitHub Releases for application updates (via Velopack) and applies them.
|
||||
/// Checks the release feed (<see cref="ProductLinks.UpdateFeed"/>) for application updates (via Velopack) and applies them.
|
||||
/// Per-user install ⇒ no UAC; applying ends any elevated session first.
|
||||
/// </summary>
|
||||
public interface IUpdateService
|
||||
@@ -9,7 +9,7 @@ public interface IUpdateService
|
||||
/// <summary>Whether the running app was installed via Velopack (false in dev/unpackaged).</summary>
|
||||
public bool IsUpdateSupported { get; }
|
||||
|
||||
/// <summary>Checks GitHub Releases for a newer version, mapping HTTP failures to <see cref="UpdateError"/>.</summary>
|
||||
/// <summary>Checks the release feed for a newer version, mapping HTTP failures to <see cref="UpdateError"/>.</summary>
|
||||
public Task<UpdateCheckResult> CheckForUpdatesAsync(CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,23 +2,24 @@ namespace CommandForge.Application.Ports;
|
||||
|
||||
/// <summary>
|
||||
/// Mapped failure categories for an update check or download (see <c>architectures.md</c> §5).
|
||||
/// GitHub uses 403 (primary rate limit) and 429 (secondary) — there is no 419.
|
||||
/// The feed is served by Cloudflare: 403 when its edge refuses a request, 429 when it limits them —
|
||||
/// there is no 419.
|
||||
/// </summary>
|
||||
public enum UpdateError
|
||||
{
|
||||
/// <summary>No error.</summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>No network / DNS failure / request could not reach GitHub.</summary>
|
||||
/// <summary>No network / DNS failure / request could not reach the update server.</summary>
|
||||
Offline,
|
||||
|
||||
/// <summary>404 — the release feed or repository was not found.</summary>
|
||||
/// <summary>404 — the release feed was not found.</summary>
|
||||
NotFound,
|
||||
|
||||
/// <summary>403 or 429 — GitHub rate limit reached.</summary>
|
||||
/// <summary>403 or 429 — the update server refused or rate-limited the request.</summary>
|
||||
RateLimited,
|
||||
|
||||
/// <summary>5xx — GitHub or its CDN returned a server error.</summary>
|
||||
/// <summary>5xx — the update server or its CDN returned a server error.</summary>
|
||||
ServerError,
|
||||
|
||||
/// <summary>The app is not Velopack-installed (dev/unpackaged); updates do not apply.</summary>
|
||||
|
||||
@@ -1,33 +1,61 @@
|
||||
namespace CommandForge.Application;
|
||||
|
||||
/// <summary>
|
||||
/// The project's canonical public links, in one place so the update source, About, Settings and
|
||||
/// the bug-report flow can never drift apart.
|
||||
/// The project's canonical public links, in one place so the update source, About, Settings, the
|
||||
/// legal pages and the bug-report flow can never drift apart. The source lives on the maintainer's
|
||||
/// Gitea (read-only for everyone else), issues on its GitLab mirror, releases on Cloudflare R2.
|
||||
/// </summary>
|
||||
#pragma warning disable S1075 // These are the product's fixed public URLs, not environment-specific paths.
|
||||
public static class ProductLinks
|
||||
{
|
||||
/// <summary>The GitHub repository (also the Velopack update source).</summary>
|
||||
public const string Repository = "https://github.com/poli0981/CommandForge";
|
||||
/// <summary>The canonical repository on Gitea.</summary>
|
||||
public const string Repository = "https://git.poli0981.dev/poli0981/CommandForge";
|
||||
|
||||
/// <summary>New-issue form used by "Report a bug".</summary>
|
||||
public const string NewIssue = Repository + "/issues/new";
|
||||
/// <summary>A file on the repository's main branch, as Gitea shows it.</summary>
|
||||
private const string MainBranch = Repository + "/src/branch/main/";
|
||||
|
||||
/// <summary>Releases page (downloads, checksums, release notes).</summary>
|
||||
/// <summary>
|
||||
/// The Velopack update feed (<c>releases.win.json</c> and the packages), served by Cloudflare
|
||||
/// from R2. The only address the app contacts on its own.
|
||||
/// </summary>
|
||||
public const string UpdateFeed = "https://releases.poli0981.dev/commandforge";
|
||||
|
||||
/// <summary>Releases page (release notes and download links).</summary>
|
||||
public const string Releases = Repository + "/releases";
|
||||
|
||||
/// <summary>Issues, on the public GitLab mirror (Gitea's registration is closed).</summary>
|
||||
public const string Issues = "https://gitlab.com/poli0981/CommandForge/-/issues";
|
||||
|
||||
/// <summary>New issue on the GitLab mirror, used by "Report a bug".</summary>
|
||||
public const string NewIssue = Issues + "/new";
|
||||
|
||||
/// <summary>The end-user guide in the repository.</summary>
|
||||
public const string UserGuide = Repository + "/blob/main/USAGE.md";
|
||||
public const string UserGuide = MainBranch + "USAGE.md";
|
||||
|
||||
/// <summary>Private vulnerability reporting.</summary>
|
||||
public const string SecurityAdvisory = Repository + "/security/advisories/new";
|
||||
|
||||
/// <summary>Private security reports by email (the alternative to <see cref="SecurityAdvisory"/>).</summary>
|
||||
/// <summary>Private security reports, by email only.</summary>
|
||||
public const string SecurityEmail = "security@poli0981.dev";
|
||||
|
||||
/// <summary>Questions about the code and contributions.</summary>
|
||||
/// <summary>Questions about the code, contributions and patches.</summary>
|
||||
public const string CodeEmail = "code@poli0981.dev";
|
||||
|
||||
/// <summary>The accessibility statement: what works, the known limitations, how to report a barrier.</summary>
|
||||
public const string AccessibilityStatement = MainBranch + "ACCESSIBILITY.md";
|
||||
|
||||
/// <summary>Accessibility barriers by email (the alternative to the issue template).</summary>
|
||||
public const string AccessibilityEmail = "accessibility@poli0981.dev";
|
||||
|
||||
/// <summary>The End User License Agreement in the repository.</summary>
|
||||
public const string Eula = MainBranch + "EULA.md";
|
||||
|
||||
/// <summary>The project's LICENSE file (GPLv3) in the repository.</summary>
|
||||
public const string LicenseFile = MainBranch + "LICENSE";
|
||||
|
||||
/// <summary>The disclaimer in the repository.</summary>
|
||||
public const string Disclaimer = MainBranch + "DISCLAIMER.md";
|
||||
|
||||
/// <summary>The privacy policy in the repository.</summary>
|
||||
public const string Privacy = MainBranch + "PRIVACY.md";
|
||||
|
||||
/// <summary>Full text of the GNU GPL v3.</summary>
|
||||
public const string License = "https://www.gnu.org/licenses/gpl-3.0.html";
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@ namespace CommandForge.Application.Updates;
|
||||
|
||||
/// <summary>
|
||||
/// Pure mapping of an HTTP status / exception to an <see cref="UpdateError"/>. No I/O, so it is
|
||||
/// unit-testable without a network. GitHub uses 403 (primary rate limit, with an
|
||||
/// <c>X-RateLimit-Remaining</c> header) and 429 (secondary); there is NO 419 (that is a Laravel
|
||||
/// CSRF code, not GitHub) so it must fall through to <see cref="UpdateError.Unknown"/>.
|
||||
/// unit-testable without a network. The feed (<see cref="ProductLinks.UpdateFeed"/>) is served by
|
||||
/// Cloudflare, whose edge answers 403 when it refuses a request and 429 when it rate-limits; both
|
||||
/// mean "try again later". There is NO 419 (that is a Laravel CSRF code, not an HTTP standard), so
|
||||
/// it must fall through to <see cref="UpdateError.Unknown"/>.
|
||||
/// </summary>
|
||||
public static class UpdateErrorMapper
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed class CheckForUpdateUseCase
|
||||
/// <summary>Whether updates apply to this install (false in dev/unpackaged).</summary>
|
||||
public bool IsSupported => _updates.IsUpdateSupported;
|
||||
|
||||
/// <summary>Checks GitHub Releases for a newer version.</summary>
|
||||
/// <summary>Checks the release feed for a newer version.</summary>
|
||||
public Task<UpdateCheckResult> ExecuteAsync(CancellationToken cancellationToken = default)
|
||||
=> _updates.CheckForUpdatesAsync(cancellationToken);
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.14" />
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.367">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.15" />
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.371">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -34,25 +34,27 @@ internal sealed class SystemProcessRunner : IProcessRunner
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(output);
|
||||
|
||||
using var process = new Process
|
||||
// The start info is built first: if resolving the executable throws, there is no Process yet
|
||||
// to leak (an object initializer would run after `new Process()` and outside the `using`).
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = ExecutableResolver.Resolve(fileName),
|
||||
Arguments = arguments,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
// Redirect stdin so we can close it immediately: a process that reads input (e.g. an
|
||||
// interactive "cmd" with no /c) gets EOF and exits instead of hanging forever.
|
||||
RedirectStandardInput = true,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
// Pin the working directory to System32 so nothing is resolved from an
|
||||
// attacker-controlled current directory — this runner also serves elevated commands.
|
||||
WorkingDirectory = SystemPaths.System32,
|
||||
},
|
||||
FileName = ExecutableResolver.Resolve(fileName),
|
||||
Arguments = arguments,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
// Redirect stdin so we can close it immediately: a process that reads input (e.g. an
|
||||
// interactive "cmd" with no /c) gets EOF and exits instead of hanging forever.
|
||||
RedirectStandardInput = true,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
// Pin the working directory to System32 so nothing is resolved from an
|
||||
// attacker-controlled current directory — this runner also serves elevated commands.
|
||||
WorkingDirectory = SystemPaths.System32,
|
||||
};
|
||||
_configureEnvironment?.Invoke(process.StartInfo.Environment);
|
||||
_configureEnvironment?.Invoke(startInfo.Environment);
|
||||
|
||||
using var process = new Process();
|
||||
process.StartInfo = startInfo;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -29,7 +29,15 @@ public sealed class JsonExecutionHistoryService : IExecutionHistoryService
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<ExecutionRecord> GetRecent() => _records;
|
||||
public IReadOnlyList<ExecutionRecord> GetRecent()
|
||||
{
|
||||
// The list is replaced, never changed, under the gate; reading the reference under it too
|
||||
// makes the newest one visible to every thread.
|
||||
lock (_gate)
|
||||
{
|
||||
return _records;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Record(ExecutionRecord record)
|
||||
|
||||
@@ -86,7 +86,7 @@ public sealed class SingleInstanceGuard : IDisposable
|
||||
|
||||
private void ListenLoop(Action onActivateRequested)
|
||||
{
|
||||
var handles = new WaitHandle[] { _activateEvent, _stopEvent.WaitHandle };
|
||||
WaitHandle[] handles = [_activateEvent, _stopEvent.WaitHandle];
|
||||
while (true)
|
||||
{
|
||||
if (WaitHandle.WaitAny(handles) == 1)
|
||||
|
||||
@@ -3,13 +3,13 @@ using CommandForge.Application.Ports;
|
||||
using CommandForge.Application.Updates;
|
||||
using Serilog;
|
||||
using Velopack;
|
||||
using Velopack.Sources;
|
||||
|
||||
namespace CommandForge.Infrastructure.Updates;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IUpdateService"/> backed by Velopack's <see cref="UpdateManager"/> against this
|
||||
/// project's GitHub Releases. Per-user install ⇒ no UAC. Degrades to a no-op when the app is not
|
||||
/// project's release feed on Cloudflare R2 (<see cref="ProductLinks.UpdateFeed"/>, an HTTP source).
|
||||
/// Per-user install ⇒ no UAC. Degrades to a no-op when the app is not
|
||||
/// Velopack-managed (dev/unpackaged): the manager is built lazily and reports
|
||||
/// <see cref="UpdateError.NotInstalled"/> rather than throwing on construction.
|
||||
/// </summary>
|
||||
@@ -150,7 +150,7 @@ public sealed class VelopackUpdateService : IUpdateService
|
||||
{
|
||||
try
|
||||
{
|
||||
return new UpdateManager(new GithubSource(ProductLinks.Repository, accessToken: null, prerelease: false));
|
||||
return new UpdateManager(ProductLinks.UpdateFeed);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
|
||||
@@ -80,6 +80,9 @@ public partial class App : System.Windows.Application
|
||||
_services.GetRequiredService<CrashHandlingService>().Hook();
|
||||
_guard?.StartListening(OnActivationRequested);
|
||||
|
||||
// Before the first window: names WPF-UI's unnamed template parts for screen readers.
|
||||
Behaviors.WpfUiAccessibility.Register();
|
||||
|
||||
ApplyUserPreferences();
|
||||
|
||||
var legalGate = _services.GetRequiredService<LegalGateService>();
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace CommandForge.Desktop.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
/// Where the window's own shortcuts may fire. Ctrl+Q (exit) does nothing while the keyboard is in a
|
||||
/// text box being edited, so a slip of the finger can't discard what is being typed; a search box
|
||||
/// opts back in with <c>beh:ShortcutScope.AllowExit="True"</c>, since its text is cheap to retype.
|
||||
/// </summary>
|
||||
public static class ShortcutScope
|
||||
{
|
||||
public static readonly DependencyProperty AllowExitProperty = DependencyProperty.RegisterAttached(
|
||||
"AllowExit", typeof(bool), typeof(ShortcutScope), new PropertyMetadata(false));
|
||||
|
||||
public static bool GetAllowExit(DependencyObject element)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(element);
|
||||
return (bool)element.GetValue(AllowExitProperty);
|
||||
}
|
||||
|
||||
public static void SetAllowExit(DependencyObject element, bool value)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(element);
|
||||
element.SetValue(AllowExitProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>Whether Ctrl+Q may close the window with <paramref name="focused"/> holding the keyboard.</summary>
|
||||
public static bool CanExitFrom(IInputElement? focused) => focused switch
|
||||
{
|
||||
TextBox { IsReadOnly: false } box => GetAllowExit(box) || FindTemplatedTextBox(box) is { } owner && GetAllowExit(owner),
|
||||
_ => true,
|
||||
};
|
||||
|
||||
// WPF-UI's TextBox is the TextBox itself; a plain TextBox inside another control's template
|
||||
// (an editable ComboBox) answers for its templated parent.
|
||||
private static DependencyObject? FindTemplatedTextBox(TextBox box) => box.TemplatedParent;
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using CommandForge.Desktop.Controls;
|
||||
using CommandForge.Desktop.Resources;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace CommandForge.Desktop.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
/// WPF-UI gives some parts of its control templates an AutomationId but no name, so Narrator says only
|
||||
/// "button" or "list": the navigation pane's toggle and its two lists, the title bar's caption buttons,
|
||||
/// a text box's clear (×) button and a card expander's header. Its templates also draw icons as font
|
||||
/// glyphs that UI Automation lists as text: the arrow of a navigation item that has sub-items, a check
|
||||
/// box's tick and an info bar's severity icon. Registered once at startup, these class handlers name
|
||||
/// those parts from the app's strings (live, so a language switch renames them), keep the arrow and
|
||||
/// the tick out of the tree (the item and the check box already say expanded or checked) and make the
|
||||
/// severity icon read the whole info bar, whose own text the tree leaves out.
|
||||
/// </summary>
|
||||
public static class WpfUiAccessibility
|
||||
{
|
||||
/// <summary>The controls <see cref="Apply"/> fixes.</summary>
|
||||
private static readonly Type[] HandledTypes =
|
||||
[
|
||||
typeof(NavigationView), typeof(TitleBar), typeof(Wpf.Ui.Controls.TextBox), typeof(CardExpander),
|
||||
typeof(NavigationViewItem), typeof(CheckBox), typeof(InfoBar),
|
||||
];
|
||||
|
||||
private static bool _registered;
|
||||
|
||||
/// <summary>
|
||||
/// Registers the handlers for every window the app opens. Call once, before the first window.
|
||||
/// <see cref="Apply"/> runs when one of the controls loads and whenever its size changes. Loaded
|
||||
/// alone is not enough: WPF raises it only on elements that have a Loaded handler of their own, and
|
||||
/// some WPF-UI controls (CardExpander) have none, so a class handler never hears it. SizeChanged is
|
||||
/// raised on every element after its first layout, when its template is applied.
|
||||
/// </summary>
|
||||
public static void Register()
|
||||
{
|
||||
if (_registered)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_registered = true;
|
||||
var handler = new RoutedEventHandler((sender, _) => Apply(sender));
|
||||
foreach (var type in HandledTypes)
|
||||
{
|
||||
EventManager.RegisterClassHandler(type, FrameworkElement.LoadedEvent, handler);
|
||||
EventManager.RegisterClassHandler(type, FrameworkElement.SizeChangedEvent, handler);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Names the parts of <paramref name="element"/>'s template, or keeps its glyph out of the
|
||||
/// automation tree, when it is one of the WPF-UI controls this class fixes; does nothing for
|
||||
/// anything else, or for a part already fixed. Its template must be applied (it is by layout).
|
||||
/// </summary>
|
||||
public static void Apply(object? element)
|
||||
{
|
||||
switch (element)
|
||||
{
|
||||
case NavigationView navigation:
|
||||
NameNavigationParts(navigation);
|
||||
break;
|
||||
case TitleBar titleBar:
|
||||
NamePart(titleBar, "PART_MinimizeButton", "A11y_Minimize");
|
||||
NameMaximizeButton(titleBar);
|
||||
NamePart(titleBar, "PART_CloseButton", "A11y_Close");
|
||||
break;
|
||||
case Wpf.Ui.Controls.TextBox textBox:
|
||||
NamePart(textBox, "ClearButton", "A11y_ClearText");
|
||||
break;
|
||||
case CardExpander expander:
|
||||
NameExpanderHeader(expander);
|
||||
break;
|
||||
case NavigationViewItem item:
|
||||
HideGlyph(item, "ChevronIcon");
|
||||
break;
|
||||
case CheckBox box:
|
||||
HideGlyph(box, "ControlIcon");
|
||||
break;
|
||||
case InfoBar bar:
|
||||
NameSeverityIcon(bar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void NameNavigationParts(NavigationView navigation)
|
||||
{
|
||||
NamePart(navigation, "PART_ToggleButton", "MenuToggleSidebar", withToolTip: true);
|
||||
NamePart(navigation, "PART_MenuItemsItemsControl", "A11y_NavigationPages");
|
||||
NamePart(navigation, "PART_FooterMenuItemsItemsControl", "A11y_NavigationFooter");
|
||||
|
||||
// The frame that shows the page is a Tab stop of its own with nothing to operate: Tab from the
|
||||
// pane went to an invisible, unnamed "pane" before the page's first control.
|
||||
if (FindPart(navigation, "PART_NavigationViewContentPresenter") is { Focusable: true } presenter)
|
||||
{
|
||||
presenter.Focusable = false;
|
||||
}
|
||||
}
|
||||
|
||||
private static void NamePart(Control control, string partName, string key, bool withToolTip = false)
|
||||
{
|
||||
if (FindPart(control, partName) is not { } part || part.GetValue(AutomationProperties.NameProperty) is string { Length: > 0 })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
part.SetBinding(AutomationProperties.NameProperty, LocalizationManager.Bind(key));
|
||||
if (withToolTip)
|
||||
{
|
||||
part.SetBinding(FrameworkElement.ToolTipProperty, LocalizationManager.Bind(key));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WPF-UI has one button for Maximize and Restore down: it draws Restore while the window is
|
||||
/// maximized, and its name follows.
|
||||
/// </summary>
|
||||
private static void NameMaximizeButton(TitleBar titleBar)
|
||||
{
|
||||
if (FindPart(titleBar, "PART_MaximizeButton") is { } button && !BindingOperations.IsDataBound(button, AutomationProperties.NameProperty))
|
||||
{
|
||||
var name = new MultiBinding { Converter = MaximizeNameConverter.Instance };
|
||||
name.Bindings.Add(new Binding(nameof(TitleBar.IsMaximized)) { Source = titleBar });
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_Maximize"));
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_Restore"));
|
||||
button.SetBinding(AutomationProperties.NameProperty, name);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The header toggle speaks the expander's own name (set in XAML), so "Logs size, expanded".</summary>
|
||||
private static void NameExpanderHeader(CardExpander expander)
|
||||
{
|
||||
if (FindPart(expander, "ExpanderToggleButton") is { } toggle && !BindingOperations.IsDataBound(toggle, AutomationProperties.NameProperty))
|
||||
{
|
||||
toggle.SetBinding(AutomationProperties.NameProperty, new Binding { Path = new PropertyPath(AutomationProperties.NameProperty), Source = expander });
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Moves a template icon's glyph into a <see cref="GlyphHost"/>, out of the automation tree.</summary>
|
||||
private static void HideGlyph(Control control, string iconPart)
|
||||
{
|
||||
if (FindPart(control, iconPart) is IconElement icon && Glyph(icon) is { Parent: Panel panel } glyph)
|
||||
{
|
||||
var index = panel.Children.IndexOf(glyph);
|
||||
panel.Children.RemoveAt(index);
|
||||
panel.Children.Insert(index, new GlyphHost { Child = glyph });
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An info bar's title and message are TextBlocks of its template, which WPF leaves out of the
|
||||
/// control view, so Narrator never read them; the severity icon's glyph is the bar's one element
|
||||
/// there. It is named with the whole bar: "Warning: These commands are not part of the vetted…".
|
||||
/// </summary>
|
||||
private static void NameSeverityIcon(InfoBar bar)
|
||||
{
|
||||
if (FindPart(bar, "SymbolIcon") is IconElement icon && Glyph(icon) is { } glyph && !BindingOperations.IsDataBound(glyph, AutomationProperties.NameProperty))
|
||||
{
|
||||
var name = new MultiBinding { Converter = InfoBarNameConverter.Instance };
|
||||
name.Bindings.Add(new Binding(nameof(InfoBar.Severity)) { Source = bar });
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_SeverityInfo"));
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_SeveritySuccess"));
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_SeverityWarning"));
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_SeverityError"));
|
||||
name.Bindings.Add(LocalizationManager.Bind("A11y_InfoBar"));
|
||||
name.Bindings.Add(new Binding(nameof(InfoBar.Title)) { Source = bar });
|
||||
name.Bindings.Add(new Binding(nameof(InfoBar.Message)) { Source = bar });
|
||||
glyph.SetBinding(AutomationProperties.NameProperty, name);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pure: what an info bar is read as, from its translated severity, the "{0}: {1}" pattern and its
|
||||
/// title and message (either may be empty).
|
||||
/// </summary>
|
||||
public static string InfoBarText(string severity, string pattern, string? title, string? message)
|
||||
{
|
||||
var text = string.Join(' ', new[] { title, message }.Where(part => !string.IsNullOrWhiteSpace(part)));
|
||||
return text.Length == 0 ? severity : string.Format(CultureInfo.CurrentCulture, pattern, severity, text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The TextBlock that draws an icon's glyph: WPF-UI's FontIcon puts it in a panel, its only visual
|
||||
/// child. Null when it is not there (an image icon, already moved into a GlyphHost, a WPF-UI that
|
||||
/// draws icons another way), so nothing changes.
|
||||
/// </summary>
|
||||
private static System.Windows.Controls.TextBlock? Glyph(IconElement icon)
|
||||
=> VisualTreeHelper.GetChildrenCount(icon) == 1
|
||||
&& VisualTreeHelper.GetChild(icon, 0) is Panel { Children: [System.Windows.Controls.TextBlock glyph] }
|
||||
? glyph
|
||||
: null;
|
||||
|
||||
private static FrameworkElement? FindPart(Control control, string partName)
|
||||
{
|
||||
control.ApplyTemplate();
|
||||
return control.Template?.FindName(partName, control) as FrameworkElement;
|
||||
}
|
||||
|
||||
/// <summary>The values: whether the window is maximized; the translated Maximize and Restore down.</summary>
|
||||
private sealed class MaximizeNameConverter : IMultiValueConverter
|
||||
{
|
||||
public static readonly MaximizeNameConverter Instance = new();
|
||||
|
||||
public object Convert(object[] values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (values is not [bool maximized, string maximize, string restore])
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return maximized ? restore : maximize;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object? parameter, CultureInfo culture)
|
||||
=> throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The values: the bar's <see cref="InfoBarSeverity"/>; the translated names of information,
|
||||
/// success, warning and error; the pattern; the bar's title and message.
|
||||
/// </summary>
|
||||
private sealed class InfoBarNameConverter : IMultiValueConverter
|
||||
{
|
||||
public static readonly InfoBarNameConverter Instance = new();
|
||||
|
||||
public object Convert(object[] values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (values is not [InfoBarSeverity severity, string info, string success, string warning, string error, string pattern, var title, var message])
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var name = severity switch
|
||||
{
|
||||
InfoBarSeverity.Success => success,
|
||||
InfoBarSeverity.Warning => warning,
|
||||
InfoBarSeverity.Error => error,
|
||||
_ => info,
|
||||
};
|
||||
return InfoBarText(name, pattern, title as string, message as string);
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object? parameter, CultureInfo culture)
|
||||
=> throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.14" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.15" />
|
||||
<PackageReference Include="Serilog" Version="4.4.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
|
||||
namespace CommandForge.Desktop.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// The automation peer of an element that only decorates (<see cref="DecorativeIcon"/>,
|
||||
/// <see cref="GlyphHost"/>): it has no children, so a font glyph inside it - a private-use character
|
||||
/// a screen reader can't say - is not in the tree. Unnamed, it is in the raw view only; given an
|
||||
/// <c>AutomationProperties.Name</c>, it is an image with that name.
|
||||
/// </summary>
|
||||
internal sealed class DecorativeAutomationPeer(FrameworkElement owner) : FrameworkElementAutomationPeer(owner)
|
||||
{
|
||||
private bool IsNamed => !string.IsNullOrEmpty(AutomationProperties.GetName(Owner));
|
||||
|
||||
protected override List<AutomationPeer>? GetChildrenCore() => null;
|
||||
|
||||
protected override AutomationControlType GetAutomationControlTypeCore() => AutomationControlType.Image;
|
||||
|
||||
protected override string GetClassNameCore() => Owner.GetType().Name;
|
||||
|
||||
protected override bool IsControlElementCore() => IsNamed && base.IsControlElementCore();
|
||||
|
||||
protected override bool IsContentElementCore() => IsNamed && base.IsContentElementCore();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Windows.Automation.Peers;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace CommandForge.Desktop.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// WPF-UI's <see cref="SymbolIcon"/> for an icon that decorates the text beside it, as every icon in
|
||||
/// this app does. Its glyph is a character from the icon font's private Unicode range, drawn by a plain
|
||||
/// TextBlock, so UI Automation exposed it as text and a screen reader could read that character. This
|
||||
/// icon's automation peer has no children, which keeps the glyph out of the tree. An icon that means
|
||||
/// something on its own gets an <c>AutomationProperties.Name</c> and is then an image with that name.
|
||||
/// </summary>
|
||||
public sealed class DecorativeIcon : SymbolIcon
|
||||
{
|
||||
public DecorativeIcon()
|
||||
{
|
||||
}
|
||||
|
||||
public DecorativeIcon(SymbolRegular symbol, double fontSize = 14, bool filled = false)
|
||||
: base(symbol, fontSize, filled)
|
||||
{
|
||||
}
|
||||
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new DecorativeAutomationPeer(this);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace CommandForge.Desktop.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Holds the glyph of an icon that a WPF-UI control template draws (a check box's tick, a navigation
|
||||
/// item's arrow), where <see cref="DecorativeIcon"/> can't be used: <see cref="Behaviors.WpfUiAccessibility"/>
|
||||
/// moves the glyph's TextBlock in here, and this element's automation peer keeps it out of the tree.
|
||||
/// The control itself already says what the mark shows (checked, expanded).
|
||||
/// </summary>
|
||||
public sealed class GlyphHost : Decorator
|
||||
{
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new DecorativeAutomationPeer(this);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace CommandForge.Desktop.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// A <see cref="StackPanel"/> that screen readers announce as a named group, like an HTML fieldset:
|
||||
/// set <c>AutomationProperties.Name</c> and Narrator says "Theme, group" when focus moves into one of
|
||||
/// its radio buttons. A plain panel has no automation peer, so its name would never be heard.
|
||||
/// </summary>
|
||||
public sealed class LabeledGroup : StackPanel
|
||||
{
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new LabeledGroupAutomationPeer(this);
|
||||
|
||||
private sealed class LabeledGroupAutomationPeer(LabeledGroup owner) : FrameworkElementAutomationPeer(owner)
|
||||
{
|
||||
protected override AutomationControlType GetAutomationControlTypeCore() => AutomationControlType.Group;
|
||||
|
||||
protected override string GetClassNameCore() => nameof(LabeledGroup);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace CommandForge.Desktop.Converters;
|
||||
|
||||
/// <summary>
|
||||
/// True when the value is null, empty or only white space, e.g. a blank console line, which a screen
|
||||
/// reader would otherwise read by its type name or not at all.
|
||||
/// </summary>
|
||||
public sealed class BlankToBooleanConverter : MarkupExtension, IValueConverter
|
||||
{
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
=> value is null || (value is string text && string.IsNullOrWhiteSpace(text));
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
=> throw new NotSupportedException();
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider) => this;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace CommandForge.Desktop.Converters;
|
||||
|
||||
/// <summary>
|
||||
/// Fills a localized composite format with the other bound values: the first binding is the format
|
||||
/// (for example <c>{res:Loc}</c>'s indexer binding to "Move {0} up"), the rest are its arguments.
|
||||
/// Used for accessible names that must say which row a repeated button acts on.
|
||||
/// </summary>
|
||||
public sealed class FormatConverter : MarkupExtension, IMultiValueConverter
|
||||
{
|
||||
public override object ProvideValue(IServiceProvider serviceProvider) => this;
|
||||
|
||||
public object Convert(object?[] values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (values is not [string format, .. var rest])
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var args = rest.Select(v => v == DependencyProperty.UnsetValue ? string.Empty : v).ToArray();
|
||||
return string.Format(CultureInfo.CurrentCulture, format, args);
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object? value, Type[] targetTypes, object? parameter, CultureInfo culture)
|
||||
=> throw new NotSupportedException();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
using CommandForge.Application.Logging;
|
||||
using CommandForge.Desktop.Resources;
|
||||
|
||||
namespace CommandForge.Desktop.Converters;
|
||||
|
||||
/// <summary>Shows a <see cref="LogLevel"/> by its localized name instead of the raw enum name.</summary>
|
||||
public sealed class LogLevelToTextConverter : MarkupExtension, IValueConverter
|
||||
{
|
||||
public override object ProvideValue(IServiceProvider serviceProvider) => this;
|
||||
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
=> value is LogLevel level ? Text(level) : string.Empty;
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
=> throw new NotSupportedException();
|
||||
|
||||
/// <summary>Pure: the localized name of <paramref name="level"/>.</summary>
|
||||
public static string Text(LogLevel level) => Strings.Get(level switch
|
||||
{
|
||||
LogLevel.Verbose => "LogLevel_Verbose",
|
||||
LogLevel.Debug => "LogLevel_Debug",
|
||||
LogLevel.Warning => "LogLevel_Warning",
|
||||
LogLevel.Error or LogLevel.Fatal => "LogLevel_Error",
|
||||
_ => "LogLevel_Info",
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using CommandForge.Desktop.Resources;
|
||||
|
||||
namespace CommandForge.Desktop.Converters;
|
||||
|
||||
/// <summary>
|
||||
/// The accessible name of a button repeated on every row of a list: its visible label first, then the
|
||||
/// row it acts on ("Undo: Flush DNS cache"), so a screen reader user knows which row a "Undo" is for
|
||||
/// and the name still starts with what is shown. Bind the row's title; set <see cref="LabelKey"/> to
|
||||
/// the button's own label key.
|
||||
/// </summary>
|
||||
public sealed class RowActionNameConverter : IValueConverter
|
||||
{
|
||||
/// <summary>The resource key of the button's visible label (for example <c>History_Undo</c>).</summary>
|
||||
public string LabelKey { get; set; } = string.Empty;
|
||||
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
=> Format(Strings.Get(LabelKey), value as string ?? string.Empty);
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
=> throw new NotSupportedException();
|
||||
|
||||
/// <summary>Pure: joins a button label and the row title with the localized pattern.</summary>
|
||||
public static string Format(string label, string rowTitle)
|
||||
=> string.IsNullOrEmpty(rowTitle) ? label : string.Format(CultureInfo.CurrentCulture, Strings.Get("A11y_RowAction"), label, rowTitle);
|
||||
}
|
||||
@@ -22,6 +22,10 @@ public sealed class LocalizationManager : INotifyPropertyChanged
|
||||
/// <summary>Resolves <paramref name="key"/> for the current UI culture.</summary>
|
||||
public string this[string key] => Strings.Get(key);
|
||||
|
||||
/// <summary>A one-way binding to <paramref name="key"/>'s text that follows culture changes (the C# twin of <see cref="LocExtension"/>).</summary>
|
||||
public static System.Windows.Data.Binding Bind(string key)
|
||||
=> new($"[{key}]") { Source = Instance, Mode = System.Windows.Data.BindingMode.OneWay };
|
||||
|
||||
/// <summary>The active UI culture.</summary>
|
||||
public CultureInfo CurrentCulture { get; private set; } = CultureInfo.CurrentUICulture;
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge ejecuta comandos de Windows a nivel de sistema. Revise y acepte los términos antes de continuar.</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>Leer el texto completo en GitHub</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>Leer el texto completo en línea</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>He leído y acepto todos los términos</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>Cerrar</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>No se pudo conectar con GitHub. Comprueba tu conexión a Internet e inténtalo de nuevo.</value>
|
||||
<value>No se pudo conectar con el servidor de actualizaciones. Comprueba tu conexión a Internet e inténtalo de nuevo.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>No se encontró ningún canal de versiones para esta aplicación.</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>Se alcanzó el límite de solicitudes de GitHub. Inténtalo de nuevo más tarde.</value>
|
||||
<value>El servidor de actualizaciones está ocupado o rechazó la solicitud. Inténtalo de nuevo más tarde.</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub devolvió un error del servidor. Inténtalo de nuevo más tarde.</value>
|
||||
<value>El servidor de actualizaciones devolvió un error. Inténtalo de nuevo más tarde.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>Las actualizaciones solo están disponibles en la versión instalada de la aplicación.</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>Licencia (GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>Código fuente</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>Visor de registros</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>Error inesperado</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>Algo salió mal. Puedes copiar los detalles o informar de esto en GitHub.</value>
|
||||
<value>Algo salió mal. Puedes copiar los detalles o informar de esto como error.</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>Código de error:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>Exportar registro (.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>Abrir incidencia en GitHub</value>
|
||||
<value>Abrir incidencia en GitLab</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>Cerrar</value>
|
||||
@@ -1263,7 +1263,7 @@
|
||||
<value>Úsalo bajo tu propio riesgo. Los comandos a nivel de sistema pueden cambiar la configuración o provocar pérdida de datos: haz una copia de seguridad y crea un punto de restauración antes de realizar operaciones arriesgadas. CommandForge no está afiliado a Microsoft.</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>Prioriza el funcionamiento sin conexión. CommandForge no recopila datos personales ni tiene telemetría; la única conexión de red es la comprobación de actualizaciones en GitHub.</value>
|
||||
<value>Prioriza el funcionamiento sin conexión. CommandForge no recopila datos personales ni tiene telemetría; la única conexión de red es la comprobación de actualizaciones (releases.poli0981.dev).</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>Términos y privacidad</value>
|
||||
@@ -1287,7 +1287,7 @@
|
||||
<value>Mover la selección (listas y paleta)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_OpenSelected" xml:space="preserve">
|
||||
<value>Abrir el comando seleccionado</value>
|
||||
<value>Abrir el comando seleccionado (catálogo, Historial, paleta de comandos)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_CloseDialog" xml:space="preserve">
|
||||
<value>Cerrar diálogo / cancelar</value>
|
||||
@@ -2553,7 +2553,7 @@ Los detalles se escribieron en la carpeta de registros:
|
||||
<value>Preguntar antes de cerrar la aplicación mientras se ejecuta un comando.</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>Buscar una versión nueva en GitHub al iniciar la aplicación. No se envía nada más.</value>
|
||||
<value>Buscar una versión nueva en releases.poli0981.dev al iniciar la aplicación. No se envía nada más.</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>Cuánto detalle se guarda en los archivos de registro de este equipo.</value>
|
||||
@@ -2813,4 +2813,118 @@ Los detalles se escribieron en la carpeta de registros:
|
||||
<data name="Cmd_net.vpn.settings_Desc" xml:space="preserve">
|
||||
<value>Abre Configuración para agregar, conectar o quitar las conexiones VPN integradas de Windows.</value>
|
||||
</data>
|
||||
<data name="A11y_RunStarted" xml:space="preserve">
|
||||
<value>Ejecutando {0}</value>
|
||||
</data>
|
||||
<data name="A11y_RunResult" xml:space="preserve">
|
||||
<value>{0}: {1}. Código de salida {2}, {3}.</value>
|
||||
</data>
|
||||
<data name="A11y_RestartRequired" xml:space="preserve">
|
||||
<value>Reinicia Windows para terminar.</value>
|
||||
</data>
|
||||
<data name="A11y_CanUndo" xml:space="preserve">
|
||||
<value>Se puede deshacer</value>
|
||||
</data>
|
||||
<data name="A11y_Favorite" xml:space="preserve">
|
||||
<value>Favorito</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCount" xml:space="preserve">
|
||||
<value>{0} comandos encontrados</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCountOne" xml:space="preserve">
|
||||
<value>1 comando encontrado</value>
|
||||
</data>
|
||||
<data name="A11y_PaletteItem" xml:space="preserve">
|
||||
<value>{0}, {1}, {2} de {3}</value>
|
||||
</data>
|
||||
<data name="A11y_Percent" xml:space="preserve">
|
||||
<value>{0} % descargado</value>
|
||||
</data>
|
||||
<data name="A11y_Minimize" xml:space="preserve">
|
||||
<value>Minimizar</value>
|
||||
</data>
|
||||
<data name="A11y_Maximize" xml:space="preserve">
|
||||
<value>Maximizar</value>
|
||||
</data>
|
||||
<data name="A11y_Restore" xml:space="preserve">
|
||||
<value>Restaurar</value>
|
||||
</data>
|
||||
<data name="A11y_Close" xml:space="preserve">
|
||||
<value>Cerrar</value>
|
||||
</data>
|
||||
<data name="A11y_ClearText" xml:space="preserve">
|
||||
<value>Borrar</value>
|
||||
</data>
|
||||
<data name="A11y_RowAction" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LabelValue" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LogEntry" xml:space="preserve">
|
||||
<value>{0}, {1}: {2}</value>
|
||||
</data>
|
||||
<data name="A11y_HistoryEntry" xml:space="preserve">
|
||||
<value>{0}, {1}, {2}</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterList" xml:space="preserve">
|
||||
<value>Cambiar el tamaño de la lista de comandos</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterConsole" xml:space="preserve">
|
||||
<value>Cambiar el tamaño de la consola</value>
|
||||
</data>
|
||||
<data name="A11y_RecipeSteps" xml:space="preserve">
|
||||
<value>Pasos de la receta</value>
|
||||
</data>
|
||||
<data name="A11y_CommandId" xml:space="preserve">
|
||||
<value>ID del comando: {0}</value>
|
||||
</data>
|
||||
<data name="Console_ErrorLine" xml:space="preserve">
|
||||
<value>Error: {0}</value>
|
||||
</data>
|
||||
<data name="Favorite_Add" xml:space="preserve">
|
||||
<value>Añadir a favoritos</value>
|
||||
</data>
|
||||
<data name="Favorite_Remove" xml:space="preserve">
|
||||
<value>Quitar de favoritos</value>
|
||||
</data>
|
||||
<data name="LogLevel_Verbose" xml:space="preserve">
|
||||
<value>Detallado</value>
|
||||
</data>
|
||||
<data name="Shortcuts_Regions" xml:space="preserve">
|
||||
<value>Moverse entre el panel de navegación, la página y la consola</value>
|
||||
</data>
|
||||
<data name="About_Accessibility" xml:space="preserve">
|
||||
<value>Accesibilidad</value>
|
||||
</data>
|
||||
<data name="About_AccessibilityContact" xml:space="preserve">
|
||||
<value>Barreras de accesibilidad</value>
|
||||
</data>
|
||||
<data name="A11y_CurrentPage" xml:space="preserve">
|
||||
<value>Página actual</value>
|
||||
</data>
|
||||
<data name="A11y_BlankLine" xml:space="preserve">
|
||||
<value>Línea en blanco</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationPages" xml:space="preserve">
|
||||
<value>Páginas</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationFooter" xml:space="preserve">
|
||||
<value>Herramientas y configuración</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityInfo" xml:space="preserve">
|
||||
<value>Información</value>
|
||||
</data>
|
||||
<data name="A11y_SeveritySuccess" xml:space="preserve">
|
||||
<value>Éxito</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityWarning" xml:space="preserve">
|
||||
<value>Advertencia</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityError" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="A11y_InfoBar" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge はシステムレベルの Windows コマンドを実行します。続行する前に利用規約を確認し、同意してください。</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>GitHub で全文を読む</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>全文をオンラインで読む</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>すべての規約を読み、同意します</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>閉じる</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>GitHub に接続できませんでした。インターネット接続を確認して再試行してください。</value>
|
||||
<value>更新サーバーに接続できませんでした。インターネット接続を確認して再試行してください。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>このアプリのリリースフィードが見つかりませんでした。</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>GitHub のレート制限に達しました。しばらくしてから再試行してください。</value>
|
||||
<value>更新サーバーが混雑しているか、要求を拒否しました。しばらくしてから再試行してください。</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub がサーバーエラーを返しました。しばらくしてから再試行してください。</value>
|
||||
<value>更新サーバーがエラーを返しました。しばらくしてから再試行してください。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>更新はインストール版アプリでのみ利用できます。</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>ライセンス(GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>ソースコード</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>ログビューアー</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>予期しないエラー</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>問題が発生しました。詳細をコピーするか、GitHub で報告できます。</value>
|
||||
<value>問題が発生しました。詳細をコピーするか、バグとして報告できます。</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>エラーコード:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>ログをエクスポート(.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>GitHub で issue を作成</value>
|
||||
<value>GitLab で issue を作成</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>閉じる</value>
|
||||
@@ -1263,7 +1263,7 @@
|
||||
<value>自己責任でご使用ください。システムレベルのコマンドは構成を変更したりデータを失わせたりする可能性があります — リスクの高い操作の前にデータをバックアップし、復元ポイントを作成してください。CommandForge は Microsoft とは関係ありません。</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>オフラインファースト。CommandForge は個人データを収集せず、テレメトリもありません。唯一のネットワーク接続は GitHub の更新確認です。</value>
|
||||
<value>オフラインファースト。CommandForge は個人データを収集せず、テレメトリもありません。唯一のネットワーク接続は更新確認(releases.poli0981.dev)です。</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>規約とプライバシー</value>
|
||||
@@ -1287,7 +1287,7 @@
|
||||
<value>選択を移動(一覧とパレット)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_OpenSelected" xml:space="preserve">
|
||||
<value>選択したコマンドを開く</value>
|
||||
<value>選択したコマンドを開く(カタログ、履歴、コマンドパレット)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_CloseDialog" xml:space="preserve">
|
||||
<value>ダイアログを閉じる / キャンセル</value>
|
||||
@@ -2553,7 +2553,7 @@
|
||||
<value>コマンドの実行中にアプリを閉じる前に確認します。</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>アプリの起動時に GitHub で新しいバージョンを確認します。それ以外の情報は送信しません。</value>
|
||||
<value>アプリの起動時に releases.poli0981.dev で新しいバージョンを確認します。それ以外の情報は送信しません。</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>この PC のログ ファイルに記録する詳細さ。</value>
|
||||
@@ -2813,4 +2813,118 @@
|
||||
<data name="Cmd_net.vpn.settings_Desc" xml:space="preserve">
|
||||
<value>設定を開いて、Windows 組み込みの VPN 接続を追加、接続、削除します。</value>
|
||||
</data>
|
||||
<data name="A11y_RunStarted" xml:space="preserve">
|
||||
<value>{0} を実行中</value>
|
||||
</data>
|
||||
<data name="A11y_RunResult" xml:space="preserve">
|
||||
<value>{0}: {1}。終了コード {2}、{3}。</value>
|
||||
</data>
|
||||
<data name="A11y_RestartRequired" xml:space="preserve">
|
||||
<value>完了するには Windows を再起動してください。</value>
|
||||
</data>
|
||||
<data name="A11y_CanUndo" xml:space="preserve">
|
||||
<value>元に戻せます</value>
|
||||
</data>
|
||||
<data name="A11y_Favorite" xml:space="preserve">
|
||||
<value>お気に入り</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCount" xml:space="preserve">
|
||||
<value>{0} 件のコマンドが見つかりました</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCountOne" xml:space="preserve">
|
||||
<value>1 件のコマンドが見つかりました</value>
|
||||
</data>
|
||||
<data name="A11y_PaletteItem" xml:space="preserve">
|
||||
<value>{0}、{1}、{3} 件中 {2} 件目</value>
|
||||
</data>
|
||||
<data name="A11y_Percent" xml:space="preserve">
|
||||
<value>{0}% ダウンロード済み</value>
|
||||
</data>
|
||||
<data name="A11y_Minimize" xml:space="preserve">
|
||||
<value>最小化</value>
|
||||
</data>
|
||||
<data name="A11y_Maximize" xml:space="preserve">
|
||||
<value>最大化</value>
|
||||
</data>
|
||||
<data name="A11y_Restore" xml:space="preserve">
|
||||
<value>元のサイズに戻す</value>
|
||||
</data>
|
||||
<data name="A11y_Close" xml:space="preserve">
|
||||
<value>閉じる</value>
|
||||
</data>
|
||||
<data name="A11y_ClearText" xml:space="preserve">
|
||||
<value>クリア</value>
|
||||
</data>
|
||||
<data name="A11y_RowAction" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LabelValue" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LogEntry" xml:space="preserve">
|
||||
<value>{0}、{1}: {2}</value>
|
||||
</data>
|
||||
<data name="A11y_HistoryEntry" xml:space="preserve">
|
||||
<value>{0}、{1}、{2}</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterList" xml:space="preserve">
|
||||
<value>コマンド一覧のサイズを変更</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterConsole" xml:space="preserve">
|
||||
<value>コンソールのサイズを変更</value>
|
||||
</data>
|
||||
<data name="A11y_RecipeSteps" xml:space="preserve">
|
||||
<value>レシピの手順</value>
|
||||
</data>
|
||||
<data name="A11y_CommandId" xml:space="preserve">
|
||||
<value>コマンド ID: {0}</value>
|
||||
</data>
|
||||
<data name="Console_ErrorLine" xml:space="preserve">
|
||||
<value>エラー: {0}</value>
|
||||
</data>
|
||||
<data name="Favorite_Add" xml:space="preserve">
|
||||
<value>お気に入りに追加</value>
|
||||
</data>
|
||||
<data name="Favorite_Remove" xml:space="preserve">
|
||||
<value>お気に入りから削除</value>
|
||||
</data>
|
||||
<data name="LogLevel_Verbose" xml:space="preserve">
|
||||
<value>詳細</value>
|
||||
</data>
|
||||
<data name="Shortcuts_Regions" xml:space="preserve">
|
||||
<value>ナビゲーション ウィンドウ、ページ、コンソールの間を移動</value>
|
||||
</data>
|
||||
<data name="About_Accessibility" xml:space="preserve">
|
||||
<value>アクセシビリティ</value>
|
||||
</data>
|
||||
<data name="About_AccessibilityContact" xml:space="preserve">
|
||||
<value>アクセシビリティの問題</value>
|
||||
</data>
|
||||
<data name="A11y_CurrentPage" xml:space="preserve">
|
||||
<value>現在のページ</value>
|
||||
</data>
|
||||
<data name="A11y_BlankLine" xml:space="preserve">
|
||||
<value>空白行</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationPages" xml:space="preserve">
|
||||
<value>ページ</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationFooter" xml:space="preserve">
|
||||
<value>ツールと設定</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityInfo" xml:space="preserve">
|
||||
<value>情報</value>
|
||||
</data>
|
||||
<data name="A11y_SeveritySuccess" xml:space="preserve">
|
||||
<value>成功</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityWarning" xml:space="preserve">
|
||||
<value>警告</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityError" xml:space="preserve">
|
||||
<value>エラー</value>
|
||||
</data>
|
||||
<data name="A11y_InfoBar" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge runs system-level Windows commands. Please review and accept the terms before continuing.</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>Read the full text on GitHub</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>Read the full text online</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>I have read and agree to all of the terms</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>Couldn't reach GitHub. Check your internet connection and try again.</value>
|
||||
<value>Couldn't reach the update server. Check your internet connection and try again.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>No release feed was found for this app.</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>GitHub rate limit reached. Please try again later.</value>
|
||||
<value>The update server is busy or refused the request. Please try again later.</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub returned a server error. Please try again later.</value>
|
||||
<value>The update server returned an error. Please try again later.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>Updates are only available in the installed version of the app.</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>License (GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>Source code</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>Log viewer</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>Unexpected error</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>Something went wrong. You can copy the details or report this on GitHub.</value>
|
||||
<value>Something went wrong. You can copy the details or report this as a bug.</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>Error code:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>Export log (.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>Open issue on GitHub</value>
|
||||
<value>Open issue on GitLab</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
@@ -1263,7 +1263,7 @@ Continue?</value>
|
||||
<value>Use at your own risk. System-level commands can change configuration or cause data loss — back up your data and create a restore point before risky operations. CommandForge is not affiliated with Microsoft.</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>Offline-first. CommandForge collects no personal data and has no telemetry; the only network connection is the GitHub update check.</value>
|
||||
<value>Offline-first. CommandForge collects no personal data and has no telemetry; the only network connection is the update check (releases.poli0981.dev).</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>Terms & Privacy</value>
|
||||
@@ -1287,7 +1287,7 @@ Continue?</value>
|
||||
<value>Move selection (lists & palette)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_OpenSelected" xml:space="preserve">
|
||||
<value>Open the selected command</value>
|
||||
<value>Open the selected command (catalog, History, Command Palette)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_CloseDialog" xml:space="preserve">
|
||||
<value>Close dialog / cancel</value>
|
||||
@@ -2553,7 +2553,7 @@ Details were written to the log folder:
|
||||
<value>Ask before closing the app while a command is running.</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>Check GitHub for a new version when the app starts. Nothing else is sent.</value>
|
||||
<value>Check releases.poli0981.dev for a new version when the app starts. Nothing else is sent.</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>How much detail goes into the log files on this PC.</value>
|
||||
@@ -2813,4 +2813,118 @@ Details were written to the log folder:
|
||||
<data name="Cmd_net.vpn.settings_Desc" xml:space="preserve">
|
||||
<value>Open Settings to add, connect to or remove the built-in Windows VPN connections.</value>
|
||||
</data>
|
||||
<data name="A11y_RunStarted" xml:space="preserve">
|
||||
<value>Running {0}</value>
|
||||
</data>
|
||||
<data name="A11y_RunResult" xml:space="preserve">
|
||||
<value>{0}: {1}. Exit code {2}, {3}.</value>
|
||||
</data>
|
||||
<data name="A11y_RestartRequired" xml:space="preserve">
|
||||
<value>Restart Windows to finish.</value>
|
||||
</data>
|
||||
<data name="A11y_CanUndo" xml:space="preserve">
|
||||
<value>Can be undone</value>
|
||||
</data>
|
||||
<data name="A11y_Favorite" xml:space="preserve">
|
||||
<value>Favorite</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCount" xml:space="preserve">
|
||||
<value>{0} commands found</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCountOne" xml:space="preserve">
|
||||
<value>1 command found</value>
|
||||
</data>
|
||||
<data name="A11y_PaletteItem" xml:space="preserve">
|
||||
<value>{0}, {1}, {2} of {3}</value>
|
||||
</data>
|
||||
<data name="A11y_Percent" xml:space="preserve">
|
||||
<value>{0}% downloaded</value>
|
||||
</data>
|
||||
<data name="A11y_Minimize" xml:space="preserve">
|
||||
<value>Minimize</value>
|
||||
</data>
|
||||
<data name="A11y_Maximize" xml:space="preserve">
|
||||
<value>Maximize</value>
|
||||
</data>
|
||||
<data name="A11y_Restore" xml:space="preserve">
|
||||
<value>Restore down</value>
|
||||
</data>
|
||||
<data name="A11y_Close" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name="A11y_ClearText" xml:space="preserve">
|
||||
<value>Clear</value>
|
||||
</data>
|
||||
<data name="A11y_RowAction" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LabelValue" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LogEntry" xml:space="preserve">
|
||||
<value>{0}, {1}: {2}</value>
|
||||
</data>
|
||||
<data name="A11y_HistoryEntry" xml:space="preserve">
|
||||
<value>{0}, {1}, {2}</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterList" xml:space="preserve">
|
||||
<value>Resize the command list</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterConsole" xml:space="preserve">
|
||||
<value>Resize the console</value>
|
||||
</data>
|
||||
<data name="A11y_RecipeSteps" xml:space="preserve">
|
||||
<value>Recipe steps</value>
|
||||
</data>
|
||||
<data name="A11y_CommandId" xml:space="preserve">
|
||||
<value>Command ID: {0}</value>
|
||||
</data>
|
||||
<data name="Console_ErrorLine" xml:space="preserve">
|
||||
<value>Error: {0}</value>
|
||||
</data>
|
||||
<data name="Favorite_Add" xml:space="preserve">
|
||||
<value>Add to favorites</value>
|
||||
</data>
|
||||
<data name="Favorite_Remove" xml:space="preserve">
|
||||
<value>Remove from favorites</value>
|
||||
</data>
|
||||
<data name="LogLevel_Verbose" xml:space="preserve">
|
||||
<value>Verbose</value>
|
||||
</data>
|
||||
<data name="Shortcuts_Regions" xml:space="preserve">
|
||||
<value>Move between the navigation pane, the page and the console</value>
|
||||
</data>
|
||||
<data name="About_Accessibility" xml:space="preserve">
|
||||
<value>Accessibility</value>
|
||||
</data>
|
||||
<data name="About_AccessibilityContact" xml:space="preserve">
|
||||
<value>Accessibility barriers</value>
|
||||
</data>
|
||||
<data name="A11y_CurrentPage" xml:space="preserve">
|
||||
<value>Current page</value>
|
||||
</data>
|
||||
<data name="A11y_BlankLine" xml:space="preserve">
|
||||
<value>Blank line</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationPages" xml:space="preserve">
|
||||
<value>Pages</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationFooter" xml:space="preserve">
|
||||
<value>Tools and settings</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityInfo" xml:space="preserve">
|
||||
<value>Information</value>
|
||||
</data>
|
||||
<data name="A11y_SeveritySuccess" xml:space="preserve">
|
||||
<value>Success</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityWarning" xml:space="preserve">
|
||||
<value>Warning</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityError" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="A11y_InfoBar" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge chạy các lệnh cấp hệ thống của Windows. Vui lòng đọc và đồng ý với điều khoản trước khi tiếp tục.</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>Đọc đầy đủ trên GitHub</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>Đọc toàn văn trực tuyến</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>Tôi đã đọc và đồng ý với tất cả điều khoản</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>Đóng</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>Không kết nối được GitHub. Kiểm tra mạng và thử lại.</value>
|
||||
<value>Không kết nối được máy chủ cập nhật. Kiểm tra mạng và thử lại.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>Không tìm thấy nguồn phát hành cho ứng dụng.</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>Đã đạt giới hạn truy vấn GitHub. Vui lòng thử lại sau.</value>
|
||||
<value>Máy chủ cập nhật đang bận hoặc từ chối yêu cầu. Vui lòng thử lại sau.</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub gặp lỗi máy chủ. Vui lòng thử lại sau.</value>
|
||||
<value>Máy chủ cập nhật gặp lỗi. Vui lòng thử lại sau.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>Cập nhật chỉ khả dụng ở bản đã cài đặt.</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>Giấy phép (GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>Mã nguồn</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>Xem nhật ký</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>Lỗi không mong muốn</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>Đã xảy ra lỗi. Bạn có thể sao chép chi tiết hoặc báo lỗi trên GitHub.</value>
|
||||
<value>Đã xảy ra lỗi. Bạn có thể sao chép chi tiết hoặc báo lỗi.</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>Mã lỗi:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>Xuất log (.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>Mở issue trên GitHub</value>
|
||||
<value>Mở issue trên GitLab</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>Đóng</value>
|
||||
@@ -1263,7 +1263,7 @@ Tiếp tục?</value>
|
||||
<value>Sử dụng với rủi ro của riêng bạn. Lệnh cấp hệ thống có thể thay đổi cấu hình hoặc gây mất dữ liệu — hãy sao lưu và tạo điểm khôi phục trước các thao tác rủi ro. CommandForge không liên kết với Microsoft.</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>Ưu tiên offline. CommandForge không thu thập dữ liệu cá nhân và không có telemetry; kết nối mạng duy nhất là kiểm tra cập nhật từ GitHub.</value>
|
||||
<value>Ưu tiên offline. CommandForge không thu thập dữ liệu cá nhân và không có telemetry; kết nối mạng duy nhất là kiểm tra cập nhật (releases.poli0981.dev).</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>Điều khoản & Quyền riêng tư</value>
|
||||
@@ -1287,7 +1287,7 @@ Tiếp tục?</value>
|
||||
<value>Di chuyển lựa chọn (danh sách & palette)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_OpenSelected" xml:space="preserve">
|
||||
<value>Mở lệnh đang chọn</value>
|
||||
<value>Mở lệnh đang chọn (danh mục lệnh, Lịch sử, Command Palette)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_CloseDialog" xml:space="preserve">
|
||||
<value>Đóng hộp thoại / hủy</value>
|
||||
@@ -2553,7 +2553,7 @@ Chi tiết đã được ghi vào thư mục log:
|
||||
<value>Hỏi trước khi đóng ứng dụng khi một lệnh đang chạy.</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>Kiểm tra phiên bản mới trên GitHub khi mở ứng dụng. Không gửi gì khác.</value>
|
||||
<value>Kiểm tra phiên bản mới trên releases.poli0981.dev khi mở ứng dụng. Không gửi gì khác.</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>Mức chi tiết ghi vào tệp nhật ký trên máy này.</value>
|
||||
@@ -2813,4 +2813,118 @@ Chi tiết đã được ghi vào thư mục log:
|
||||
<data name="Cmd_net.vpn.settings_Desc" xml:space="preserve">
|
||||
<value>Mở Cài đặt để thêm, kết nối hoặc xóa kết nối VPN tích hợp của Windows.</value>
|
||||
</data>
|
||||
<data name="A11y_RunStarted" xml:space="preserve">
|
||||
<value>Đang chạy {0}</value>
|
||||
</data>
|
||||
<data name="A11y_RunResult" xml:space="preserve">
|
||||
<value>{0}: {1}. Mã thoát {2}, {3}.</value>
|
||||
</data>
|
||||
<data name="A11y_RestartRequired" xml:space="preserve">
|
||||
<value>Hãy khởi động lại Windows để hoàn tất.</value>
|
||||
</data>
|
||||
<data name="A11y_CanUndo" xml:space="preserve">
|
||||
<value>Có thể hoàn tác</value>
|
||||
</data>
|
||||
<data name="A11y_Favorite" xml:space="preserve">
|
||||
<value>Yêu thích</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCount" xml:space="preserve">
|
||||
<value>Tìm thấy {0} lệnh</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCountOne" xml:space="preserve">
|
||||
<value>Tìm thấy 1 lệnh</value>
|
||||
</data>
|
||||
<data name="A11y_PaletteItem" xml:space="preserve">
|
||||
<value>{0}, {1}, {2} trên {3}</value>
|
||||
</data>
|
||||
<data name="A11y_Percent" xml:space="preserve">
|
||||
<value>Đã tải {0}%</value>
|
||||
</data>
|
||||
<data name="A11y_Minimize" xml:space="preserve">
|
||||
<value>Thu nhỏ</value>
|
||||
</data>
|
||||
<data name="A11y_Maximize" xml:space="preserve">
|
||||
<value>Phóng to</value>
|
||||
</data>
|
||||
<data name="A11y_Restore" xml:space="preserve">
|
||||
<value>Khôi phục kích thước</value>
|
||||
</data>
|
||||
<data name="A11y_Close" xml:space="preserve">
|
||||
<value>Đóng</value>
|
||||
</data>
|
||||
<data name="A11y_ClearText" xml:space="preserve">
|
||||
<value>Xóa</value>
|
||||
</data>
|
||||
<data name="A11y_RowAction" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LabelValue" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
</data>
|
||||
<data name="A11y_LogEntry" xml:space="preserve">
|
||||
<value>{0}, {1}: {2}</value>
|
||||
</data>
|
||||
<data name="A11y_HistoryEntry" xml:space="preserve">
|
||||
<value>{0}, {1}, {2}</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterList" xml:space="preserve">
|
||||
<value>Đổi kích thước danh sách lệnh</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterConsole" xml:space="preserve">
|
||||
<value>Đổi kích thước bảng điều khiển</value>
|
||||
</data>
|
||||
<data name="A11y_RecipeSteps" xml:space="preserve">
|
||||
<value>Các bước của chuỗi lệnh</value>
|
||||
</data>
|
||||
<data name="A11y_CommandId" xml:space="preserve">
|
||||
<value>ID lệnh: {0}</value>
|
||||
</data>
|
||||
<data name="Console_ErrorLine" xml:space="preserve">
|
||||
<value>Lỗi: {0}</value>
|
||||
</data>
|
||||
<data name="Favorite_Add" xml:space="preserve">
|
||||
<value>Thêm vào yêu thích</value>
|
||||
</data>
|
||||
<data name="Favorite_Remove" xml:space="preserve">
|
||||
<value>Bỏ khỏi yêu thích</value>
|
||||
</data>
|
||||
<data name="LogLevel_Verbose" xml:space="preserve">
|
||||
<value>Chi tiết</value>
|
||||
</data>
|
||||
<data name="Shortcuts_Regions" xml:space="preserve">
|
||||
<value>Chuyển giữa ngăn điều hướng, trang và bảng điều khiển</value>
|
||||
</data>
|
||||
<data name="About_Accessibility" xml:space="preserve">
|
||||
<value>Trợ năng</value>
|
||||
</data>
|
||||
<data name="About_AccessibilityContact" xml:space="preserve">
|
||||
<value>Vấn đề trợ năng</value>
|
||||
</data>
|
||||
<data name="A11y_CurrentPage" xml:space="preserve">
|
||||
<value>Trang hiện tại</value>
|
||||
</data>
|
||||
<data name="A11y_BlankLine" xml:space="preserve">
|
||||
<value>Dòng trống</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationPages" xml:space="preserve">
|
||||
<value>Các trang</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationFooter" xml:space="preserve">
|
||||
<value>Công cụ và cài đặt</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityInfo" xml:space="preserve">
|
||||
<value>Thông tin</value>
|
||||
</data>
|
||||
<data name="A11y_SeveritySuccess" xml:space="preserve">
|
||||
<value>Thành công</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityWarning" xml:space="preserve">
|
||||
<value>Cảnh báo</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityError" xml:space="preserve">
|
||||
<value>Lỗi</value>
|
||||
</data>
|
||||
<data name="A11y_InfoBar" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge 会运行系统级 Windows 命令。请在继续前阅读并接受相关条款。</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>在 GitHub 上阅读完整文本</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>在线阅读完整文本</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>我已阅读并同意所有条款</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>关闭</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>无法连接到 GitHub。请检查你的网络连接后重试。</value>
|
||||
<value>无法连接到更新服务器。请检查你的网络连接后重试。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>未找到此应用的发布源。</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>已达到 GitHub 速率限制,请稍后重试。</value>
|
||||
<value>更新服务器繁忙或拒绝了请求,请稍后重试。</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub 返回了服务器错误,请稍后重试。</value>
|
||||
<value>更新服务器返回了错误,请稍后重试。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>仅在已安装版本的应用中可使用更新功能。</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>许可证(GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>源代码</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>日志查看器</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>意外错误</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>出现了问题。你可以复制详细信息,或在 GitHub 上报告此问题。</value>
|
||||
<value>出现了问题。你可以复制详细信息,或将其作为错误报告。</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>错误代码:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>导出日志(.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>在 GitHub 上创建 issue</value>
|
||||
<value>在 GitLab 上创建 issue</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>关闭</value>
|
||||
@@ -1263,7 +1263,7 @@
|
||||
<value>使用风险自负。系统级命令可能更改配置或导致数据丢失——在执行有风险的操作前,请备份数据并创建还原点。CommandForge 与 Microsoft 无任何关联。</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>离线优先。CommandForge 不收集任何个人数据,也没有遥测;唯一的网络连接是 GitHub 更新检查。</value>
|
||||
<value>离线优先。CommandForge 不收集任何个人数据,也没有遥测;唯一的网络连接是更新检查(releases.poli0981.dev)。</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>条款与隐私</value>
|
||||
@@ -1287,7 +1287,7 @@
|
||||
<value>移动选择(列表与面板)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_OpenSelected" xml:space="preserve">
|
||||
<value>打开所选命令</value>
|
||||
<value>打开所选命令(命令目录、历史记录、命令面板)</value>
|
||||
</data>
|
||||
<data name="Shortcuts_CloseDialog" xml:space="preserve">
|
||||
<value>关闭对话框 / 取消</value>
|
||||
@@ -2553,7 +2553,7 @@
|
||||
<value>在命令运行时关闭应用前先确认。</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>启动应用时在 GitHub 上检查新版本。不会发送任何其他信息。</value>
|
||||
<value>启动应用时在 releases.poli0981.dev 上检查新版本。不会发送任何其他信息。</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>写入此电脑上日志文件的详细程度。</value>
|
||||
@@ -2813,4 +2813,118 @@
|
||||
<data name="Cmd_net.vpn.settings_Desc" xml:space="preserve">
|
||||
<value>打开设置以添加、连接或删除 Windows 内置的 VPN 连接。</value>
|
||||
</data>
|
||||
<data name="A11y_RunStarted" xml:space="preserve">
|
||||
<value>正在运行 {0}</value>
|
||||
</data>
|
||||
<data name="A11y_RunResult" xml:space="preserve">
|
||||
<value>{0}:{1}。退出代码 {2},{3}。</value>
|
||||
</data>
|
||||
<data name="A11y_RestartRequired" xml:space="preserve">
|
||||
<value>请重启 Windows 以完成。</value>
|
||||
</data>
|
||||
<data name="A11y_CanUndo" xml:space="preserve">
|
||||
<value>可撤消</value>
|
||||
</data>
|
||||
<data name="A11y_Favorite" xml:space="preserve">
|
||||
<value>已收藏</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCount" xml:space="preserve">
|
||||
<value>找到 {0} 个命令</value>
|
||||
</data>
|
||||
<data name="A11y_ResultCountOne" xml:space="preserve">
|
||||
<value>找到 1 个命令</value>
|
||||
</data>
|
||||
<data name="A11y_PaletteItem" xml:space="preserve">
|
||||
<value>{0},{1},第 {2} 个,共 {3} 个</value>
|
||||
</data>
|
||||
<data name="A11y_Percent" xml:space="preserve">
|
||||
<value>已下载 {0}%</value>
|
||||
</data>
|
||||
<data name="A11y_Minimize" xml:space="preserve">
|
||||
<value>最小化</value>
|
||||
</data>
|
||||
<data name="A11y_Maximize" xml:space="preserve">
|
||||
<value>最大化</value>
|
||||
</data>
|
||||
<data name="A11y_Restore" xml:space="preserve">
|
||||
<value>向下还原</value>
|
||||
</data>
|
||||
<data name="A11y_Close" xml:space="preserve">
|
||||
<value>关闭</value>
|
||||
</data>
|
||||
<data name="A11y_ClearText" xml:space="preserve">
|
||||
<value>清除</value>
|
||||
</data>
|
||||
<data name="A11y_RowAction" xml:space="preserve">
|
||||
<value>{0}:{1}</value>
|
||||
</data>
|
||||
<data name="A11y_LabelValue" xml:space="preserve">
|
||||
<value>{0}{1}</value>
|
||||
</data>
|
||||
<data name="A11y_LogEntry" xml:space="preserve">
|
||||
<value>{0},{1}:{2}</value>
|
||||
</data>
|
||||
<data name="A11y_HistoryEntry" xml:space="preserve">
|
||||
<value>{0},{1},{2}</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterList" xml:space="preserve">
|
||||
<value>调整命令列表大小</value>
|
||||
</data>
|
||||
<data name="A11y_SplitterConsole" xml:space="preserve">
|
||||
<value>调整控制台大小</value>
|
||||
</data>
|
||||
<data name="A11y_RecipeSteps" xml:space="preserve">
|
||||
<value>配方步骤</value>
|
||||
</data>
|
||||
<data name="A11y_CommandId" xml:space="preserve">
|
||||
<value>命令 ID:{0}</value>
|
||||
</data>
|
||||
<data name="Console_ErrorLine" xml:space="preserve">
|
||||
<value>错误:{0}</value>
|
||||
</data>
|
||||
<data name="Favorite_Add" xml:space="preserve">
|
||||
<value>添加到收藏</value>
|
||||
</data>
|
||||
<data name="Favorite_Remove" xml:space="preserve">
|
||||
<value>从收藏中移除</value>
|
||||
</data>
|
||||
<data name="LogLevel_Verbose" xml:space="preserve">
|
||||
<value>详细</value>
|
||||
</data>
|
||||
<data name="Shortcuts_Regions" xml:space="preserve">
|
||||
<value>在导航窗格、页面和控制台之间切换</value>
|
||||
</data>
|
||||
<data name="About_Accessibility" xml:space="preserve">
|
||||
<value>辅助功能</value>
|
||||
</data>
|
||||
<data name="About_AccessibilityContact" xml:space="preserve">
|
||||
<value>辅助功能问题</value>
|
||||
</data>
|
||||
<data name="A11y_CurrentPage" xml:space="preserve">
|
||||
<value>当前页面</value>
|
||||
</data>
|
||||
<data name="A11y_BlankLine" xml:space="preserve">
|
||||
<value>空行</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationPages" xml:space="preserve">
|
||||
<value>页面</value>
|
||||
</data>
|
||||
<data name="A11y_NavigationFooter" xml:space="preserve">
|
||||
<value>工具和设置</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityInfo" xml:space="preserve">
|
||||
<value>信息</value>
|
||||
</data>
|
||||
<data name="A11y_SeveritySuccess" xml:space="preserve">
|
||||
<value>成功</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityWarning" xml:space="preserve">
|
||||
<value>警告</value>
|
||||
</data>
|
||||
<data name="A11y_SeverityError" xml:space="preserve">
|
||||
<value>错误</value>
|
||||
</data>
|
||||
<data name="A11y_InfoBar" xml:space="preserve">
|
||||
<value>{0}:{1}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using CommandForge.Desktop.Controls;
|
||||
using CommandForge.Desktop.Resources;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
@@ -72,7 +73,7 @@ public sealed class FluentDialogService : IDialogService
|
||||
_ => (SymbolRegular.Info24, "AccentTextFillColorPrimaryBrush"),
|
||||
};
|
||||
|
||||
var icon = new SymbolIcon(symbol, 24, filled: false)
|
||||
var icon = new DecorativeIcon(symbol, 24)
|
||||
{
|
||||
VerticalAlignment = VerticalAlignment.Top,
|
||||
Margin = new Thickness(0, 0, 12, 0),
|
||||
|
||||
@@ -3,6 +3,17 @@ namespace CommandForge.Desktop.Services;
|
||||
/// <summary>Short, non-blocking notifications (snackbars at the bottom of the main window).</summary>
|
||||
public interface INotificationService
|
||||
{
|
||||
/// <summary>Shows <paramref name="message"/>; safe to call from any thread, a no-op before the main window exists.</summary>
|
||||
public void Show(string message, NotificationKind kind = NotificationKind.Information);
|
||||
/// <summary>
|
||||
/// Shows <paramref name="message"/> and, unless <paramref name="announce"/> is false (because the
|
||||
/// same news was already said), reads it to screen readers. Safe to call from any thread; a no-op
|
||||
/// before the main window exists.
|
||||
/// </summary>
|
||||
public void Show(string message, NotificationKind kind = NotificationKind.Information, bool announce = true);
|
||||
|
||||
/// <summary>
|
||||
/// Reads <paramref name="message"/> to screen readers without showing anything, for a change the
|
||||
/// screen already shows (a run's result, its status). <paramref name="important"/> messages
|
||||
/// interrupt what is being read. Safe to call from any thread.
|
||||
/// </summary>
|
||||
public void Announce(string message, bool important = false);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
using Serilog;
|
||||
|
||||
namespace CommandForge.Desktop.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Says short status messages to screen readers (Narrator, NVDA, JAWS) through a UI Automation
|
||||
/// notification event raised on the active window. WPF does not raise anything for
|
||||
/// <c>AutomationProperties.LiveSetting</c> by itself, so changes that appear on screen (a run's
|
||||
/// result, a search's result count, a snackbar) are announced through here.
|
||||
/// </summary>
|
||||
public static class ScreenReader
|
||||
{
|
||||
// One activity: a newer message replaces one the screen reader has not started to read yet.
|
||||
private const string ActivityId = "CommandForge.Status";
|
||||
|
||||
/// <summary>
|
||||
/// Announces <paramref name="message"/>. <paramref name="important"/> messages (a finished run,
|
||||
/// "restart required") interrupt what is being read; others wait their turn. Safe from any
|
||||
/// thread; a no-op without an application, a window or a listening screen reader.
|
||||
/// </summary>
|
||||
public static void Announce(string? message, bool important = false)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(message) || System.Windows.Application.Current is not { } app)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
app.Dispatcher.InvokeAsync(() => RaiseOnActiveWindow(app.Windows.OfType<Window>(), app.MainWindow, message, important));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When a screen reader listens, raises the notification on the active window of
|
||||
/// <paramref name="windows"/>, else on <paramref name="mainWindow"/>. False when nothing was raised.
|
||||
/// </summary>
|
||||
public static bool RaiseOnActiveWindow(IEnumerable<Window> windows, Window? mainWindow, string message, bool important)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(windows);
|
||||
return AutomationPeer.ListenerExists(AutomationEvents.Notification)
|
||||
&& Raise(windows.FirstOrDefault(w => w.IsActive) ?? mainWindow, message, important);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the notification on <paramref name="window"/>'s automation peer, on its thread. False when
|
||||
/// there is no window or no peer, or UI Automation refused it.
|
||||
/// </summary>
|
||||
public static bool Raise(Window? window, string message, bool important)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(message);
|
||||
if (window is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var peer = UIElementAutomationPeer.FromElement(window) ?? UIElementAutomationPeer.CreatePeerForElement(window);
|
||||
if (peer is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
peer.RaiseNotificationEvent(
|
||||
important ? AutomationNotificationKind.ActionCompleted : AutomationNotificationKind.Other,
|
||||
important ? AutomationNotificationProcessing.ImportantMostRecent : AutomationNotificationProcessing.MostRecent,
|
||||
message,
|
||||
ActivityId);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex) when (ex is InvalidOperationException or NotSupportedException)
|
||||
{
|
||||
Log.Debug(ex, "Could not raise a screen-reader notification.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,23 @@ using Serilog;
|
||||
|
||||
namespace CommandForge.Desktop.Services;
|
||||
|
||||
/// <summary><see cref="IShellService"/> backed by ShellExecute.</summary>
|
||||
/// <summary>
|
||||
/// <see cref="IShellService"/> backed by ShellExecute — for the project's own web pages and mail
|
||||
/// addresses and the app's own folders only. ShellExecute runs whatever it is handed: a <c>file:</c>
|
||||
/// address or an unknown protocol handler is a program, so anything else is refused.
|
||||
/// </summary>
|
||||
public sealed class ShellService : IShellService
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public bool TryOpen(string target)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(target);
|
||||
if (!IsAllowedTarget(target, Directory.Exists))
|
||||
{
|
||||
Log.Warning("Refused to open {Target}: only https and mailto addresses and existing folders are opened.", target);
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using var process = Process.Start(new ProcessStartInfo(target) { UseShellExecute = true });
|
||||
@@ -39,4 +49,22 @@ public sealed class ShellService : IShellService
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pure: whether <paramref name="target"/> is a web page (<c>https:</c>), a mail address
|
||||
/// (<c>mailto:</c>) or an existing folder given by its full path.
|
||||
/// </summary>
|
||||
public static bool IsAllowedTarget(string target, Func<string, bool> folderExists)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(target);
|
||||
ArgumentNullException.ThrowIfNull(folderExists);
|
||||
|
||||
// "C:\Users\…" parses as a file: URI too, so a path is checked as a path.
|
||||
if (Uri.TryCreate(target, UriKind.Absolute, out var uri) && !uri.IsFile && !uri.IsUnc)
|
||||
{
|
||||
return uri.Scheme == Uri.UriSchemeHttps || uri.Scheme == Uri.UriSchemeMailto;
|
||||
}
|
||||
|
||||
return Path.IsPathFullyQualified(target) && folderExists(target);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using CommandForge.Desktop.Controls;
|
||||
using Serilog;
|
||||
using Wpf.Ui;
|
||||
using Wpf.Ui.Controls;
|
||||
@@ -9,6 +10,9 @@ public sealed class SnackbarNotificationService : INotificationService
|
||||
{
|
||||
private static readonly TimeSpan Duration = TimeSpan.FromSeconds(4);
|
||||
|
||||
// A message that names a file or folder ("Saved to C:\…") needs longer to read than a status.
|
||||
private static readonly TimeSpan LongDuration = TimeSpan.FromSeconds(10);
|
||||
|
||||
private readonly ISnackbarService _snackbars;
|
||||
private bool _presenterReady;
|
||||
|
||||
@@ -27,9 +31,14 @@ public sealed class SnackbarNotificationService : INotificationService
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Show(string message, NotificationKind kind = NotificationKind.Information)
|
||||
public void Show(string message, NotificationKind kind = NotificationKind.Information, bool announce = true)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(message);
|
||||
if (announce)
|
||||
{
|
||||
ScreenReader.Announce(message, important: kind is NotificationKind.Error or NotificationKind.Warning);
|
||||
}
|
||||
|
||||
System.Windows.Application.Current?.Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
if (!_presenterReady)
|
||||
@@ -46,7 +55,23 @@ public sealed class SnackbarNotificationService : INotificationService
|
||||
_ => (ControlAppearance.Secondary, SymbolRegular.Info24),
|
||||
};
|
||||
|
||||
_snackbars.Show(message, string.Empty, appearance, new SymbolIcon(symbol, 20, filled: false), Duration);
|
||||
_snackbars.Show(message, string.Empty, appearance, new DecorativeIcon(symbol, 20), DurationFor(message));
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Announce(string message, bool important = false)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(message);
|
||||
ScreenReader.Announce(message, important);
|
||||
}
|
||||
|
||||
/// <summary>Pure: how long a snackbar stays, longer when it names a path the user may want to read.</summary>
|
||||
public static TimeSpan DurationFor(string message)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(message);
|
||||
return message.Contains(":\\", StringComparison.Ordinal) || message.Contains("\\\\", StringComparison.Ordinal)
|
||||
? LongDuration
|
||||
: Duration;
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,16 @@
|
||||
<sys:Double x:Key="AppFontSizeSubtitle">20</sys:Double>
|
||||
<sys:Double x:Key="AppFontSizeTitle">28</sys:Double>
|
||||
<sys:Double x:Key="AppFontSizeConsole">12.5</sys:Double>
|
||||
<!-- The navigation pane's open width: FontScaleService widens it when the text is very large. -->
|
||||
<sys:Double x:Key="AppNavigationPaneWidth">290</sys:Double>
|
||||
|
||||
<FontFamily x:Key="ConsoleFontFamily">Cascadia Mono, Consolas, Courier New</FontFamily>
|
||||
|
||||
<!-- How much dimmed text and badge icons fade. ThemeService sets both to 1 under a Windows
|
||||
contrast theme, where blending colors is not allowed. -->
|
||||
<sys:Double x:Key="AppDimOpacity">0.78</sys:Double>
|
||||
<sys:Double x:Key="AppBadgeOpacity">0.75</sys:Double>
|
||||
|
||||
<!-- ===== Text ===== -->
|
||||
|
||||
<Style x:Key="PageTitleTextStyle" TargetType="TextBlock">
|
||||
@@ -52,10 +59,12 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
|
||||
</Style>
|
||||
|
||||
<!-- Selectable, read-only monospace text (command lines, paths, environment details). -->
|
||||
<!-- Selectable, read-only monospace text (command lines, paths, environment details). Its bare
|
||||
template has no border, so keyboard focus is drawn with WPF-UI's focus rectangle. -->
|
||||
<Style x:Key="ReadOnlyCodeTextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="IsReadOnly" Value="True" />
|
||||
<Setter Property="IsReadOnlyCaretVisible" Value="False" />
|
||||
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
@@ -113,6 +122,20 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- A console line's frame: an error (stderr) line also gets a bar on its left, so it is not told
|
||||
apart by color alone. -->
|
||||
<Style x:Key="ConsoleLineBorderStyle" TargetType="Border">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsError}" Value="True">
|
||||
<Setter Property="BorderThickness" Value="3,0,0,0" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemFillColorCautionBrush}" />
|
||||
<Setter Property="Padding" Value="6,0,0,0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ConsoleBorderStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="{DynamicResource ControlAltFillColorSecondaryBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
||||
@@ -122,19 +145,32 @@
|
||||
|
||||
<!-- ===== Lists ===== -->
|
||||
|
||||
<!-- Row text in command lists: title + one-line description. -->
|
||||
<!-- Row text in command lists: title + one-line description. Cut-off text shows in full as a
|
||||
tooltip (screen readers get the full text anyway). -->
|
||||
<Style x:Key="ListTitleTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{DynamicResource AppFontSize}" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
|
||||
<Setter Property="ToolTip" Value="{Binding Text, RelativeSource={RelativeSource Self}}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Text" Value="">
|
||||
<Setter Property="ToolTip" Value="{x:Null}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- Dimmed rather than recolored: it keeps the row's own text color, so it stays readable on a
|
||||
selected (accent) row in both themes. -->
|
||||
selected (accent) row in both themes; full strength under a contrast theme. -->
|
||||
<Style x:Key="ListDescriptionTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{DynamicResource AppFontSizeCaption}" />
|
||||
<Setter Property="Opacity" Value="0.78" />
|
||||
<Setter Property="Opacity" Value="{DynamicResource AppDimOpacity}" />
|
||||
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
|
||||
<Setter Property="ToolTip" Value="{Binding Text, RelativeSource={RelativeSource Self}}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Text" Value="">
|
||||
<Setter Property="ToolTip" Value="{x:Null}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- Placeholder shown in an empty list. -->
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Windows;
|
||||
using CommandForge.Application.Settings;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace CommandForge.Desktop.Theming;
|
||||
|
||||
@@ -6,33 +8,141 @@ namespace CommandForge.Desktop.Theming;
|
||||
/// <see cref="IFontScaleService"/> that rewrites the app-level font size resources. Text binds to
|
||||
/// them as DynamicResource (<c>AppFontSize</c> and its caption/subtitle/title/console companions),
|
||||
/// and WPF-UI controls read <c>ControlContentThemeFontSize</c>, so the whole UI rescales live.
|
||||
/// The user's Small / Medium / Large choice is multiplied by Windows' own Text size setting
|
||||
/// (<see cref="WindowsTextScale"/>), re-read when Windows reports a preference change or the app
|
||||
/// comes to the foreground.
|
||||
/// </summary>
|
||||
public sealed class FontScaleService : IFontScaleService
|
||||
public sealed class FontScaleService : IFontScaleService, IDisposable
|
||||
{
|
||||
/// <summary>The <see cref="System.Windows.Application.Resources"/> key holding the body font size (a <see cref="double"/>).</summary>
|
||||
public const string ResourceKey = "AppFontSize";
|
||||
|
||||
/// <summary>The resource key of the navigation pane's open width (a <see cref="double"/>).</summary>
|
||||
public const string PaneWidthKey = "AppNavigationPaneWidth";
|
||||
|
||||
private const double PaneWidth = 290;
|
||||
|
||||
private readonly Func<double> _readTextScale;
|
||||
private readonly Func<ResourceDictionary?> _resources;
|
||||
private FontScale _scale = FontScale.Medium;
|
||||
private double _textScale = WindowsTextScale.Minimum;
|
||||
private bool _subscribed;
|
||||
|
||||
/// <summary>Rewrites the application's resources, with Windows' own Text size.</summary>
|
||||
public FontScaleService()
|
||||
: this(WindowsTextScale.Read, static () => System.Windows.Application.Current?.Resources)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewrites the resources <paramref name="resources"/> returns (none: nothing to do), with the text
|
||||
/// size factor <paramref name="readTextScale"/> returns.
|
||||
/// </summary>
|
||||
public FontScaleService(Func<double> readTextScale, Func<ResourceDictionary?> resources)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(readTextScale);
|
||||
ArgumentNullException.ThrowIfNull(resources);
|
||||
_readTextScale = readTextScale;
|
||||
_resources = resources;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Apply(FontScale scale)
|
||||
{
|
||||
double body = scale switch
|
||||
_scale = scale;
|
||||
_textScale = _readTextScale();
|
||||
Subscribe();
|
||||
ApplyResources();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Re-reads Windows' text size and rescales only when it changed: when Windows reports a
|
||||
/// preference change, and when the app comes back to the foreground.
|
||||
/// </summary>
|
||||
public void Refresh()
|
||||
{
|
||||
var factor = _readTextScale();
|
||||
if (Math.Abs(factor - _textScale) < 0.001)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_textScale = factor;
|
||||
ApplyResources();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() => Unsubscribe();
|
||||
|
||||
/// <summary>Pure: the body font size for a choice and Windows' text size factor.</summary>
|
||||
public static double BodySize(FontScale scale, double textScale)
|
||||
{
|
||||
double baseSize = scale switch
|
||||
{
|
||||
FontScale.Small => 12d,
|
||||
FontScale.Large => 16d,
|
||||
_ => 14d,
|
||||
};
|
||||
|
||||
if (System.Windows.Application.Current is not { } app)
|
||||
return Math.Round(baseSize * WindowsTextScale.Clamp(textScale), 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pure: the navigation pane's open width for a body font size. Its labels fit the usual width up
|
||||
/// to one and a half times the Medium size; beyond that the pane widens with the text, so "Command
|
||||
/// catalog" and the category names are not cut off at the largest Windows text sizes.
|
||||
/// </summary>
|
||||
public static double NavigationPaneWidth(double bodySize)
|
||||
=> Math.Round(PaneWidth * Math.Max(1d, bodySize / 14d * 2d / 3d));
|
||||
|
||||
private void ApplyResources()
|
||||
{
|
||||
if (_resources() is not { } resources)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var resources = app.Resources;
|
||||
var body = BodySize(_scale, _textScale);
|
||||
resources[ResourceKey] = body;
|
||||
resources["ControlContentThemeFontSize"] = body;
|
||||
resources["AppFontSizeCaption"] = body - 2;
|
||||
resources["AppFontSizeSubtitle"] = Math.Round(body * 10 / 7);
|
||||
resources["AppFontSizeTitle"] = body * 2;
|
||||
resources["AppFontSizeConsole"] = body - 1.5;
|
||||
resources[PaneWidthKey] = NavigationPaneWidth(body);
|
||||
}
|
||||
|
||||
private void Subscribe()
|
||||
{
|
||||
if (_subscribed || System.Windows.Application.Current is not { } app)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SystemEvents.UserPreferenceChanged += OnUserPreferenceChanged;
|
||||
app.Activated += OnAppActivated;
|
||||
_subscribed = true;
|
||||
}
|
||||
|
||||
private void Unsubscribe()
|
||||
{
|
||||
if (!_subscribed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SystemEvents.UserPreferenceChanged -= OnUserPreferenceChanged;
|
||||
if (System.Windows.Application.Current is { } app)
|
||||
{
|
||||
app.Activated -= OnAppActivated;
|
||||
}
|
||||
|
||||
_subscribed = false;
|
||||
}
|
||||
|
||||
// SystemEvents fires off the UI thread; the resources live on it.
|
||||
private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
|
||||
=> System.Windows.Application.Current?.Dispatcher.InvokeAsync(Refresh);
|
||||
|
||||
private void OnAppActivated(object? sender, EventArgs e) => Refresh();
|
||||
}
|
||||
@@ -34,10 +34,26 @@ public sealed class ThemeService : IThemeService, IDisposable
|
||||
updateAccent: true);
|
||||
}
|
||||
|
||||
if (System.Windows.Application.Current is { } app)
|
||||
{
|
||||
ApplyDimming(app.Resources, SystemParameters.HighContrast);
|
||||
}
|
||||
|
||||
// Keep listening in every mode: High Contrast can be switched on while the app runs.
|
||||
Subscribe();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dimmed text (list descriptions) and badge icons blend the colors under them, which a Windows
|
||||
/// contrast theme forbids: there they are drawn at full strength (see AppStyles.xaml).
|
||||
/// </summary>
|
||||
public static void ApplyDimming(ResourceDictionary resources, bool highContrast)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(resources);
|
||||
resources["AppDimOpacity"] = highContrast ? 1d : 0.78d;
|
||||
resources["AppBadgeOpacity"] = highContrast ? 1d : 0.75d;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() => Unsubscribe();
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
using System.IO;
|
||||
using System.Security;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace CommandForge.Desktop.Theming;
|
||||
|
||||
/// <summary>
|
||||
/// Windows' "Text size" accessibility setting (Settings › Accessibility › Text size, 100–225 %),
|
||||
/// which WPF does not apply by itself. Only read, never changed.
|
||||
/// </summary>
|
||||
public static class WindowsTextScale
|
||||
{
|
||||
/// <summary>Windows' default: no enlargement.</summary>
|
||||
public const double Minimum = 1.0;
|
||||
|
||||
/// <summary>The largest text size Windows offers (225 %).</summary>
|
||||
public const double Maximum = 2.25;
|
||||
|
||||
/// <summary>The current factor, or <see cref="Minimum"/> when the setting is unset or unreadable.</summary>
|
||||
public static double Read()
|
||||
{
|
||||
#if DEBUG
|
||||
// Lets a developer check layouts at large sizes without changing the Windows setting.
|
||||
if (double.TryParse(
|
||||
Environment.GetEnvironmentVariable("COMMANDFORGE_TEXT_SCALE"),
|
||||
System.Globalization.NumberStyles.Float,
|
||||
System.Globalization.CultureInfo.InvariantCulture,
|
||||
out var developerFactor))
|
||||
{
|
||||
return Clamp(developerFactor);
|
||||
}
|
||||
#endif
|
||||
try
|
||||
{
|
||||
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Accessibility");
|
||||
return FromRegistryValue(key?.GetValue("TextScaleFactor"));
|
||||
}
|
||||
catch (Exception ex) when (ex is SecurityException or UnauthorizedAccessException or IOException)
|
||||
{
|
||||
return Minimum;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Pure: the stored DWORD percentage (100–225) as a factor, clamped; anything else is 1.0.</summary>
|
||||
public static double FromRegistryValue(object? value) => value is int percent ? Clamp(percent / 100d) : Minimum;
|
||||
|
||||
/// <summary>Pure: keeps a factor within what Windows offers.</summary>
|
||||
public static double Clamp(double factor) => double.IsFinite(factor) ? Math.Clamp(factor, Minimum, Maximum) : Minimum;
|
||||
}
|
||||
@@ -38,12 +38,47 @@ public sealed partial class CommandItemViewModel : ObservableObject
|
||||
|
||||
/// <summary>Whether this command is pinned to Favorites (drives the star icon's filled/outline state).</summary>
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(AccessibleStatus))]
|
||||
private bool _isFavorite;
|
||||
|
||||
/// <summary>
|
||||
/// What a screen reader hears after the title (the row's UI Automation ItemStatus): the risk
|
||||
/// level and the badges a sighted user sees as a colored dot and icons.
|
||||
/// </summary>
|
||||
public string AccessibleStatus => StatusText(DangerLevel, RequiresAdmin, RequiresRestart, IsRevertable, IsFavorite);
|
||||
|
||||
/// <summary>Re-resolves the localized title/description (after a culture change).</summary>
|
||||
public void Refresh()
|
||||
{
|
||||
Title = Strings.Get(Command.TitleKey);
|
||||
Description = Strings.Get(Command.DescriptionKey);
|
||||
OnPropertyChanged(nameof(AccessibleStatus));
|
||||
}
|
||||
|
||||
/// <summary>Pure: "Caution, Requires admin, May require restart, Can be undone, Favorite".</summary>
|
||||
public static string StatusText(DangerLevel level, bool requiresAdmin, bool requiresRestart, bool revertable, bool favorite)
|
||||
{
|
||||
var parts = new List<string>(5) { Strings.Get($"Danger_{level}") };
|
||||
if (requiresAdmin)
|
||||
{
|
||||
parts.Add(Strings.Get("Detail_RequiresAdmin"));
|
||||
}
|
||||
|
||||
if (requiresRestart)
|
||||
{
|
||||
parts.Add(Strings.Get("Detail_MayRestart"));
|
||||
}
|
||||
|
||||
if (revertable)
|
||||
{
|
||||
parts.Add(Strings.Get("A11y_CanUndo"));
|
||||
}
|
||||
|
||||
if (favorite)
|
||||
{
|
||||
parts.Add(Strings.Get("A11y_Favorite"));
|
||||
}
|
||||
|
||||
return string.Join(", ", parts);
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,7 @@ public sealed partial class ExecutionViewModel : ObservableObject
|
||||
private readonly INotificationService _notifications;
|
||||
private readonly ILogger _log = Log.ForContext<ExecutionViewModel>();
|
||||
private CancellationTokenSource? _cancellation;
|
||||
private bool _droppedLinesAnnounced;
|
||||
|
||||
public ExecutionViewModel(
|
||||
RunCommandUseCase run,
|
||||
@@ -318,8 +319,10 @@ public sealed partial class ExecutionViewModel : ObservableObject
|
||||
private CancellationToken Begin()
|
||||
{
|
||||
OutputLines.Clear();
|
||||
_droppedLinesAnnounced = false;
|
||||
HasResult = false;
|
||||
IsRunning = true;
|
||||
_notifications.Announce(string.Format(CultureInfo.CurrentCulture, Strings.Get("A11y_RunStarted"), LastRunTitle));
|
||||
_cancellation = new CancellationTokenSource();
|
||||
return _cancellation.Token;
|
||||
}
|
||||
@@ -340,6 +343,24 @@ public sealed partial class ExecutionViewModel : ObservableObject
|
||||
RequiresRestart = result.RequiresRestart;
|
||||
DurationText = FormatDuration(result.Duration);
|
||||
HasResult = true;
|
||||
|
||||
// The console shows the result; screen readers hear it (WPF raises nothing for it by itself).
|
||||
_notifications.Announce(ResultAnnouncement(LastRunTitle, StatusText, ExitCode, DurationText, RequiresRestart), important: true);
|
||||
}
|
||||
|
||||
/// <summary>Pure: what a screen reader hears when a run ends ("Flush DNS: Succeeded. Exit code 0, 0.4 s.").</summary>
|
||||
public static string ResultAnnouncement(string title, string status, int exitCode, string duration, bool requiresRestart)
|
||||
{
|
||||
var text = string.Format(CultureInfo.CurrentCulture, Strings.Get("A11y_RunResult"), title, status, exitCode, duration);
|
||||
return requiresRestart ? text + " " + Strings.Get("A11y_RestartRequired") : text;
|
||||
}
|
||||
|
||||
partial void OnIsWaitingForElevationChanged(bool value)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
_notifications.Announce(Strings.Get("Console_WaitingForAdmin"));
|
||||
}
|
||||
}
|
||||
|
||||
private void LogSummary(CommandDefinition command, ExecutionResult result)
|
||||
@@ -428,6 +449,13 @@ public sealed partial class ExecutionViewModel : ObservableObject
|
||||
{
|
||||
OnPropertyChanged(nameof(HasDroppedLines));
|
||||
OnPropertyChanged(nameof(DroppedLinesText));
|
||||
|
||||
// Once per run: the caption above the console appears silently otherwise.
|
||||
if (HasDroppedLines && !_droppedLinesAnnounced)
|
||||
{
|
||||
_droppedLinesAnnounced = true;
|
||||
_notifications.Announce(DroppedLinesText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -323,8 +323,15 @@ public sealed partial class MainViewModel : ObservableObject
|
||||
{
|
||||
Catalog.SelectCommandById(commandId);
|
||||
CurrentSection = ShellSection.Catalog;
|
||||
CommandOpened?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised after a command was opened in the catalog from elsewhere (Home, History, the palette),
|
||||
/// so the window can move keyboard focus to its row: the control that opened it is gone.
|
||||
/// </summary>
|
||||
public event EventHandler? CommandOpened;
|
||||
|
||||
private void OnSettingsChanged(object? sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(SettingsViewModel.AutoScrollConsole))
|
||||
|
||||
@@ -13,13 +13,23 @@ namespace CommandForge.Desktop.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// Drives the Report-a-bug dialog: shows auto-gathered environment, exports logs, and opens a
|
||||
/// prefilled GitHub issue. User-initiated only — nothing is sent automatically (Privacy).
|
||||
/// prefilled issue on the GitLab mirror. User-initiated only — nothing is sent automatically (Privacy).
|
||||
/// </summary>
|
||||
public sealed partial class ReportBugViewModel : ObservableObject
|
||||
{
|
||||
// Browsers and GitHub cap URL length; the body beyond this is left for the user to paste.
|
||||
// Browsers and servers cap URL length; the body beyond this is left for the user to paste.
|
||||
private const int MaxBodyCharsInUrl = 4000;
|
||||
|
||||
/// <summary>The issue template the report follows: .gitlab/issue_templates/Bug.md on the GitLab mirror.</summary>
|
||||
public const string BugReportTemplate = "Bug";
|
||||
|
||||
/// <summary>The checklist at the end of the Bug template, left for the reporter to tick.</summary>
|
||||
public static readonly string[] Confirmations =
|
||||
[
|
||||
"- [ ] I'm using the latest release.",
|
||||
"- [ ] This is not a security vulnerability (those go to " + ProductLinks.SecurityEmail + ").",
|
||||
];
|
||||
|
||||
private readonly ILogMaintenance _maintenance;
|
||||
private readonly IDialogService _dialogs;
|
||||
private readonly IFileDialogService _files;
|
||||
@@ -82,9 +92,55 @@ public sealed partial class ReportBugViewModel : ObservableObject
|
||||
|
||||
[RelayCommand]
|
||||
private void OpenIssue()
|
||||
=> _shell.TryOpen(BuildIssueUrl(
|
||||
BuildTitle(),
|
||||
AppVersion(),
|
||||
$"{RuntimeInformation.OSDescription} ({RuntimeInformation.OSArchitecture})",
|
||||
Description,
|
||||
_errorCode));
|
||||
|
||||
/// <summary>
|
||||
/// Pure: the address of a new issue on the GitLab mirror with its title and description filled
|
||||
/// in. The description is the Bug template (.gitlab/issue_templates/Bug.md) with its sections
|
||||
/// answered; GitLab shows it as is (a template picked in the URL would replace it).
|
||||
/// </summary>
|
||||
public static string BuildIssueUrl(string title, string appVersion, string windowsVersion, string? userDescription, string? errorCode)
|
||||
{
|
||||
var body = TruncateForUrl(BuildIssueBody(EnvironmentText, Description, _errorCode));
|
||||
_shell.TryOpen($"{ProductLinks.NewIssue}?title={Uri.EscapeDataString(BuildTitle())}&body={Uri.EscapeDataString(body)}");
|
||||
ArgumentNullException.ThrowIfNull(title);
|
||||
ArgumentNullException.ThrowIfNull(appVersion);
|
||||
ArgumentNullException.ThrowIfNull(windowsVersion);
|
||||
(string Field, string Value)[] fields =
|
||||
[
|
||||
("issue[title]", title),
|
||||
("issue[description]", BuildIssueBody(appVersion, windowsVersion, userDescription, errorCode)),
|
||||
];
|
||||
return ProductLinks.NewIssue + "?" + string.Join('&', fields.Select(field => Uri.EscapeDataString(field.Field) + "=" + Uri.EscapeDataString(field.Value)));
|
||||
}
|
||||
|
||||
/// <summary>Pure: the Bug template's sections, in its order, with what the app knows filled in.</summary>
|
||||
public static string BuildIssueBody(string appVersion, string windowsVersion, string? userDescription, string? errorCode)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(appVersion);
|
||||
ArgumentNullException.ThrowIfNull(windowsVersion);
|
||||
string[] lines =
|
||||
[
|
||||
"## What happened?", string.Empty, TruncateForUrl(BuildWhatHappened(userDescription, errorCode)), string.Empty,
|
||||
"## Steps to reproduce", string.Empty, "1. ", string.Empty,
|
||||
"## CommandForge version", string.Empty, appVersion, string.Empty,
|
||||
"## Windows version / build", string.Empty, windowsVersion, string.Empty,
|
||||
"## Logs (optional)", string.Empty, "_Attach the exported .zip here. Review its contents first — it may contain command output._", string.Empty,
|
||||
"## Confirmations", string.Empty, .. Confirmations,
|
||||
];
|
||||
return string.Join('\n', lines);
|
||||
}
|
||||
|
||||
/// <summary>Pure: the form's "What happened?" text: the user's words (or a prompt) and a crash's error code.</summary>
|
||||
public static string BuildWhatHappened(string? userDescription, string? errorCode)
|
||||
{
|
||||
var text = string.IsNullOrWhiteSpace(userDescription) ? "_Describe what happened._" : userDescription.Trim();
|
||||
return string.IsNullOrWhiteSpace(errorCode)
|
||||
? text
|
||||
: text + Environment.NewLine + Environment.NewLine + "Error code: " + errorCode;
|
||||
}
|
||||
|
||||
/// <summary>Pure: keeps a prefilled issue body within URL limits (a full stack trace can exceed them).</summary>
|
||||
@@ -109,29 +165,6 @@ public sealed partial class ReportBugViewModel : ObservableObject
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>Pure: assembles the GitHub issue body template (testable).</summary>
|
||||
public static string BuildIssueBody(string environment, string? userDescription, string? errorCode = null)
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
builder.AppendLine("## Description");
|
||||
builder.AppendLine(string.IsNullOrWhiteSpace(userDescription) ? "_Describe what happened._" : userDescription);
|
||||
builder.AppendLine();
|
||||
if (!string.IsNullOrWhiteSpace(errorCode))
|
||||
{
|
||||
builder.AppendLine($"Error code: {errorCode}");
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
builder.AppendLine("## Environment");
|
||||
builder.AppendLine("```");
|
||||
builder.Append(environment);
|
||||
builder.AppendLine("```");
|
||||
builder.AppendLine();
|
||||
builder.AppendLine("## Logs");
|
||||
builder.AppendLine("_Attach the exported .zip here. Review its contents first — it may contain command output._");
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
private string BuildTitle() => _errorCode is null ? "[Bug] " : $"[Crash {_errorCode}] ";
|
||||
|
||||
private static string AppVersion()
|
||||
|
||||
@@ -195,7 +195,7 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
[RelayCommand]
|
||||
private async Task CheckNowAsync()
|
||||
{
|
||||
// Only a check that actually reached GitHub counts as "last checked".
|
||||
// Only a check that actually reached the update feed counts as "last checked".
|
||||
if (await _updateDialog.ShowAsync(startedFromStartup: false))
|
||||
{
|
||||
LastCheckedText = DateTime.Now.ToString("g", CultureInfo.CurrentCulture);
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace CommandForge.Desktop.ViewModels;
|
||||
/// <summary>The state of the modal update flow.</summary>
|
||||
public enum UpdateUiState
|
||||
{
|
||||
/// <summary>Contacting GitHub Releases.</summary>
|
||||
/// <summary>Contacting the update feed.</summary>
|
||||
Checking,
|
||||
|
||||
/// <summary>Already on the latest version.</summary>
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:ctl="clr-namespace:CommandForge.Desktop.Controls"
|
||||
xmlns:res="clr-namespace:CommandForge.Desktop.Resources"
|
||||
xmlns:app="clr-namespace:CommandForge.Application;assembly=CommandForge.Application">
|
||||
<!-- Shown in an in-window dialog: name, version, privacy note, links, contact addresses. -->
|
||||
<StackPanel MinWidth="380" MaxWidth="520">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:SymbolIcon Symbol="WindowConsole20" FontSize="32" Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
||||
<ctl:DecorativeIcon Symbol="WindowConsole20" FontSize="32" Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
||||
VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{res:Loc AppTitle}" Style="{StaticResource SubtitleTextStyle}" />
|
||||
@@ -19,9 +20,10 @@
|
||||
|
||||
<WrapPanel Margin="0,16,0,0">
|
||||
<ui:HyperlinkButton Content="{res:Loc Settings_License}" Click="OnLicenseClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Settings_GitHub}" Click="OnGitHubClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Settings_SourceCode}" Click="OnSourceCodeClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Menu_UserGuide}" Click="OnUserGuideClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Menu_Terms}" Click="OnTermsClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc About_Accessibility}" Click="OnAccessibilityClick" Margin="0,0,8,4" />
|
||||
</WrapPanel>
|
||||
|
||||
<TextBlock Text="{res:Loc About_Contact}" Style="{StaticResource BodyStrongTextStyle}" Margin="0,12,0,4" />
|
||||
@@ -33,15 +35,20 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{res:Loc About_SecurityContact}" Style="{StaticResource SecondaryTextStyle}"
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{res:Loc About_SecurityContact}" Style="{StaticResource SecondaryTextStyle}"
|
||||
VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||
<ui:HyperlinkButton Grid.Column="1" Content="{x:Static app:ProductLinks.SecurityEmail}" Click="OnSecurityEmailClick"
|
||||
<ui:HyperlinkButton Grid.Row="0" Grid.Column="1" Content="{x:Static app:ProductLinks.SecurityEmail}" Click="OnSecurityEmailClick"
|
||||
HorizontalAlignment="Left" AutomationProperties.HelpText="{res:Loc About_SecurityContact}" />
|
||||
<TextBlock Grid.Row="1" Text="{res:Loc About_CodeContact}" Style="{StaticResource SecondaryTextStyle}"
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{res:Loc About_CodeContact}" Style="{StaticResource SecondaryTextStyle}"
|
||||
VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||
<ui:HyperlinkButton Grid.Row="1" Grid.Column="1" Content="{x:Static app:ProductLinks.CodeEmail}" Click="OnCodeEmailClick"
|
||||
HorizontalAlignment="Left" AutomationProperties.HelpText="{res:Loc About_CodeContact}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{res:Loc About_AccessibilityContact}" Style="{StaticResource SecondaryTextStyle}"
|
||||
VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||
<ui:HyperlinkButton Grid.Row="2" Grid.Column="1" Content="{x:Static app:ProductLinks.AccessibilityEmail}" Click="OnAccessibilityEmailClick"
|
||||
HorizontalAlignment="Left" AutomationProperties.HelpText="{res:Loc About_AccessibilityContact}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -28,13 +28,17 @@ public partial class AboutView : UserControl
|
||||
|
||||
private void OnLicenseClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.License);
|
||||
|
||||
private void OnGitHubClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.Repository);
|
||||
private void OnSourceCodeClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.Repository);
|
||||
|
||||
private void OnUserGuideClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.UserGuide);
|
||||
|
||||
private void OnTermsClick(object sender, RoutedEventArgs e) => _showTerms();
|
||||
|
||||
private void OnAccessibilityClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.AccessibilityStatement);
|
||||
|
||||
private void OnSecurityEmailClick(object sender, RoutedEventArgs e) => _shell.TryOpen("mailto:" + ProductLinks.SecurityEmail);
|
||||
|
||||
private void OnCodeEmailClick(object sender, RoutedEventArgs e) => _shell.TryOpen("mailto:" + ProductLinks.CodeEmail);
|
||||
|
||||
private void OnAccessibilityEmailClick(object sender, RoutedEventArgs e) => _shell.TryOpen("mailto:" + ProductLinks.AccessibilityEmail);
|
||||
}
|
||||
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user