163 Commits

Author SHA1 Message Date
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).
v1.7.6
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 v1.7.5 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>
v1.7.4
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>
v1.7.3
2026-08-26 23:38:13 +02:00
PrimeBuild-pc 88f276706c feat: say when custom masks were drawn for a different CPU
Built-in masks are re-derived when the logical CPU count changes, because
ThreadPilot knows what "All Cores" is supposed to mean. A mask the user drew
is not ThreadPilot's to redraw: only they know whether the CPUs that appeared
belong in it. Until now those masks just kept selecting the old cores in
silence, under a name that no longer described them.

The Masks tab now says which ones need a look, and only when the core count
came from a successful topology detection - resizing or accusing on the
strength of Environment.ProcessorCount, which under-reports under affinity
limits, would be worse than saying nothing.

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 9bcafc5025 fix: detect the tweaks that are there, and let the buttons be read
Three cards showed a red line instead of a state. Two of them, Ethernet power
saving and interrupt moderation, scanned every network adapter subkey without
guarding the reads: one adapter the user cannot open - VPN and vendor virtual
adapters ship with tighter ACLs - threw out of the whole scan, so the tweak
declared itself unavailable even though every real Ethernet adapter was
readable. The unreadable key is now skipped on its own.

Memory Integrity read only CI\State, which several builds leave empty. It now
reads DeviceGuard\Scenarios first, where the running HVCI state actually
lives, and keeps CI\State as the fallback.

The message those failures produced was the raw framework string, "Requested
registry access is not allowed." - true, unactionable, and not something a
user should ever be shown. The exception goes to the log; the card gets a
sentence.

The buttons on that page were near-white text on near-white chrome in dark
theme: an inline Style with no BasedOn discards WPF-UI's implicit Button
style, so they fell back to the stock WPF chrome while the foreground kept
inheriting the dark theme. It was the only such style in the repo.

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
v1.7.2
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
v1.7.1
2026-08-26 14:26:11 +02:00
PrimeBuild-pc 6f5b9338a0 refactor: surface the CPU assignment controls and delete the dead side panel
The Process tab had a right-hand pane, Border Grid.Column="2", left
Visibility="Collapsed" by 91287c9 (v1.2.0) when the Advanced Affinity Picker
expander replaced it. v1.6.0 then added the CPU assignment mode ComboBox and
the Apply CPU Assignment button into that already-collapsed pane, so neither
was ever on screen: the only way to apply affinity in a shipped build was the
DataGrid context menu, and the only way to pick an assignment mode was the
default in Settings. That is why a user reporting "affinity is not working"
had no way to reach the control that would have fixed it.

Both controls now live in the Advanced Affinity Picker, which starts expanded
because it holds the primary apply action. The 326-line collapsed pane is
deleted along with the two orphaned zero-width ColumnDefinitions and the
unused System.Diagnostics xmlns whose only consumers were inside it.

Nothing users could reach is lost. Quick Apply remains on the tray menu;
associations are still created in the Rules tab; process priority is still on
the context menu; power plans still have their own tab. Process profile
save/load is now unbound in XAML, but it was equally unreachable while the
pane was collapsed.

LegacyActionSidePanel_IsNotPersistentPrimaryUi asserted the pane stayed
collapsed. It is replaced by a test that asserts the picker is expanded and
carries the moved controls, and that no element bearing a Command sits inside
a statically collapsed container - ControlTemplate parts excluded, since a
template child revealed by a trigger says nothing about what is on screen.

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
PrimeBuild-pc 451fe1cc1c fix: correct CPU Set resolution, Automatic conflicts, and affinity UI hints
Follow-ups to the affinity apply fix, from a second review pass.

CpuSetMapping.ResolveCpuSetIds trusted the raw CpuSetIds stored with a saved
rule ahead of the selection's logical processors. Those IDs are opaque and can
name a different processor after a topology change, while GetProcessDefaultCpuSets
still verifies them, so a stale rule silently pinned the wrong CPUs. Coordinates
are now resolved against the current mapping whenever they exist, and every one
must resolve - a partial match surfaces as InvalidTopology instead.

Automatic mode attempted CPU Sets even when the process already had a hard
affinity mask excluding the requested CPUs. Windows will not schedule outside
that mask whatever default CPU Sets are installed, yet the read-back still
verifies, so ThreadPilot reported success for an assignment that could not take
effect. It now goes straight to the hard affinity path in that case, which
actually replaces the restriction. Verified end to end: a process pinned to
0x3 targeting CPUs 4-5 now moves to 0x30 instead of silently staying at 0x3.

Affinity masks are 64-bit patterns, not magnitudes: a mask including CPU 63 is
a negative long, and the "> 0" comparisons discarded it. Replaced with
comparisons against zero so 64-CPU single-group systems are handled.

The per-CPU checkboxes stay read-only by design, but nothing said so, and the
hint first landed in the Grid.Column="2" pane that has been Visibility="Collapsed"
since 91287c9. The hint and tooltips now sit in the visible Advanced Affinity
Picker expander. Context menu rule items explain that saved rules are re-applied
automatically on process start and are separate from the Rules tab.

Also removes ApplyCoreMaskToProcessAsync, which had no RelayCommand attribute
and no callers, corrects an audit message that claimed CPU Sets had failed when
they were deliberately skipped, and fixes "core mask" mistranslations in the
Italian, Spanish, French and Russian locales plus German phrasing.

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
PrimeBuild-pc 2ee397ac83 fix: apply real CPU affinity when a rule is applied
A user reported that the CPU affinity feature did nothing when applying a
rule. Two distinct defects were behind it.

ProcessService.SetProcessorAffinity(process, long) silently substituted
SetProcessDefaultCpuSets for the hard affinity write. CPU Sets are only a
soft scheduling hint and leave the mask returned by GetProcessAffinityMask
untouched, so the single caller - AffinityApplyService.ApplyAsync, which
reads the mask back and compares - always reported VerificationMismatch.
The Rules tab path (ProcessMonitorManagerService association core masks)
therefore failed while the affinity never changed. Reproduced on a 16-CPU
machine: requesting 0x3 left the process at 0xFFFF and returned a failure.
The overload now writes the affinity mask it was asked for; soft assignment
keeps its own entry points (CpuAssignmentMode.CpuSets, CpuSelectionAffinityApplier).

The shipped DefaultCpuAssignmentMode was Automatic, which is CPU-Sets-first,
so out of the box "Apply CPU Assignment" produced no change visible in Task
Manager while reporting success. The default is now AffinityMask, and the
CPU Sets result message states that it is a soft preference rather than
claiming "Affinity applied successfully".

Save Current Settings as Rule only captured the core selection while edits
were staged, otherwise falling back to process.ProcessorAffinity - which
soft modes never change - saving a rule pinned to every CPU. It now captures
what the core checkboxes show.

Adds a regression test that spawns a real process and asserts the hard
affinity mask actually changes; it fails on the previous implementation.

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 4360827c1a docs: restore app logo in README (#52) 2026-08-21 17:06:13 +02:00
PrimeBuild-pc 492f4f511e docs: align README header and badges 2026-08-21 14:33:45 +02:00
Prime Build d730260541 Prepare ThreadPilot 1.7.0 gaming and signing release (#51) v1.7.0 2026-08-13 01:50:48 +02:00
Prime Build 23cbad397b Merge pull request #50 from PrimeBuild-pc/codex/cpu-assignment-modes-v1.6.0
Release ThreadPilot 1.6.0 CPU assignment modes
v1.6.0
2026-08-12 15:08:22 +02:00
PrimeBuild-pc eb83afab28 Format CPU assignment result initializers 2026-08-12 15:02:26 +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.
v1.5.3
2026-08-12 01:11:43 +02:00
Kool 27e7b04913 Harden persistence, monitoring, and shutdown reliability (#46)
Addresses the audit findings across persistent-rule recovery, settings merge behavior, CPU identity, monitoring lifecycle, notifications, autostart, tray updates, and shutdown disposal. Includes regression coverage and the corrected disabled-monitoring view. CI DevSecOps and CodeQL pass.
2026-08-12 01:00:17 +02:00
Prime Build 10d9130f2f docs: consolidate language badges
Replace the individual locale badges with one compact languages badge and darken the WinGet badge for clearer visual separation.
2026-08-06 15:31:43 +02:00
Prime Build cddc7b0b41 chore: remove temporary file 2026-08-06 15:29:05 +02:00
Prime Build e5fe8ff99d placeholder 2026-08-06 15:28:44 +02:00
Prime Build 7cefb8caf0 docs: add supported language badges
Show all currently supported display languages in the README using linked Shields.io badges.
2026-08-06 15:23:07 +02:00
Prime Build c9fe6f04d6 chore: prepare release 1.5.2 (#44) v1.5.2 2026-08-03 18:54:00 +02:00
Prime Build 4de31d840c fix: consolidate process monitoring configuration (#43) 2026-08-03 18:28:13 +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.
v1.5.0
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 20d2034d6a Add multilingual support (#39)
Add Italian, French, German, Spanish, and Russian localization with Windows language detection, reliable settings persistence, and neutral dialog styling.
2026-08-01 13:43:45 +02:00
Prime Build 0c7b2983f9 Improve meaningful core coverage and enforce its floor (#38)
* test: cover log file lifecycle

* ci: enforce meaningful coverage floor
2026-07-12 13:43:22 +02:00
Prime Build a5106d80e3 chore: prepare v1.4.4 release (#37) v1.4.4 2026-07-12 09:05:05 +02:00
Prime Build 9553bfd20d Complete measured runtime overhead reductions (#36)
* perf: defer inactive view initialization

* perf: eliminate redundant powercfg refreshes

* perf: suspend hidden log updates

* perf: back off WMI recovery

* perf: reuse static process metadata

* test: cover low-overhead runtime policies
2026-07-12 08:54:30 +02:00
Prime Build 2c6cc774a8 Reduce foreground and background runtime overhead (#35)
* perf: cache persistent rule snapshots

* perf: reduce process-start enrichment and logging

* fix: dispose process handles and clear pid caches

* test: cover low-overhead runtime policies
2026-07-12 08:47:55 +02:00
Prime Build 58c89907a5 Add new bundled power plans (#34) v1.4.3 2026-07-11 20:28:47 +02:00
Prime Build fbfe010fb0 Fix persistent priority reversion after process startup (#33) v1.4.2 2026-07-11 19:17:24 +02:00
PrimeBuild-pc c4f31923d7 Prepare v1.4.1 release v1.4.1 2026-06-24 18:27:08 +02:00
Prime Build 7953fc7774 Refactor repo with ponytail cleanup (#31) 2026-06-24 17:52:45 +02:00
PrimeBuild-pc 07af42798c Add total downloads badge 2026-06-18 13:42:50 +02:00
Prime Build cc45864f63 Update Chocolatey package for latest ThreadPilot release (#30) 2026-06-18 13:13:13 +02:00