-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[QuickAccent] Persist characters usage between runs #37577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3c15951
to
36d0f98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to persist character usage data between PowerToys/QuickAccent runs by saving/retrieving JSON data.
- Added a UsageInfoData model to hold character counts and timestamps.
- Updated CharactersUsageInfo to read from and write to a JSON file based on user settings.
- Integrated usage data saving in the UI component on application close and updated JSON serialization context.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/modules/poweraccent/PowerAccent.Core/Models/UsageInfoData.cs | Added a new model to represent persisted usage data. |
src/modules/poweraccent/PowerAccent.Core/Tools/CharactersUsageInfo.cs | Refactored for JSON persistence of character usage with file I/O. |
src/modules/poweraccent/PowerAccent.UI/Selector.xaml.cs | Added a save call for usage info on the window closing event. |
src/modules/poweraccent/PowerAccent.Core/PowerAccent.cs | Adjusted character ordering and integrated usage info saving. |
src/modules/poweraccent/PowerAccent.Core/SerializationContext/SourceGenerationContext.cs | Updated source generation settings to include UsageInfoData in JSON serialization. |
36d0f98
to
fb9e736
Compare
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.Unrecognized words (39)
These words are not needed and should be removedcleanmgr CLSCTXINPROCALL CLSCTXLOCALSERVER FILELOCKSMITH IIDI iwr psexec smileys TEXTEXTRACTOR windowsterminal ZhiweiSome files were automatically ignored 🙈These sample patterns would exclude them:
You should consider adding them to:
File matching is via Perl regular expressions. To check these files, more of their words need to be in the dictionary than not. You can use To accept these unrecognized words as correct, update file exclusions, and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the [email protected]:microsoft/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/16099065583/attempts/1' &&
git commit -m 'Update check-spelling metadata' Forbidden patterns 🙅 (2)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Do not use
|
❌ Errors, Warnings, and Notices | Count |
---|---|
ℹ️ candidate-pattern | 1 |
❌ check-file-path | 20 |
❌ forbidden-pattern | 2 |
1 | |
1 |
See ❌ Event descriptions for more information.
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txt
file matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^
refers to the file's path from the root of the repository, so^README\.md$
would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txt
file.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
Summary of the Pull Request
PR Checklist
Persist characters usage between PowerToys/QuickAccent runs.
Detailed Description of the Pull Request / Additional comments
%LOCALAPPDATA%\Microsoft\PowerToys\QuickAccent\UsageInfo.json
Validation Steps Performed
Manually tested: