107 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 d2ecbccb83 chore: remove internal working notes, stale manifests and unused scripts
Drop the Italian planning/handoff notes, dated release logs and checklists,
old winget 1.1.x manifests (generated at release time now), empty chocolatey
files, unused Sonar config, the unused Installer.iss/WiX scripts and one-off
maintenance scripts. Rewrite docs/README.md as an index of files that exist
and update the supported-versions table.
2026-10-22 12:46:52 +02:00
PrimeBuild-pc 426cfab5ed chore: release 1.7.8 2026-10-22 11:32:12 +02:00
PrimeBuild-pc 88bb2ec1a9 fix: Game Boost no longer ignores a game that reuses a just-rejected PID for 30 s
The memory of a rejected foreground process was keyed by PID only; it now also compares the
process start time. Found by the independent Codex review.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 940d83ca64 chore: release 1.7.8-beta.2 2026-10-22 10:54:37 +02:00
PrimeBuild-pc a7f41a62de perf: size the process table in pixels instead of an Auto column
An Auto grid column re-measured the DataGrid at infinite width on every list refresh: with the
window open ThreadPilot used ~5.3% of a core instead of ~2.5% (ABBA A/B, 6 runs each). The width
is now the sum of the visible columns, recomputed only when a column or the window changes;
measured again at ~2.4%.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 0c33eee9de refactor: small cleanups from the final review
Game Boost StopAsync and Dispose reuse SyncTimer for the timer; the always-true
UpdateDownloadResult.ChecksumVerified and an unused using are gone. No behavior change.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc aa23a109d2 fix: portable autostart says why nothing was installed
On a preview build with prerelease updates off only the older stable release is found, and the
user saw only the generic "needs Program Files" warning; network and download errors were dropped
too. The reason is now added to the warning (new string in 7 languages).
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 6f84ead769 fix: delete update folders left in Windows\Temp by earlier updates
A successful update exits right after starting the installer, so its ~55 MB folder was never
removed. At elevated startup, folders older than a day are deleted, only when they are owned by
Administrators (a user cannot create those or change what is inside).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc e32a3e12dc fix: a leftover HKCU Run entry no longer counts as autostart
Windows does not start an admin-only exe from Run at logon, so the entry kept autostart off while
the setting showed it on and the startup repair skipped creating the scheduled task.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc af3812fb5a fix: in-app update closes through the graceful shutdown
Application.Shutdown ignored the window's cancel, so Game Boost, reset-on-exit and the default
power plan were never restored before the installer took over.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc ea62c08d81 fix: reset process changes on exit before the monitor stops tracking them
Stopping the process monitor untracks every process it changed, so the "reset on exit" step
that ran afterwards always found nothing to reset (default-on setting, broken since before 1.7.7).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 2af91100e5 fix: a Game Boost tick queued before stop or dispose no longer starts a session
Timer.Dispose does not wait for a callback already on the thread pool; such a tick could apply
changes after the shutdown restore and leave the game handle open.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 38377dd8ac fix: Game Boost keeps Above Normal on the game after a settings change during a session
ReapplyAsync put back the session's old process model, which still said AboveNormal after the
restore had set the game back to Normal, so the priority was not applied again.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc d1092891e4 fix: compare numeric prerelease parts as numbers so beta.10 is newer than beta.9 2026-10-22 10:54:37 +02:00
PrimeBuild-pc 4d8da05540 fix: reopen the main window maximized when it was closed maximized
App applied a fixed Normal state after MainWindow had restored the saved placement, so the
saved maximized flag never took effect (since 1.7.7).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 16cbe13a1e fix: process table sizes to its columns and the details panel takes the free width
In the wide layout the Priority column no longer stretches: the table is as wide as its visible
columns (capped so the details keep at least 400 px) and the details panel gets the rest. A wide
details panel shows Priority and CPU cores side by side, and the no-selection hint sits centered.
The narrow layout (< 960 px) is unchanged.
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
PrimeBuild-pc ced4f769f6 fix: hold the game with SYNCHRONIZE|QUERY_LIMITED only
Process.EnableRaisingEvents opens the game with PROCESS_ALL_ACCESS and the
session kept that handle for the whole game: exactly the kind of outside
handle anti-cheats scan for, and a protected (PPL) game refused it and fell
back to polling.

The game is now opened with only SYNCHRONIZE and
PROCESS_QUERY_LIMITED_INFORMATION; start time and CPU time come from
GetProcessTimes on that handle, and the exit wait is a thread-pool
registration on it, still checked with one zero wait first so a handle
stripped of SYNCHRONIZE falls back to polling. +1 native test (a protected
process can be held).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 604642598f perf: Game Boost holds the game open and rescans only listed names
During a session the game was looked up twice every 3 s (identity + CPU
time, each a GetProcessById and the identity a full process snapshot for
SessionId), and every 15 s a model was built for every process on the
machine to find a few listed background names.

- The game is held open for the session (Process + Exited): its exit ends
  the session at once, under the same lock as the tick; CPU time for the
  load sampling is read from the same handle. The identity is re-checked
  through the held handle, which also pins the PID.
- The handle is verified with one wait before the exit wait is registered,
  so a handle without SYNCHRONIZE (anti-cheat) falls into the polling
  fallback instead of failing on the runtime's wait thread. A denied or
  protected game keeps the previous polling.
- The rescan filters the GetProcesses snapshot by listed name before any
  model is built; exact paths are still checked afterwards.
- Session id read with ProcessIdToSessionId instead of Process.SessionId
  (a full snapshot per listed background process every 15 s).

Ownership, journal and restore unchanged. +8 tests (903/903).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc ac84382841 security: follow-ups from the validation pass
- The launch task is re-registered on every elevated start again (now in the
  background), so a changed definition or another admin never keeps a stale one.
- Admin-only folders are owned by Administrators when elevated, so the user
  cannot rewrite their DACL with UAC off or a non-default owner policy.
- The update provider trusts only folders it created itself.
- Game Boost does not remember a foreground process as not-a-game while its
  path is still unreadable.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc d86d7b1e8f security: close the remaining small gaps found by the audit
- Registry priority now writes IFEO\<exe>\PerfOptions\CpuPriorityClass, the value
  Windows reads (the old PriorityClass value did nothing and is cleaned up), and
  refuses an empty image name that would have targeted the IFEO root.
- Profile names must be plain file names, so they stay in the profiles folder.
- P/Invoke DLLs load from System32 only; explorer.exe is started by full path.
- The elevated restart passes arguments through ArgumentList (correct quoting).
- The single-instance mutex no longer crashes startup when another session owns it.
- Log size and retention are clamped and the size math is done in long.
- BinaryFormatter is disabled: the app only copies text to the clipboard.
- Two services registered but never resolved are no longer registered.
- build/install-threadpilot.ps1 verifies the installer against SHA256SUMS.txt.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 6506d4a65f perf: Game Boost idles when off and power plan switches spawn fewer powercfg
- The Game Boost timer runs only while Game Boost is on (off by default);
  turning it off still restores everything through ReapplyAsync.
- A foreground process just rejected as not-a-game is not rebuilt into a full
  process model every 3 s; it is looked at again after 30 s or on a settings
  change.
- Switching power plans reads one /list for the previous and target plans and
  reuses it after /setactive: 3 powercfg.exe starts instead of 5 (2 when
  duplicate prevention is off).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc d208117f9b perf: update the visible process list in place instead of replacing it
Every 5 s refresh built a new FilteredProcesses collection, so the grid rebuilt
all rows and dropped the sort picked from a column header. The filtered result
is now synced into the existing collection with remove/move/insert, which keeps
rows, selection and header sort (window-open idle CPU 3.0-3.5% -> 2.2% of a core).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc e8ef489c9f security: saved rules and tweak restores no longer trust their user-writable files
Rules load from %AppData%, which any program of the user can edit, but only the
priority path checked for protected processes; CPU Sets, memory and I/O priority
and EcoQoS went straight through. The rules engine now checks the live process
(critical-process list and PPL) before applying anything, and the list gains a
few more system processes. Driver tweak restores accept only the values the
tweak itself writes, and their backup file is written atomically.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 3a2af1c0e9 security: refuse an update whose release has no trusted SHA256SUMS.txt
The installer runs elevated and silent, yet a release without the checksum file
was installed unverified. The download now stops before fetching anything when
the checksum asset is missing or not hosted on GitHub.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc e9e5c39772 security: keep the task XML and update installer in admin-only folders
The elevated app wrote the scheduled-task definition and downloaded the update
installer into the user's %TEMP%, where a non-admin process can swap them (or
plant DLLs beside the installer) between the check and the elevated use. Both
now go into a fresh, unguessable folder under %SystemRoot%\Temp whose DACL
grants only Administrators and SYSTEM; users there cannot rename or delete
another account's folders.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 8070d1c31d security: register the no-UAC elevated tasks only for a Program Files install
ThreadPilot_Launch and ThreadPilot_Startup run with highest privileges and no
prompt, yet were bound to whichever copy last ran elevated, including portable
and dev folders any non-admin program can write to. Each elevated start now
deletes ThreadPilot tasks that point outside Program Files and registers them
only for an exe under Program Files, skipping the re-registration when the task
already points at this exe. Enabling autostart from a portable copy shows why
it is unavailable instead of a generic failure.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc bdff8c25f1 perf: stop the startup spinner animating forever after the overlay hides
The indeterminate ProgressRing kept WPF rendering every frame even when collapsed
(~25% of a core with the window open, ~2% in the tray). It now animates only while
visible. The SpinnerAnimation storyboard targeted a missing element, so its Begin()
threw and the 15 s timeout guard was never created; both are removed.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc cb0c5c3efb feat: Game Boost scheduler hints and dynamic CPU Set release
Game Boost now gives Windows hints as well as constraints, and adapts
the game's CPU Set to its load instead of applying it once:

- the game gets high QoS (power throttling off), on every CPU, so
  Windows never throttles it while it is not in the foreground;
- in Isolation the listed background apps get EcoQoS, also on CPUs
  where CPU Sets are not applied;
- a game that keeps its confined CPUs saturated has its CPU Set
  released so Windows can use every core, and confined again after a
  minute of low load (hysteresis, at most two releases per session).

Same ownership rules as CPU Sets: only values Windows still manages
are changed, user rules and the app's own QoS win, everything is
journaled and restored on exit, toggle and after a crash.

Efficiency mode writes now keep the process's other power-throttling
flags: Windows replaces the whole state on set, so the old write wiped
a timer-resolution opt-out set by the process 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
Seyedamin Mousavichashmi 70b7f6d193 fix: enable SeIncreaseBasePriorityPrivilege when setting High I/O priority (#65)
* fix: enable SeIncreaseBasePriorityPrivilege for high I/O priority and map privilege errors

* fix: scope SeIncreaseBasePriorityPrivilege and restore token state with reference counting

* test: add concurrent multi-threaded integration test for privilege scoping
2026-10-12 21:26:33 +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
Seyedamin Mousavichashmi c6f74a948f feat: support wildcard executable paths (#63)
Support case-insensitive * and ? matching for persistent process rules and power-plan associations while preserving exact-path behavior.
2026-09-29 22:13:42 +02:00
Nathan W a26c792e72 fix: parse localized power plan output (#59)
Fixes #58
2026-09-29 21:41:35 +02:00
Prime Build aa73d91d8b chore: prepare v1.7.5 release 2026-09-23 19:15:28 +02:00
Prime Build 2a2b7ca73b fix: keep system tweak switches in sync (#61)
Validated by the reporter on Windows 11. Fixes #60.
2026-09-23 18:56:29 +02:00
PrimeBuild-pc 15055cdb8c refactor: delete the CPU preset generator, which nothing resolved
CpuPresetGenerator was registered in dependency injection and never resolved:
no view model, no service, no view referenced it or CpuPreset. Around 700
lines including its tests, describing a feature that is not reachable and has
no caller to become reachable from.

It went unnoticed because DI registration looks like use. It is not: the
container will happily construct something nobody asks for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 00:43:52 +02:00
PrimeBuild-pc 9875f7cc4f refactor: delete ReviewRequired, keep the check, point it at saved rules
ReviewRequired was not merely unread - it had the wrong shape. It is a bit
persisted at save time recording a judgement that can only be made at load
time, against whatever CPU is present then. Three writers, no readers: the
mask path, MigrateProcessProfile (whose Save/Load Profile commands are bound
in no XAML), and CpuPresetGenerator (registered in DI with no consumers).

The field goes. The question it was asking does not, so ShouldRequireReview
stays and finally gets a caller - saved rules, which nothing compared against
the running machine. A rule pinning cores that no longer exist did not
announce itself; it failed at apply time through a path that reports it as the
process having exited. The Saved process rules tab now names those rules, and
their cores can be set again from a mask without leaving the page.

ShouldRequireReview no longer compares topology signatures by record equality.
That included fields which can differ between two readings of the same
machine, and a warning that fires on everything teaches people to ignore it.
It now compares what actually changes the meaning of "core 9": the chip and
the shape of it.

Old files keep the serialized flag; it is ignored on read and dropped on the
next save.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 00:43:52 +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 406352f38e feat: resize custom masks on a CPU change, and edit a rule's cores from Rules
Three loose ends from the 1.7.3 review.

Custom masks were flagged and left alone on a CPU change. Growing one is not a
judgement call - the CPUs that appeared were not part of a selection made
before they existed - and shrinking is safe while something is still selected,
so both now happen automatically. Two cases stay with the user: a mask that
would be left selecting nothing, and a mask a power plan association is using,
where a silent resize would change what that automation does without saying so.
Those are named in the Masks tab instead.

A different CPU with the same thread count is also caught now, by comparing the
topology signature stored in the mask's selection against the running machine.
That signature is what CpuSelectionMigrationMetadata.ReviewRequired was being
computed from in four places and read from in none; this is the first thing to
actually use it. The flag itself is still unread, and is now redundant here.

A rule's cores could only be changed from the Process tab, which needs the
process to be running - so the cores of a rule for a game you are not currently
playing were the one thing about it you could not edit. The saved-rules editor
now shows them and can set them from any saved CPU mask, through the same
migration path the Process tab uses. The per-core picker stays where it is
rather than being duplicated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 00:18:52 +02:00
PrimeBuild-pc abaeb01139 fix: restore from maximised returns to the previous window size
Restoring left the window filling the screen, so it had to be dragged back by
a border. OnStateChanged corrected the window placement synchronously, but at
that point WindowState is already Normal while ActualWidth/Left still describe
the maximised frame - so the placement helper saw a screen-sized window,
"corrected" it, and wrote the working area into Width/Height, destroying the
restore bounds. Every later restore repeated it.

The correction is now posted at Background priority, after the transition has
settled, and does nothing when the restored bounds are already sane. When
there are no smaller bounds to return to - the window was maximised from the
start - it falls back to the app's own default size, centred on the monitor
the window was actually on rather than the primary.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 23:38:13 +02:00
PrimeBuild-pc 5ef9766cd6 feat: edit and disable a saved rule without re-creating it
Saved rules could only be created and deleted. Changing one meant going back
to the Process tab and re-saving it, and there was no way to park a rule
without losing it.

The saved-rules list now has an editor beside it for everything that does not
need the core picker: enabled, CPU priority, memory priority, I/O priority,
assignment mode, and keeping the system awake. The core selection stays in the
Process tab and the panel says so, rather than offering a worse second picker.

UpdateRuleAsync carries the affinity payload through untouched and derives the
ApplyXOnStart flags from the values, so setting a priority back to None really
does stop the rule applying one. Realtime is refused there as it is everywhere
else, and is absent from the list rather than offered and then rejected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 23:38:13 +02:00
PrimeBuild-pc df23cd1be9 fix: buttons that do what they say, and rules you can actually see
Three findings from a pass over the main dashboard.

"+ Custom" in the affinity picker did nothing at all. CreateCustomMask was
searching the visual tree for a TabControl and setting SelectedIndex; the
window has been a NavigationView for several versions, so the search returned
null - no navigation, no error, no feedback. It now raises OpenMasksRequested,
mirroring the OpenRulesRequested event the window already handles. The dead
FindVisualChild helper goes with it.

Clearing CPU Sets left the core chips advertising the assignment that had just
been removed until the process happened to be reselected - and a rule saved in
between would have captured those cores.

Rules saved from the Process tab context menu were invisible: nothing listed
them, and the Rules tab shows power plan associations, which are a different
thing entirely. They now have their own tab there, saying in plain words what
each rule applies and how it differs from the associations, with a delete that
shares one implementation with the context menu path so the two can never
disagree about which rule belongs to a process. The list is re-read on every
visit to the tab, which is enough while the two views cannot be on screen at
the same time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 23:38:13 +02:00
PrimeBuild-pc b3cd418864 fix: keep a completion status until it fades, not until the finally
Success was invisible while failure stayed on screen. An apply set its result
with SetStatus(message, isBusyState: false), and the operation's own finally
called ClearStatus, which blanked it before it could be read; failures go
through SetCriticalStatus, which is preserved. The only surviving signal was
the toast, and success toasts are exactly what users switch off.

Fixed in ClearStatus rather than in the callers: the affinity path had already
lost its ClearStatus, but priority, memory priority, I/O priority and registry
enforcement all route through the same finally and were still silent. A
completion message is not busy state and already carries its own fade
lifetime, so clearing it there was never right for any caller.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 23:38:13 +02:00
PrimeBuild-pc c8826547e2 bug fix v1.7.3 2026-08-26 23:38:13 +02:00
PrimeBuild-pc 7f75d41a36 fix: migrate saved rules off Automatic, not just profiles
1.7.2 moved profiles off Automatic because it applies only Windows CPU Sets,
a soft preference that leaves the affinity mask in Task Manager unchanged. It
did not move the rules already written to persistent_rules.json: a rule stores
the mode it was saved with, so every rule captured before 1.7.1 kept applying
CPU Sets on each process start - invisible to the user, and indistinguishable
from a rule that never runs at all.

ApplyToRules moves those once. Only rules carrying a CpuSelection: with a
legacy mask Automatic already applies a real affinity, and rewriting a working
rule buys nothing. A deliberate CpuSets or IdealProcessor choice is left alone.

The flag is deliberately separate from the profile one. Sharing it would skip
the rules of everyone who already launched 1.7.2, which is most of the people
this fixes. It is persisted only after the rules reach disk, so a failed write
is retried on the next launch instead of being recorded as done.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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