49 Commits

Author SHA1 Message Date
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 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
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
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 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 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 c8826547e2 bug fix v1.7.3 2026-08-26 23:38:13 +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
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
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
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 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 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 7953fc7774 Refactor repo with ponytail cleanup (#31) 2026-06-24 17:52:45 +02:00
Prime Build 024673dcbe Add safe in-app updater (#28)
## Summary

Adds a safe in-app updater for ThreadPilot. This PR does not bump the app version and does not prepare a release; version and release metadata will be handled separately for v1.4.0.

## Type of Change

- [x] Feature
- [x] Security hardening
- [x] Documentation
- [x] Added/updated tests

## Update flow

- Checks for updates on demand from Settings.
- Performs background startup checks only when enabled and the last check is older than the configured interval.
- Defaults to a 7-day interval.
- Excludes prereleases by default.
- Notifies users when an update is available.
- Requires explicit user action before download/install.

## Security and safety

- Uses release metadata from the official `PrimeBuild-pc/ThreadPilot` repository only.
- Selects safe ThreadPilot installer assets from GitHub HTTPS release assets.
- Downloads into a ThreadPilot-owned temp update directory.
- Verifies SHA256 checksums when `SHA256SUMS.txt` is available.
- Rejects checksum mismatches.
- Performs best-effort Authenticode verification and rejects explicitly invalid signatures.
- Starts the installer elevated without shell command construction.
- Prevents concurrent install attempts.

## User data preservation

- Update flow does not delete AppData, settings, profiles, CPU masks, rules, custom/imported power plans, or logs.
- Only updater temp files are cleaned.
- Full uninstall behavior remains separate.

## Validation

- `dotnet restore ThreadPilot_1.sln`: passed
- `dotnet build ThreadPilot_1.sln`: passed, 0 warnings, 0 errors
- `dotnet test ThreadPilot_1.sln`: passed, 537 tests

## Release note

This PR intentionally leaves `ThreadPilot.csproj` at `1.3.1`. The `1.4.0` version bump, changelog, packaging metadata, and tag should happen in a separate release-prep branch after this PR is merged.
2026-06-07 06:06:53 +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 340610dfd3 Add safe localization support
Adds English/Chinese localization infrastructure with en-US as default, zh-CN as optional language, safe fallback behavior, settings integration, localized notifications, and expanded test coverage.
2026-06-06 18:04:12 +02:00
PrimeBuild-pc e8ba1a7e74 Finalize v1.2.0 release artifact contract 2026-05-23 15:43:12 +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
Prime Build dd45b38007 Add Apply now and save as rule flow (#20)
Add Apply now and save as rule flow

Add explicit opt-in persistent rule creation from Process tab actions.

- Add ProcessRuleCreationService for creating/updating persistent process rules
- Add Rules submenu with Save Current Settings as Rule and Apply Affinity and Save as Rule
- Match existing rules by executable path or process name fallback to avoid duplicates
- Preserve rule Id and CreatedAt when updating existing rules
- Prefer CpuSelection and only save legacy affinity when safely representable
- Avoid saving Normal CPU priority from automatic current-state capture
- Block Realtime priority and unsafe affinity persistence with controlled messages
- Save memory priority when known
- Keep existing normal context actions from creating persistent rules
- Add tests for create/update, path/name matching, CpuSelection, legacy safety, priority capture, memory priority, no-action failure and ViewModel commands

No full rules editor, modal confirmation flow, registry/IFEO, Windows Service, diagnostics changes, version bump or tag changes.
2026-05-22 12:00:09 +02:00
Prime Build b45fcf16f1 Add Process tab context menu actions (#19)
Add Process tab context menu actions

Add a lightweight right-click context menu to Process tab rows using existing safe process action paths.

- Add row context menu for Process tab DataGrid rows
- Add row-specific Apply Affinity command using ProcessAffinityApplyCoordinator
- Add Clear CPU Sets action using the safe CPU Sets clear path
- Add CPU priority actions while keeping Realtime blocked
- Add memory priority actions through ProcessMemoryPriorityService
- Add Open Executable Location, Copy Process Info and Refresh Process Info actions
- Refresh selected-process summary after context actions
- Keep context menu actions from creating persistent rules
- Add tests for row-specific affinity, CPU priority, memory priority, copy/open/refresh, CPU Sets clear and no rule creation

No save-as-rule flow, rules editing UI, persistent rule creation, affinity core changes, memory-priority backend changes, diagnostics changes, version bump or tag changes.
2026-05-22 00:52:38 +02:00
Prime Build 6eec1bab3f Add selected process summary to Process tab (#18)
Add selected process summary to Process tab

Add a lightweight current-process status strip under the Process tab process list without reintroducing dashboard-style monitoring.

- Add SelectedProcessSummaryViewModel populated from selected ProcessModel data
- Show selected process name, PID, path, CPU priority, memory priority, affinity, rule status, CPU usage and memory usage
- Read memory priority once on selection when available
- Check saved persistent rule status through the existing rule store and matcher
- Avoid PerformanceMonitoringService, diagnostics/live monitoring and timers
- Guard async summary updates so stale memory/rule lookups cannot overwrite newer selections
- Update summary after refreshed process fields only when the selected process is still current
- Add tests for no-selection state, selection changes, memory priority, rule status, no performance dependency and stale async update protection

No context menu, save-as-rule flow, rules editing UI, diagnostics redesign, background monitoring, version or tag changes.
2026-05-22 00:23:35 +02:00
Prime Build 266834cbdf Reduce Performance tab to optional diagnostics (#17)
Reduce Performance tab to optional diagnostics

Hide the Performance/Diagnostics surface from the primary UX by default and remove hidden startup/tray runtime cost.

- Hide Diagnostics from primary navigation and tray by default
- Lazy-create PerformanceViewModel only when Diagnostics is opened
- Stop initializing diagnostics snapshots during app startup
- Gate tray CPU/RAM metrics behind the advanced diagnostics flag
- Avoid starting the tray lightweight metrics timer when diagnostics are hidden
- Lazily allocate PerformanceMonitoringService counters on first metrics use
- Stop live diagnostics when inactive, minimized or tray-hidden
- Preserve diagnostics internals for future selected-process summary work
- Add tests for lazy diagnostics creation, tray metrics gating and explicit diagnostics activation

No Process tab redesign, CPU affinity changes, memory priority changes, persistent rules changes, version bump or tag changes.
2026-05-21 23:47:21 +02:00
PrimeBuild-pc da907d210e Clean up analyzer warnings 2026-05-17 01:54:32 +02:00
PrimeBuild-pc 62c4dd0de8 Polish remaining Windows 11 visual surfaces 2026-05-17 01:44:50 +02:00
PrimeBuild-pc 93dc8fcdc9 Polish core Windows 11 settings views 2026-05-17 01:25:09 +02:00
PrimeBuild-pc a3efe558e7 Retune shell theme toward Windows 11 styling 2026-05-17 00:56:05 +02:00
PrimeBuild-pc 8e5780cdb3 Polish theme settings and bundled power plans 2026-05-17 00:17:12 +02:00
Prime Build 4fceda163d Perf/professional hardening (#4)
* Improve background refresh and process detection

* Harden affinity and power plan automation

* Fix passive process refresh failures

* Improve UX terminology and process layout

* Polish UX layout and empty states

* Expand core service test coverage
2026-05-09 23:15:49 +02:00
PrimeBuild-pc 606065475d Update LogViewerView.xaml 2026-04-16 01:32:42 +02:00
PrimeBuild-pc f6f9822828 Elevation modal, overlay refactor and perf tweaks
Refactor UI overlays and add an elevation warning modal; improve performance monitoring and refresh behavior.

- UI: Reworked MainWindow XAML to consolidate content into UIContent, replaced AppContentLayer/backdrop animations with style-driven blur, added ElevationWarningOverlay (shell-style elevation prompt), reorganized PerformanceIntro and Loading overlays, and added popup overlay in PerformanceView.
- MainWindow logic: Added ApplyUIContentBlur/ClearUIContentBlur helpers, elevation warning show/dismiss/request handlers (with persisted HasSeenElevationWarning), suspend/resume logic for system-tray and background refreshes when hidden, and concurrency guards for system-tray updates.
- Services/API: IPerformanceMonitoringService now supports a lightweight GetSystemMetricsAsync(bool lightweight) call. PerformanceMonitoringService caches total physical memory, skips expensive metrics for lightweight calls, increases monitoring interval to 2s, and adds re-entrancy guards.
- ViewModels: PerformanceViewModel gains popup state/commands and blur binding; PowerPlanViewModel can pause/resume auto-refresh, increased refresh interval to 10s and added concurrency protection.

These changes reduce startup and background resource usage, prevent timer overlap, and introduce a clear user-facing elevation prompt while preserving existing behavior via settings.
2026-04-15 00:59:49 +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
PrimeBuild-pc 3dcec45c1b chore: final enterprise polish and release preparation for v1.1.0 2026-04-12 17:46:38 +02:00
PrimeBuild-pc acfd8dca7e Switch project license to AGPLv3 and test visibility
Replaces the project's license from GNU GPL v3 to the GNU Affero General Public License v3: updated LICENSE (full AGPL text) and updated license headers across source files. Adds InternalsVisibleTo("ThreadPilot.Core.Tests") (plus using System.Runtime.CompilerServices) in AssemblyInfo to allow test access to internal types. Also introduces Services/TaskSafety.cs and two new test files under Tests/ThreadPilot.Core.Tests to cover task safety. These changes apply the AGPLv3 terms and enable internal API access for unit tests.
2026-04-12 16:57:52 +02:00
PrimeBuild-pc 74922890c8 Adopt Wpf.Ui FluentWindow and revamp UI
Replace Window with Wpf.Ui FluentWindow and integrate Wpf.Ui theme dictionaries and controls; migrate main navigation from TabControl to NavigationView with TitleBar, navigation items and view visibility management, improved startup overlay with blur/fade animations, and updated status bar. Converters now resolve brushes from application resources for theming. CpuTopologyService: add Windows API (GetLogicalProcessorInformationEx) detection, richer structures, improved HT/core type heuristics, labeling and affinity presets; fallbacks and WMI usage preserved. System tray: add ApplyTheme method, custom menu font handling and related calls. NotificationService: standardize display duration via a constant. Misc: XAML/resource adjustments, minor view/viewmodel wiring, and .gitignore updated to include implementation_plan.md.
2026-04-12 01:04:58 +02:00
PrimeBuild-pc 7be4cef428 Enhance theming, UI behavior, perf & add CI
Multiple improvements across theming, UI flow, performance refresh logic, and CI:

- Add CI DevSecOps GH Action workflow: .NET restore/build (Debug/Release), dependency audit, and gitleaks secret scan.
- Theming: preload and apply theme at startup; add HasUserThemePreference to settings model; detect legacy theme flag when loading settings; ThemeService now reads system theme from registry (GetSystemUsesDarkTheme) and exposes system-use check.
- Richer theme resources: major updates to FluentDark.xaml and FluentLight.xaml (expanded color palette, control styles/templates, system brushes) to modernize visuals and controls.
- Startup/UI behavior: improved autostart/minimize-to-tray handling, consistent ShowInTaskbar/Visibility logic, OnSourceInitialized hook to reapply caption theme, and apply DWM immersive dark caption via DwmSetWindowAttribute.
- Robust UI error handling: throttle dispatcher exception dialog to avoid multiple dialogs using an interlocked flag and short time window.
- MainWindow refactor: introduce ShowWindowFromTray helper, unify show/activate flows, apply caption theming, and adjust several shortcut handlers to use the helper.
- Tab switching: add SemaphoreSlim guard and improved selection logic to debounce concurrent tab changes; prompt/save/discard unsaved settings when switching away from Settings; dispose semaphore on shutdown.
- PerformanceViewModel: debounce/gate top-process refreshes with SemaphoreSlim and a pending flag to avoid overlapping refreshes; update TopCpuProcesses on UI dispatcher and refresh selected process impact safely.
- Misc: small XAML cleanups (Settings tab header simplification), add COMPLIANCE_AUDIT.md to .gitignore, and various logging/error message tweaks.

These changes aim to reduce UI flicker on startup, respect user/system theme preferences, harden UI interactions, prevent concurrent refresh race conditions, and add CI/DevSecOps checks.
2026-04-11 17:41:13 +02:00
PrimeBuild-pc 010dee679f Add docs, themes, services and UI updates
Large changeset adding documentation, themes, converters and wiring between UI and services. Key changes:

- Rewrote .gitignore to standardize build, IDE, OS and project-specific ignores.
- Added comprehensive documentation: ADVANCED_CPU_FEATURES.md, API_REFERENCE.md, ARCHITECTURE_GUIDE.md, DEVELOPER_GUIDE.md, GAME_BOOST_VALIDATION.md, CLAUDE.md, PROJECT_STRUCTURE.md, UI_STYLE_GUIDE.md, TRADEMARK.md.
- Added theme resources (Themes/FluentLight.xaml, Themes/FluentDark.xaml) and merged FluentLight into App.xaml resource dictionary.
- Added NullToBoolConverter and registered it in App.xaml.
- Enabled a DEBUG-only console test mode in App.xaml.cs (--test flag) and guarded AllocConsole with #if DEBUG.
- Added new service/support files (AtomicFileWriter, StoragePaths, ThemeService) and numerous updates across Services (CpuTopologyService, CoreMaskService, PowerPlanService, ProcessMonitorManagerService, ProcessService, NotificationService, SystemTrayService, SystemTweaksService, EnhancedLoggingService, etc.).
- Updated many ViewModels and Views to support new functionality (CPU topology, power plan and game-boost features) and tests (Tests/TestRunner.cs).
- Added build-release.ps1 and various project metadata updates.

Overall this commit introduces documentation, theming, new converters and test/debug support, plus extensive service and UI wiring for CPU topology, process monitoring, power plans and game boost features.
2026-04-10 03:58:51 +02:00
Focaccina-Ripiena37 bb3602342a Load bundled power plans by default, improve core mask handling, and update project licensing 2025-12-23 13:52:51 +01:00
Focaccina-Ripiena37 e46e380c1e Add About section and manual GitHub update check 2025-12-21 18:11:54 +01:00
Focaccina-Ripiena37 cff7d00067 Initial clean import 2025-12-21 04:19:52 +01:00