CmdPal: Add a global error handler
Summary of the Pull Request
Introduces centralized, app-wide error handling to reduce avoidable crashes and ensure every unexpected exception is at least logged (and optionally surfaced to the user in a controlled way).
PR Checklist
- [x] Closes: #41606
- [ ] Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
- [x] Tests: a few new unit tests for the sanitizer
- [x] Localization: All end-user-facing strings can be localized
- [ ] Dev docs: Added/updated
- [x] New binaries: none
- [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
Detailed Description of the Pull Request / Additional comments
Introduces a centralized Global Error Handler (GEH) that captures unhandled exceptions across the app, generates a sanitized error report, and provides user-friendly recovery options. Includes a dedicated Error Report window, developer tooling, and tests.
Global Error Handling System
GlobalErrorHandler(GEH): Central exception hub (GEH—not Geth!) that captures unhandled exceptions from multiple sources.- Multi-threaded coverage: Handles exceptions from the main UI thread, background threads, and unobserved tasks.
- Configurable responses:
- Logging: Uses the default logger by default.
- Error dialog: Can display a detailed dialog to the user.
- Provides direct access to the generated error report, reducing friction for reporting issues on GitHub.
- Consider simplifying post-1.0 once the main development phase settles (surely all bugs will be fixed by then… right?).
- Toast notifications: Alternative UX for cases where a dialog is too disruptive or cannot be shown.
- Report generation: Always writes one report copy alongside CmdPal logs in LocalAppData; optionally offers to save another copy on the user’s desktop as a nudge to file a report.
- Recovery modes: Distinguishes recoverable vs fatal errors with appropriate UI flows.
- DWM composition handling: Attempts to detect Desktop Window Manager (DWM) composition-related exceptions and avoids showing a window in those cases; can fall back to a toast notification. (WinUI appears to handle these scenarios better than WPF.)
- Early startup design: Intended to be set up and run before the IoC container is initialized.
- Single-file assumption: Current implementation references code from other assemblies but assumes single-file publish, ensuring dependencies are present early so GEH itself cannot fail due to missing assemblies.
Error Report Generation
ErrorReportBuilder: Produces a detailed, technical report with system context.- Comprehensive data: OS version, architecture, culture, app version, elevation status, etc.
- Exception analysis: Coalesces nested exception messages and HRESULT details for clearer diagnostics.
Example
This is an error report generated by Windows Command Palette. If you are seeing this, it means something went a little sideways in the app. You can help us fix it by filing a report at https://aka.ms/powerToysReportBug.
(While you’re at it, give the details below a quick skim — just to make sure there’s nothing personal you’d prefer not to share. It’s rare, but sometimes little surprises sneak in.)
Summary: Message: Test exception; thrown from the UI thread Type: System.NotImplementedException Source: Microsoft.CmdPal.UI Time: 2025-08-25 18:54:44.3854569 HRESULT: 0x80004001 (-2147467263) Context: MainThreadException
Application: App version: 0.0.1.0 Is elevated: no
Environment: OS version: Microsoft Windows 10.0.26120 OS architecture: X64 Runtime identifier: win-x64 Framework: .NET 9.0.8 Process architecture: X64 Culture: cs-CZ UI culture: en-US
Stack Trace: at Microsoft.CmdPal.UI.Settings.InternalPage.ThrowPlainMainThreadException_Click(Object sender, RoutedEventArgs e) at WinRT._EventSource_global__Microsoft_UI_Xaml_RoutedEventHandler.EventState.<GetEventInvoke>b__1_0(Object sender, RoutedEventArgs e) at ABI.Microsoft.UI.Xaml.RoutedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)
------------------ Full Exception Details ------------------ System.NotImplementedException: Test exception; thrown from the UI thread at Microsoft.CmdPal.UI.Settings.InternalPage.ThrowPlainMainThreadException_Click(Object sender, RoutedEventArgs e) at WinRT._EventSource_global__Microsoft_UI_Xaml_RoutedEventHandler.EventState.<GetEventInvoke>b__1_0(Object sender, RoutedEventArgs e) at ABI.Microsoft.UI.Xaml.RoutedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)
============================================================
Real-world example: #41362
PII Sanitization Framework
ErrorReportSanitizer: Multi-layer sanitization pipeline for sensitive data.- Nine specialized rule providers:
PiiRuleProvider: Personally identifiable information (emails, phone numbers, SSNs).ProfilePathAndUsernameRuleProvider: Windows user profiles and usernames.NetworkRuleProvider: IP addresses, MAC addresses, network identifiers.SecretKeyValueRulesProvider: API keys, tokens, passwords in key/value formats.FilenameMaskRuleProvider: Sensitive file paths and extensions.UrlRuleProvider: URLs and web addresses.TokenRuleProvider: JWT and other auth tokens.ConnectionStringRuleProvider: Database connection strings.EnvironmentPropertiesRuleProvider: Environment variables and system properties.
User Interface Components
Error Report Window
-
ErrorReportWindow:- Detailed error dialog with exception information.
- Action modes for recoverable vs fatal errors.
- User actions: copy report to clipboard, reveal report file, restart application, continue operation.
- Extra defensive coding: each construction step wrapped in
try/catchto ensure the error window never causes… another error. - Not modal: due to Command Palette cloaking behavior, a modal dialog could be cloaked as well.
-
ErrorReportWindowManager:- Prevents dialog loops; manages multiple error states while the app keeps running.
- Marshals window creation and updates onto the UI thread.
-
Shell page integration (
ShellPage):- Opens page-level errors in
ErrorReportWindowas recoverable (with Continue button).
- Opens page-level errors in
Accessibility
- Error window designed to be usable and navigable.
Localization
- All user-facing UI text is localized.
- The technical portion of the error report is intentionally not localized.
Developer Experience
- Developers can disable GEH by defining
CMDPAL_DISABLE_GLOBAL_ERROR_HANDLERinMicrosoft.CmdPal.UI.csproj.
Extras
MonitorHelper: Cross-monitor window positioning utilities.ManagedCommon.Logger: New properties to expose log paths after initialization (root app log directory and current-version log directory).- Added a new page to Settings → Internal -
InternalPage:- Enabled only in Debug build configuration.
- Includes test cases for: main-thread exceptions, unobserved task exceptions, and PII-containing exceptions.
- Direct links into the PowerToys logging system.
Tests
- Adds a unit test project for
Microsoft.CmdPal.Common. - Initial sanitizer tests included (coverage is laughable).
To-Do / Known Gaps
- Exceptions thrown inside
Dispatcher.TryEnqueuebypass the unhandled exception handler; tracked at microsoft-ui-xaml/issues/8940. Not covered by this PR. microsoft-ui-xaml/10447 - Integrate with Windows Restart Manager to auto-restart after an unhandled crash (planned as a separate PR).
- Integrate telemetry (?).
- Since Error Report Window can't be modal, at least we should disable the main window when unhandled exception is being handled.
- Integrate / unify
ErrorReportBuilderwithDiagnosticHelperthat creates error forShellPage.
Pictures!
Prototype:
No window:
Integration with a page errors:
Validation Steps Performed
Throwing exceptions in the CmdPal left and right. Added a few unit tests (not enough yet, I'm afraid).
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (37)
contoso
cosmosdb
Fmy
FNFUROf
ftps
Gci
IDTn
Iiwibm
Ikp
Ikpva
Imlhd
Jhb
JIUz
jkl
JWTs
Jzd
KMUFs
mno
MTUx
mydb
NTY
ODkw
OTAy
piis
postgre
pqr
Rta
Ryd
sas
Smq
srv
Ssn
ssw
userdb
WIi
XVCJ
ZSI
These words are not needed and should be removed
fffSome files were automatically ignored :see_no_evil:
These sample patterns would exclude them:
^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/
You should consider adding them to:
.github/actions/spell-check/excludes.txt
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 patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.
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]:jiripolasek/PowerToys.git repository
on the feature/cmdpal-add-global-error-handling branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/16944532974/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Forbidden patterns :no_good: (1)
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:
Should only be one of a, an, or the
\b(?:(?:an?|the)\s+){2,}\b
Pattern suggestions :scissors: (4)
You could add these patterns to .github/actions/spell-check/patterns.txt:
# Automatically suggested patterns
# hit-count: 2 file-count: 1
# base64 encoded json
\beyJ[-a-zA-Z=;:/0-9+]+
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$
# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.
Errors, Warnings, and Notices :x: (5)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors, Warnings, and Notices | Count |
|---|---|
| :warning: binary-file | 4 |
| :information_source: candidate-pattern | 4 |
| :x: forbidden-pattern | 1 |
| :warning: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
If the flagged items are :exploding_head: 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.txtfile 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 the
patterns.txtfile.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.
Hi @zadjii-msft, @niels9001,
Could you take a quick look and let me know if you think this idea makes sense to include in CmdPal?
I’ve put together a quick proof of concept to illustrate it, but it’s still rough and will need proper cleanup if we move forward — so please focus on the concept, not the current implementation.
Edit: If you’re brave enough to run it, there’s now a panel in CmdPal Settings with buttons that purposely crash the app for testing.
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (37)
contoso
cosmosdb
Fmy
FNFUROf
ftps
Gci
IDTn
Iiwibm
Ikp
Ikpva
Imlhd
Jhb
JIUz
jkl
JWTs
Jzd
KMUFs
mno
MTUx
mydb
NTY
ODkw
OTAy
piis
postgre
pqr
Rta
Ryd
sas
Smq
srv
Ssn
ssw
userdb
WIi
XVCJ
ZSI
These words are not needed and should be removed
fffSome files were automatically ignored :see_no_evil:
These sample patterns would exclude them:
^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/
You should consider adding them to:
.github/actions/spell-check/excludes.txt
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 patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.
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]:jiripolasek/PowerToys.git repository
on the feature/cmdpal-add-global-error-handling branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/16962310776/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Forbidden patterns :no_good: (1)
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:
Should only be one of a, an, or the
\b(?:(?:an?|the)\s+){2,}\b
Pattern suggestions :scissors: (4)
You could add these patterns to .github/actions/spell-check/patterns.txt:
# Automatically suggested patterns
# hit-count: 2 file-count: 1
# base64 encoded json
\beyJ[-a-zA-Z=;:/0-9+]+
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$
# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.
Errors, Warnings, and Notices :x: (5)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors, Warnings, and Notices | Count |
|---|---|
| :warning: binary-file | 4 |
| :information_source: candidate-pattern | 4 |
| :x: forbidden-pattern | 1 |
| :warning: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
If the flagged items are :exploding_head: 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.txtfile 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 the
patterns.txtfile.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.
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (37)
contoso
cosmosdb
Fmy
FNFUROf
ftps
Gci
IDTn
Iiwibm
Ikp
Ikpva
Imlhd
Jhb
JIUz
jkl
JWTs
Jzd
KMUFs
mno
MTUx
mydb
NTY
ODkw
OTAy
piis
postgre
pqr
Rta
Ryd
sas
Smq
srv
Ssn
ssw
userdb
WIi
XVCJ
ZSI
These words are not needed and should be removed
advancedpasteui advancedpasteuishortcut allpc fff hotkeylockmachine hotkeyreconnect hotkeyswitch hotkeytoggleeasymouse imagetotext imagetotextshortcut LOCKMACHINE measuretool mousepointercrosshairs pasteashtmlfile pasteashtmlfileshortcut pasteasjson pasteasjsonshortcut pasteasmarkdown pasteasmarkdownshortcut pasteasplaintext pasteasplaintextshortcut pasteaspngfile pasteaspngfileshortcut pasteastxtfile pasteastxtfileshortcut powerocr reparenthotkey thumbnailhotkey TOGGLEEASYMOUSE transcodetompSome files were automatically ignored :see_no_evil:
These sample patterns would exclude them:
^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/
You should consider adding them to:
.github/actions/spell-check/excludes.txt
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 patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.
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]:jiripolasek/PowerToys.git repository
on the feature/cmdpal-add-global-error-handling branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/17126631377/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Forbidden patterns :no_good: (1)
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:
Should only be one of a, an, or the
\b(?:(?:an?|the)\s+){2,}\b
Pattern suggestions :scissors: (4)
You could add these patterns to .github/actions/spell-check/patterns.txt:
# Automatically suggested patterns
# hit-count: 2 file-count: 1
# base64 encoded json
\beyJ[-a-zA-Z=;:/0-9+]+
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$
# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.
Errors, Warnings, and Notices :x: (5)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors, Warnings, and Notices | Count |
|---|---|
| :warning: binary-file | 4 |
| :information_source: candidate-pattern | 4 |
| :x: forbidden-pattern | 1 |
| :warning: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
If the flagged items are :exploding_head: 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.txtfile 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 the
patterns.txtfile.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.
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (37)
contoso
cosmosdb
Fmy
FNFUROf
ftps
Gci
IDTn
Iiwibm
Ikp
Ikpva
Imlhd
Jhb
JIUz
jkl
JWTs
Jzd
KMUFs
mno
MTUx
mydb
NTY
ODkw
OTAy
piis
postgre
pqr
Rta
Ryd
sas
Smq
srv
Ssn
ssw
userdb
WIi
XVCJ
ZSI
These words are not needed and should be removed
advancedpasteui advancedpasteuishortcut age allpc fff hotkeylockmachine hotkeyreconnect hotkeyswitch hotkeytoggleeasymouse imagetotext imagetotextshortcut LOCKMACHINE measuretool mousepointercrosshairs pasteashtmlfile pasteashtmlfileshortcut pasteasjson pasteasjsonshortcut pasteasmarkdown pasteasmarkdownshortcut pasteasplaintext pasteasplaintextshortcut pasteaspngfile pasteaspngfileshortcut pasteastxtfile pasteastxtfileshortcut powerocr reparenthotkey thumbnailhotkey TOGGLEEASYMOUSE transcodetomp TruSome files were automatically ignored :see_no_evil:
These sample patterns would exclude them:
^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/
You should consider adding them to:
.github/actions/spell-check/excludes.txt
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 patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.
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]:jiripolasek/PowerToys.git repository
on the feature/cmdpal-add-global-error-handling branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/17214720107/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Forbidden patterns :no_good: (1)
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:
Should only be one of a, an, or the
\b(?:(?:an?|the)\s+){2,}\b
Pattern suggestions :scissors: (4)
You could add these patterns to .github/actions/spell-check/patterns.txt:
# Automatically suggested patterns
# hit-count: 2 file-count: 1
# base64 encoded json
\beyJ[-a-zA-Z=;:/0-9+]+
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$
# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.
Errors, Warnings, and Notices :x: (5)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors, Warnings, and Notices | Count |
|---|---|
| :warning: binary-file | 4 |
| :information_source: candidate-pattern | 4 |
| :x: forbidden-pattern | 2 |
| :warning: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
If the flagged items are :exploding_head: 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.txtfile 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 the
patterns.txtfile.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.
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors, Warnings, and Notices | Count |
|---|---|
| :warning: binary-file | 4 |
| :information_source: candidate-pattern | 3 |
| :x: forbidden-pattern | 1 |
| :warning: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
These words are not needed and should be removed
advancedpasteui advancedpasteuishortcut age allpc fff hotkeylockmachine hotkeyreconnect hotkeyswitch hotkeytoggleeasymouse imagetotext imagetotextshortcut LOCKMACHINE measuretool mousepointercrosshairs pasteashtmlfile pasteashtmlfileshortcut pasteasjson pasteasjsonshortcut pasteasmarkdown pasteasmarkdownshortcut pasteasplaintext pasteasplaintextshortcut pasteaspngfile pasteaspngfileshortcut pasteastxtfile pasteastxtfileshortcut powerocr reparenthotkey thumbnailhotkey TOGGLEEASYMOUSE transcodetomp TruSome files were automatically ignored :see_no_evil:
These sample patterns would exclude them:
^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/
You should consider adding them to:
.github/actions/spell-check/excludes.txt
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 patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.
To 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]:jiripolasek/PowerToys.git repository
on the feature/cmdpal-add-global-error-handling branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/17215700084/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Pattern suggestions :scissors: (3)
You could add these patterns to .github/actions/spell-check/patterns.txt:
# Automatically suggested patterns
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$
# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.
If the flagged items are :exploding_head: 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.txtfile 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 the
patterns.txtfile.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.
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :x: Errors, Warnings, and Notices | Count |
|---|---|
| :warning: binary-file | 4 |
| :information_source: candidate-pattern | 3 |
| :x: forbidden-pattern | 1 |
| :warning: ignored-expect-variant | 1 |
| :warning: no-newline-at-eof | 1 |
See :x: Event descriptions for more information.
These words are not needed and should be removed
advancedpasteui advancedpasteuishortcut age allpc fff hotkeylockmachine hotkeyreconnect hotkeyswitch hotkeytoggleeasymouse imagetotext imagetotextshortcut LOCKMACHINE measuretool mousepointercrosshairs pasteashtmlfile pasteashtmlfileshortcut pasteasjson pasteasjsonshortcut pasteasmarkdown pasteasmarkdownshortcut pasteasplaintext pasteasplaintextshortcut pasteaspngfile pasteaspngfileshortcut pasteastxtfile pasteastxtfileshortcut powerocr reparenthotkey thumbnailhotkey TOGGLEEASYMOUSE transcodetomp TruSome files were automatically ignored :see_no_evil:
These sample patterns would exclude them:
^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/
You should consider adding them to:
.github/actions/spell-check/excludes.txt
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 patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.
To 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]:jiripolasek/PowerToys.git repository
on the feature/cmdpal-add-global-error-handling branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/17219186182/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Pattern suggestions :scissors: (3)
You could add these patterns to .github/actions/spell-check/patterns.txt:
# Automatically suggested patterns
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$
# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.
If the flagged items are :exploding_head: 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.txtfile 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 the
patterns.txtfile.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.
@jiripolasek Is this PR still alive? If so, would you mind looking at the conflicts so we can get it reviewed :)? Sorry that it took this long!
@jiripolasek Is this PR still alive? If so, would you mind looking at the conflicts so we can get it reviewed :)? Sorry that it took this long!
@niels9001 Sure, I'll get it up to date! I think this PR is particularly rough and could use a lot of refinement (more like hammering), but I'd appreciate feedback on the overall direction to ensure it makes sense to everyone.
A team of highly trained squirrels has been dispatched to resolve the merge conflict. Be warned — the result will be nuts! 🌰🥜🌰
@niels9001 @michaeljolley Squirrels confirms the base merge was successful, so you can run it locally to gather some insights and give me quick feedback about what you like and dislike.
To-do:
- Address feedback from mini-handler.
- WER?
- ~Resolve unit test issues on CI (there’s a mismatch between local special folders and the server, like MyPictures vs UserProfile\Pictures — ugh).~
- New TitleBar controls.
- Spellcheckerggrrrr
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
before I go commenting it on basically every PR - this is gonna need to get updated with main, because of the mega slnx change that rolled through
Hi, I’m going to close this PR and break it down into smaller, more manageable pieces.
Error report builder, sanitizer and UI for internal tools:
- https://github.com/microsoft/PowerToys/pull/44140