36 Commits

Author SHA1 Message Date
Prime Build 03872a39b8 fix: recover saved-rule monitoring after sleep (v1.7.9) (#96)
Renew WMI subscriptions after resume, unlock, watcher failure or prolonged silence, then rescan processes and reapply saved rules. Retry unavailable executable paths, initialize diagnostics before monitoring, and use the shared startup path. Include regression tests and v1.7.9 release metadata. Related to #95; keep open pending reporter confirmation.
2026-11-11 15:11:56 +01:00
PrimeBuild-pc 426cfab5ed chore: release 1.7.8 2026-10-22 11:32:12 +02:00
PrimeBuild-pc 940d83ca64 chore: release 1.7.8-beta.2 2026-10-22 10:54:37 +02:00
PrimeBuild-pc 1274315f7e fix: installer moves an old install only when no junction is on its path
The old folder outside Program Files may be user-writable; replaced by a junction, the admin
deletes would land elsewhere. The old exe is deleted with retries (a copy still closing after an
in-app update holds it), and the other files go only once the exe is gone.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 9c364a4506 feat: autostart for portable copies through the official installer, installs always in Program Files
- A portable copy that turns on autostart now offers to download, verify and
  install the official version through the update path (checksum required,
  admin-only folder); it never downgrades. The installed copy turns autostart
  on at its first start when the setting asks for it, after the stale-task
  cleanup, so it also self-heals a removed task.
- The installer no longer asks for a folder: always Program Files, the only
  place a non-admin program cannot replace the elevated exe. Installs in another
  folder move there on upgrade; only ThreadPilot's own files are removed from
  the old folder (the old uninstaller is not run: it deletes the user's settings).

Verified in Windows Sandbox: old install in C:\Apps moved to Program Files,
user file and settings kept, the installed app registered both tasks itself.
2026-10-22 10:54:37 +02:00
Prime Build 2665d2be9f feat: release experimental Game Boost preview 1.7.8-beta.1
Restore the complete local Game Boost/runtime topology work from 6c36ea6, including Activity diagnostics, while preserving the stable 1.7.7 release and channel guards. Preview notes document pending dual-CCD Ryzen/X3D, Intel hybrid, benchmarks and anti-cheat validation, with tester instructions.
2026-10-16 12:09:56 +02:00
Prime Build 9a4baba19a feat: release 1.7.7 stable without experimental Game Boost
* feat: back up persistent rules and resolve rule precedence deterministically

- Configuration export now includes persistent process rules (schema 3.0),
  stays compatible with 2.0 bundles, validates before writing, previews
  what an import replaces and rolls back on failure.
- Matching rules apply broad-to-specific (name, wildcard path, exact path,
  then most recently edited), shared by the engine and the process summary,
  which now lists the apply order and flags conflicting values.
- Localized the new strings in all seven languages.

* feat: clearer process and rule editors

- Process details: CPU, memory and I/O priority pickers with an explicit
  Apply, undo of the last manual priority change (guarded against reused
  PIDs), adaptive side/bottom details panel.
- Manual process control stays available while automation is paused, with
  a persistent notice instead of an overlay.
- Saved-rule editor stages all edits (including the core mask) and saves
  them together, showing pending changes.
- Localized the new strings in all seven languages.

* fix: one save path for a saved rule's cores

The rules editor's core mask went through a new update path that reported
success without saving when no affinity payload was built, and kept a
legacy mask next to a CPU selection. Merge it with the old single-purpose
method (now unused), keep its checks, and localize the undo message.

* feat: per-process efficiency mode (EcoQoS) for live processes and rules

Closes #66.

- Native: SetProcessInformation/GetProcessInformation with
  ProcessPowerThrottling (EXECUTION_SPEED), three states: Windows decides,
  On (EcoQoS), Off (never throttle / HighQoS).
- Process tab: context menu entries, a picker with Apply in the details
  panel, current state in the summary, undo of the last change, included
  when saving current settings as a rule (only if explicitly set).
- Rules: EfficiencyMode + ApplyEfficiencyModeOnStart, applied by the rules
  engine, editable in the saved-rule editor, validated on import and part
  of conflict detection.
- The summary flags when the global Power Throttling tweak voids it. CPU
  priority is left alone, unlike Task Manager's efficiency mode.
- Localized in all seven languages.

* chore: keep CRLF line endings in SelectedProcessSummaryViewModel

* feat: clearer navigation, process page and rules editor

- Navigation pane open with short labels instead of seven bare icons.
- Processes: one toolbar row (search with placeholder, Filters and
  Columns menus, sort, refresh); details split into Process, Priority,
  CPU cores and Rule cards; pickers start from the process's current
  values and stay empty when a value cannot be read; help paragraphs
  moved into tooltips; core picker always visible.
- Rules: process rules first, clearer tab names, localized choices in the
  saved-rule editor instead of internal enum names.
- Shorter page titles and subtitles in all seven languages; removed the
  strings this made unused.

No data format changes.

* feat: settings and tweaks as Windows 11 rows, localized rule list

- Settings: one column of rows (what it is on the left, its switch on the
  right), most used sections first, Save as the primary action.
- Tweaks: one tweak per row with its status dot and switch.
- Rule list: 'Applies' and 'Mode' columns use the same localized labels as
  the editor and refresh on language change.
- Removed 76 strings no code referenced, from all seven languages.

* fix: issues found testing the beta in a clean Windows 11 VM

- Process counter could show more visible processes than the total
  ('157 / 151'): the batch total was a snapshot from the first load.
- Narrow windows (or 150% scaling): toolbar buttons move under the search
  box instead of squeezing it to a few letters.
- Rules list keeps the 'Applies' column readable when narrow.
- Settings status message gets its own line instead of being cut.

Tested in a Hyper-V Windows 11 VM: clean install, upgrade, uninstall,
light and dark theme, 100% and 150% scaling.

* feat: remember layout choices; Windows 11 toggles in Tweaks

- The navigation pane, window size/position/maximized state, and the
  process list filters, sort and columns now survive a restart. They live
  in ui-state.json, apart from settings.json, so they never mark the
  Settings page as unsaved or travel in exported configurations. A corrupt
  file falls back to defaults; tests write to a temp file.
- Fixes the pane re-opening on every start (it was hard-coded open).
- Tweaks use a native-looking Windows 11 switch (40x20 track, sliding
  thumb) with On/Off written beside it.
- New test: every on/off setting survives save and reload.

* docs: handoff for the 1.7.7 PR stack and beta test

* fix: P/E cores from the highest EfficiencyClass, AMD CCDs from real L3 groups

The legacy topology treated the lowest EfficiencyClass as the performance
core, swapping P- and E-cores on hybrid Intel CPUs. AMD CCDs were guessed
as 8 cores each, which split 6+6 parts (7900X3D, 9900X3D) into 8+4; they now
come from the L3 groups Windows reports, with the guess kept only as a
fallback. The topology snapshot also keeps each L3 group's size.

* feat: Game Boost, CPU Sets for the game and selected background apps

While a detected game runs, Game Boost sets process default CPU Sets from
the CPU topology: on AMD X3D with one larger L3 the game goes to the V-Cache
CCD, on Intel hybrid CPUs to the P-cores, and selected background apps
(browsers, sync clients, updaters, launchers) to the other cores. On dual-CCD
parts with equal L3 only the background moves, unless Isolation mode also
keeps the game on CCD0. Single-L3 and unreadable topologies are left to
Windows. Above Normal priority for the game is optional; never High.

Each change is written to a journal before it is made and undone when the
game exits, Game Boost is turned off or ThreadPilot closes, and on the next
start after a crash. Only values still exactly as Game Boost set them are
restored, never one a user rule or a manual change has taken over since.
Persistent rules and Game Boost share one apply gate, and a rule always
wins over Game Boost for the setting it covers.

The switch, mode and lists are on the Tweaks page, off by default, and take
effect without a restart.

* fix: Game Boost background entries with a full path never matched

The background list compared full-path entries against an empty path, so
only bare process names worked. Found by a new integration test that runs
the real services on two copies of PING.EXE: CPU Sets and priority are set
and read back through Windows, removed when Game Boost is turned off, and
undone from the journal after a simulated crash. The topology is simulated
from this machine's CPU Set IDs, so the test also runs on CPUs where Game
Boost would not act; it skips itself below 8 cores.

* feat: report Game Boost sessions and restore results in Activity

* test: diagnose EcoQoS read failures on Windows Server

* chore: prepare 1.7.7-beta.2 and keep prereleases out of stable channels

* test: use native full-query access mask in EcoQoS diagnostic

* docs: update beta handoff and prerelease publication policy

* ci: run native EcoQoS tests on a Windows 11-era kernel

Windows Server 2022 build 20348 rejects GetProcessInformation(ProcessPowerThrottling) with ERROR_INVALID_PARAMETER (87), with both limited and full query handles. Windows 11 local tests pass. Use Server 2025 for CI/release tests and smoke testing; keep the real round-trip assertions, remove temporary probes.

* test: lock beta publication and native runner contracts

* chore: separate stable 1.7.7 from experimental Game Boost

Stable retains the validated EcoQoS/rules/UI stack. Preserve the complete local Game Boost implementation at ef2ec24 for the separate 1.7.8-beta.1 prerelease; no experimental Game Boost/topology changes ship in stable. Keep channel-aware publication and Windows 11-era native CI tests.
2026-10-16 12:03:54 +02:00
Prime Build 5889e36de7 chore: prepare v1.7.6 release (#64)
Release metadata and notes for localized power-plan parsing (#59) and wildcard executable paths (#63).
2026-09-29 22:41:13 +02:00
Prime Build aa73d91d8b chore: prepare v1.7.5 release 2026-09-23 19:15:28 +02:00
PrimeBuild-pc de40640a20 chore: bump to 1.7.4
1.7.3 is already tagged and released, so this work needs its own version.
The packaging test pins the release version in three places on purpose, which
is what caught the two spots a blind search-and-replace missed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 00:18:52 +02:00
PrimeBuild-pc c8826547e2 bug fix v1.7.3 2026-08-26 23:38:13 +02:00
PrimeBuild-pc 7559b4af5a fix: migrate upgraded profiles off Automatic and say so (1.7.2)
v1.7.1 changed the shipped default CPU assignment mode to AffinityMask because
Automatic applies only Windows CPU Sets, a soft scheduling preference that
leaves the affinity mask in Task Manager unchanged. A new default only reaches a
profile that has no stored value, so every upgrading user kept Automatic and
still saw an affinity feature that appeared to do nothing. Confirmed against the
published 1.7.1 build: a fresh profile started on AffinityMask, an existing one
stayed on Automatic.

CpuAssignmentModeMigrationPolicy moves a stored Automatic to AffinityMask once
per profile and records that it ran. Two flags are needed, not one: without the
"seen" flag a user who closes the app before acknowledging the change would
never learn of it, and without the "migrated" flag a later deliberate return to
Automatic would be undone on the next launch. Both cases are covered by tests.

The change is announced through an overlay modelled on the existing startup
suggestion, so it is the app's own dialog rather than a system message box, and
it is translated into all seven supported languages. It is queued rather than
stacked when the startup suggestion is already up, and takes keyboard focus.

Persistence is deliberately non-fatal: a failed write is retried on the next
launch, where previously it would have fallen into the load handler's catch and
replaced the profile just loaded with defaults, silently swallowing the notice.
An out-of-range stored mode now repairs to the shipped default instead of
Automatic, so corrupt data is not reported back to the user as a choice they
made.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AhS1xyuMPFvxrojERQ4NuY
2026-08-26 18:48:01 +02:00
PrimeBuild-pc a1a72aae49 feat: read-only CPU core chips, labelled tweak toggles, and 1.7.1
The per-CPU cells in the Advanced Affinity Picker were rendered as CheckBoxes
while being Mode=OneWay and IsHitTestVisible="False", so users tried to click
them and concluded the affinity feature was broken. They are now Border chips
with no tick box, no hover and no focus, using the same brushes the Masks tab
uses for its editable CPU tiles. The CheckBox carried a CheckBoxAutomationPeer
even when non-interactive, so the chip publishes an accessible name and reports
selected, not selected, or unavailable through AutomationProperties.ItemStatus
rather than losing that state to a bare Border.

The system tweaks list used ui:ToggleSwitch, which renders 40x20 with no label
and reads as decoration on a dense list. It is replaced by a labelled pill that
states ON or OFF inside the track. Thumb and label are docked rather than
stacked and the track uses MinWidth, so a longer localized label (ru "ВЫКЛ")
widens the pill instead of sliding under the thumb; the thumb rests on a
DockPanel.Dock setter rather than a storyboard, so a toggle that starts checked
draws correctly instead of waiting for an animation to finish.

Also corrects the read-only hint, which still called the chips checkboxes, in
all seven locales, and bumps the version to 1.7.1 across the csproj, app
manifest, both Inno scripts, the WiX definition, the Chocolatey nuspec, the
build scripts, sonar properties, and the packaging metadata test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AhS1xyuMPFvxrojERQ4NuY
2026-08-26 14:26:11 +02:00
Prime Build d730260541 Prepare ThreadPilot 1.7.0 gaming and signing release (#51) 2026-08-13 01:50:48 +02:00
PrimeBuild-pc 7381a68dbd Release ThreadPilot 1.6.0 CPU assignment modes 2026-08-12 14:58:23 +02:00
Prime Build 0d0d66206c Prepare release v1.5.3 (#49)
Synchronizes project, assembly, installer, package, build-script, changelog, release-note, and quality metadata for ThreadPilot 1.5.3. Local release packaging and the full CI/CodeQL checks passed.
2026-08-12 01:11:43 +02:00
Prime Build c9fe6f04d6 chore: prepare release 1.5.2 (#44) 2026-08-03 18:54:00 +02:00
PrimeBuild-pc 9f7ba5e4af Fix persistent automation monitoring preference 2026-08-03 17:38:45 +02:00
Prime Build 8941666db3 Prepare v1.5.0 release (#41)
Bump all release metadata to 1.5.0 and add concise changelog and release notes for multilingual support, Windows 11 tweak corrections, and one-click updates.
2026-08-01 13:59:49 +02:00
Prime Build 1540aeb7be Polish Windows 11 tweaks and add one-click updates (#40)
Verify persisted Windows tweak state on startup, modernize selection styling, and make in-app updates check every launch, install automatically after consent, preserve settings, and relaunch ThreadPilot.
2026-08-01 13:50:11 +02:00
Prime Build a5106d80e3 chore: prepare v1.4.4 release (#37) 2026-07-12 09:05:05 +02:00
Prime Build 58c89907a5 Add new bundled power plans (#34) 2026-07-11 20:28:47 +02:00
Prime Build fbfe010fb0 Fix persistent priority reversion after process startup (#33) 2026-07-11 19:17:24 +02:00
PrimeBuild-pc c4f31923d7 Prepare v1.4.1 release 2026-06-24 18:27:08 +02:00
Prime Build 12feeafb77 Prepare v1.4.0 release (#29)
## Summary

Prepares the v1.4.0 release after the safe in-app updater feature merge.

## Changes

- Bumps project/package/installer metadata from 1.3.1 to 1.4.0.
- Updates changelog and release notes.
- Adds v1.4.0 release notes.
- Updates packaging examples where needed.

## Release highlights

- Safe in-app updater.
- Manual update checks from Settings.
- Optional background update checks with a default 7-day interval.
- Explicit user confirmation before installing updates.
- SHA256 verification when release checksums are available.
- Best-effort Authenticode verification.
- User data preservation during update.

## Validation

- `dotnet build ThreadPilot_1.sln`: passed
- `dotnet test ThreadPilot_1.sln`: passed
2026-06-07 12:27:19 +02:00
Prime Build c058fef7d5 Fix v1.3.1 localization and installer cleanup (#26)
## Summary

Fixes the incomplete Simplified Chinese localization shipped in v1.3.0 and prepares v1.3.1.

## Changes

- Completed zh-CN localization coverage across the main UI.
- Added/updated localization keys for primary views, tray/status text, notifications, and settings.
- Kept en-US as the default language.
- Updated version metadata to 1.3.1.
- Changed installer display name to ThreadPilot while keeping version metadata separate.
- Added guarded cleanup for obsolete ThreadPilot 0.1.0-beta uninstall entry.
- Improved uninstall cleanup for ThreadPilot AppData, startup task, and HKCU Run entry.
- Added localization and packaging metadata tests.

## Validation

- dotnet build ThreadPilot_1.sln: passed, 0 warnings
- dotnet test ThreadPilot_1.sln: passed, 524 tests

## Safety

- No change to elevation behavior.
- No change to affinity/process control behavior.
- No change to power plan or system tweak behavior.
- Normal install/update preserves user settings.
- Full uninstall removes ThreadPilot-owned AppData for the uninstalling user.
2026-06-07 04:33:51 +02:00
Prime Build edd6808c7d Prepare v1.3.0 release (#25) 2026-06-06 18:25:45 +02:00
Prime Build 91287c9860 Fix startup binding and prepare v1.2.0 pre-release (#22)
* Fix startup binding and prep v1.2.0

* Polish v1.2.0 validation UX

* Fix final v1.2.0 validation polish

* Make Activity Logs a ThreadPilot audit trail

* Fix high scheduling registry value

* Polish process list and automation settings UX

* Fix process context menu separator styling

* Theme process context menu visuals

* Stabilize process context menu styling

* Remove process menu icon gutter

* Polish startup and idle process refresh

* Finalize PR22 release polish
2026-05-23 14:28:24 +02:00
PrimeBuild-pc fbced16e56 Prepare v1.1.3 release metadata 2026-05-09 23:32:53 +02:00
PrimeBuild-pc d0f38aa914 Fix package manager release manifests 2026-05-09 12:02:36 +02:00
PrimeBuild-pc 0639e0858c chore(release): prepare v1.1.2 release alignment 2026-04-21 01:12:41 +02:00
PrimeBuild-pc 8adea37188 Make installers unattended; add release asset validation
Switch the release job runner to ubuntu-latest and add a validation step to ensure required release artifacts exist (installer .exe, package .zip, SHA256SUMS, winget manifests, and SBOM). Update Installer/setup.iss to disable the Ready page and remove the post-install auto-launch so package-manager installs remain unattended. Improve Chocolatey scripts: add additional silent flags and include common restart exit codes (3010, 1641) for both install and uninstall; make uninstall parsing robust by extracting the executable and base args from the registry UninstallString before invoking Uninstall-ChocolateyPackage.
2026-04-20 22:26:56 +02:00
PrimeBuild-pc 25ecb54646 Make Windows 11 first-class, add security policy
Update project to emphasize Windows 11 support and add a security policy, plus small runtime and packaging fixes.

Changes:
- README: simplify Windows badge and update requirements to Windows 11 (Build 22000+).
- Installer (setup.iss): set MinVersion=10.0.22000.
- app.manifest: remove legacy Windows supportedOS IDs and keep PerMonitorV2 DPI setting.
- docs/TROUBLESHOOTING.md: remove Windows 10-specific startup troubleshooting (Windows 11-first messaging).
- Add SECURITY.md pointing to docs/SECURITY.md for the full policy and disclosure process.
- .gitignore: ignore FINAL_RELEASE_PLAN.md and RELEASE_PLAN.md.
- Services/SecurityService.cs: introduce MaxLogTokenLength constant and replace hard-coded 200 when truncating log tokens.
- App.xaml.cs: await settingsService.LoadSettingsAsync() with ConfigureAwait(false) and adjust service activations.
2026-04-16 00:53:12 +02:00
PrimeBuild-pc 275ac72fa9 Add installer build script, docs; tweak UI/theme
Add a PowerShell installer builder (build/build-installer.ps1) and a pre-tag release checklist (docs/plans/PRE_TAG_RELEASE_CHECKLIST.md); update packaging docs to recommend the new script and document Inno Setup theming. Make Inno Setup scripts (Installer/setup.iss and Installer/Installer.iss) more configurable by introducing MyWizardStyle and guarding MyAppBuildDir so WizardStyle can use dynamic Windows theming. Persist system theme preference when the user has no explicit preference (App.xaml.cs and MainWindow.xaml.cs) and switch to IsHitTestVisible for the performance-overlay blur to avoid disabling input globally. Prevent closing the app while the performance intro is visible with a user-facing message. Minor .gitignore cleanup and packaging text updates.
2026-04-15 02:25:36 +02:00
PrimeBuild-pc 1ab85b21bd Release 1.1.1: installer, elevation & onboarding
Bump release to v1.1.1 and add release/build packaging, installer and onboarding enhancements. Key changes:

- Version bump across csproj, README and release assets to 1.1.1.
- CI/workflow: copy bundled Powerplans into single-file output, install Inno Setup, build Inno Setup installer, include installer artifacts in GitHub release, and stage unified package zips with uninstall/license files.
- Installer: update InstallScript (setup.iss) to point to staged artifacts, include Powerplans folder, and output installer to artifacts/release/installer.
- App startup/elevation: requireAdministrator manifest and App.xaml.cs now requests elevation early, terminating non-elevated instance when elevation is requested/declined.
- UX: add Performance first-run onboarding overlay (modal with blurred background), updated loading overlay visuals, and related MainWindow logic to show/hide intro and persist seen state.
- Settings & config: implement export/import configuration bundle (JSON) with Save/Open dialogs, add ReplaceConfigurationAsync and CloneConfiguration in association service, and adjust settings view labels.
- Power plan features: add PowerPlanService.AddCustomPowerPlanFileAsync and UI/command to add .pow files; adjust Import/Apply button labels.
- Performance tweaks: reduce power plan change delay from 1000ms to 250ms in config, models and viewmodels.
- Theme detection: improve ThemeService to resolve registry values and fallback to system theme helper.
- Misc: various logging/status improvements, packaging script fixes (build-release/build-msix), and added package-release-zips script.

These changes prepare the project for a formal 1.1.1 release with installer distribution, improved elevation handling and onboarding, plus enhanced import/export and custom power plan support.
2026-04-14 03:22:06 +02:00
PrimeBuild-pc 3d00d00cb0 chore: safe root cleanup phase 1 - Refactor .gitignore (più leggibile + pattern moderni) - Move build scripts → build/ - Move installer → Installer/ - Move ico.ico and Powerplans → assets/ - Move TRADEMARK.md → docs/legal/TRADEMARK.md (with root bridge) - Update all internal references (csproj, XAML, C#, .iss, .ps1, docs) - Verified: restore + build + test + publish (SingleFile + MSIX) OK" 2026-04-13 12:39:05 +02:00