Skip to content

Add Apply now and save as rule flow#20

Merged
PrimeBuild-pc merged 2 commits into
mainfrom
codex/apply-save-rule-flow
May 22, 2026
Merged

Add Apply now and save as rule flow#20
PrimeBuild-pc merged 2 commits into
mainfrom
codex/apply-save-rule-flow

Conversation

@PrimeBuild-pc
Copy link
Copy Markdown
Owner

@PrimeBuild-pc PrimeBuild-pc commented May 21, 2026

Summary

  • Add ProcessRuleCreationService for explicit persistent rule creation/update from Process tab actions.
  • Add a compact Process tab Rules context submenu with Save Current Settings as Rule and Apply Affinity and Save as Rule.
  • Preserve opt-in behavior: existing affinity, CPU priority, and memory priority actions do not save persistent rules.

Behavior

  • Matches existing rules by executable path when available, with pathless process-name fallback to avoid duplicate rules.
  • Preserves Id and CreatedAt when updating an existing rule, and refreshes UpdatedAt plus selected action payloads.
  • Prefers CpuSelection when available or migratable through topology; only saves legacy affinity when safely representable.
  • Blocks Realtime priority and unsafe affinity persistence with controlled user messages.

Tests

  • Added ProcessRuleCreationServiceTests covering path/name matching, create/update, timestamp preservation, CPU selection, safe/unsafe legacy affinity, Realtime blocking, memory priority, and no-action failures.
  • Extended Process tab context menu tests for explicit save/apply-save commands, row-process routing, summary refresh, affinity failure behavior, and normal actions remaining non-persistent.

Validation

  • dotnet test "ThreadPilot_1.sln" --configuration Release --no-restore
  • Result: Passed, 352 tests, 0 failed, 0 skipped.

Limitations

  • This PR intentionally does not add a full rules editor or modal confirmation flow.
  • Apply-and-save for CPU Sets relies on the existing topology/migration path to persist a saveable selection.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 21, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 82.05980% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Services/ProcessRuleCreationService.cs 83.25% 21 Missing and 17 partials ⚠️
ViewModels/ProcessViewModel.Behaviors.partial.cs 77.27% 8 Missing and 7 partials ⚠️
Services/ServiceConfiguration.cs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@PrimeBuild-pc PrimeBuild-pc marked this pull request as ready for review May 22, 2026 09:59
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@PrimeBuild-pc PrimeBuild-pc merged commit dd45b38 into main May 22, 2026
3 checks passed
@PrimeBuild-pc PrimeBuild-pc deleted the codex/apply-save-rule-flow branch May 22, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants