Skip to content

fix: improved regex that doesn't exclude other windows languages - #59

Merged
PrimeBuild-pc merged 3 commits into
PrimeBuild-pc:mainfrom
Nathan-Wrpt:fix/localized-power-plan-parsing
Sep 29, 2026
Merged

PrimeBuild-pc merged 3 commits into
PrimeBuild-pc:mainfrom
Nathan-Wrpt:fix/localized-power-plan-parsing

Conversation

@Nathan-Wrpt

Copy link
Copy Markdown
Contributor

Summary

Updated PowerPlanService to parse power plan entries using their GUID format instead of the English Power Scheme GUID: label. This fixes power plan detection on different languages Windows installations.

Type of Change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Security hardening
  • Performance improvement

Validation

  • Built Debug and Release successfully
  • Ran automated tests
  • Verified impacted UI flows
  • Verified no secrets/credentials introduced

Automated tests could not be run because .NET was unavailable in the development environment. A localized-output test was created locally but is not included in this pull request.

Security and Risk Notes

No impact on elevation, process control, power plan operations, or persisted configuration. The change only affects parsing of powercfg /list and /getactivescheme output.

Checklist

  • Updated docs where relevant
  • Added or updated tests where relevant
  • Kept changes scoped and backwards compatible where possible

@PrimeBuild-pc

Copy link
Copy Markdown
Owner

Hi Nathan, thanks for the contribution. The fix is correctly scoped, and the updated parser handles French output while preserving English output, the active marker, and names containing parentheses.

Before merging, please include the localized-output regression test mentioned in the PR description in PowerPlanServiceTests. Once that test passes, this looks ready to merge.

@PrimeBuild-pc

Copy link
Copy Markdown
Owner

Hi Nathan, friendly reminder on this PR. The parser change still looks good. The only remaining requirement before merge is the localized powercfg regression test in PowerPlanServiceTests, covering the French sample from issue #58 while preserving English output, the active marker, and plan names containing parentheses.

Could you add the test when you have a chance? If you are no longer able to continue, please let us know so we can decide how to proceed. Thanks.

@codecov-commenter

Copy link
Copy Markdown

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

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@PrimeBuild-pc PrimeBuild-pc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed the missing localized-output regression test and brought the branch up to date with main. The French powercfg sample now parses both plans and preserves the active marker; the existing English and parenthesized-name cases remain green.\n\nVerified locally: Release build, 752 tests, and scoped formatting. CI DevSecOps and CodeQL also pass.

@PrimeBuild-pc
PrimeBuild-pc merged commit a26c792 into PrimeBuild-pc:main Sep 29, 2026
3 checks passed
PrimeBuild-pc added a commit that referenced this pull request Sep 29, 2026
Release metadata and notes for localized power-plan parsing (#59) and wildcard executable paths (#63).
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.

3 participants