Settings polish: unify error detection controls - #855
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🟡 Changes recommended
en-GB FRE shell-integration error messaging uses inconsistent terminology (“Error detection” vs “Auto error handling”) within the same locale resource file.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Unifies the existing “auto error detection” + “auto fix” toggles into a single 3-state “error detection” dropdown across Settings and the first-run experience, while preserving compatibility by continuing to store state in autoErrorDetectionEnabled and autoFixEnabled and honoring GPO/policy restrictions.
Changes:
- Replace two boolean settings controls with a single 3-mode selection (Off / Detect-only / Detect+send-to-agent for fixes) in Settings and FRE.
- Update policy handling and unit tests to ensure auto-fix policy does not disable local detection.
- Refresh localized strings (labels/options/accessibility) for the new dropdown and updated messaging.
File summaries
| File | Description |
|---|---|
| src/cascadia/UnitTests_SettingsModel/CustomAgentAndPolicyTests.cpp | Expands unit coverage for the new 3-state mapping and policy interactions. |
| src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl | Clarifies policy-lock semantics for UI availability (options/buttons). |
| src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw | Replaces old toggle strings with dropdown strings and accessibility text (en-US). |
| src/cascadia/TerminalSettingsEditor/Resources/de-DE/Resources.resw | Updates localized dropdown strings (de-DE). |
| src/cascadia/TerminalSettingsEditor/Resources/es-ES/Resources.resw | Updates localized dropdown strings (es-ES). |
| src/cascadia/TerminalSettingsEditor/Resources/fr-FR/Resources.resw | Updates localized dropdown strings (fr-FR). |
| src/cascadia/TerminalSettingsEditor/Resources/it-IT/Resources.resw | Updates localized dropdown strings (it-IT). |
| src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw | Updates localized dropdown strings (ja-JP). |
| src/cascadia/TerminalSettingsEditor/Resources/ko-KR/Resources.resw | Updates localized dropdown strings (ko-KR). |
| src/cascadia/TerminalSettingsEditor/Resources/pt-BR/Resources.resw | Updates localized dropdown strings (pt-BR). |
| src/cascadia/TerminalSettingsEditor/Resources/qps-ploc/Resources.resw | Updates pseudo-locale dropdown strings (qps-ploc). |
| src/cascadia/TerminalSettingsEditor/Resources/qps-ploca/Resources.resw | Updates pseudo-locale dropdown strings (qps-ploca). |
| src/cascadia/TerminalSettingsEditor/Resources/qps-plocm/Resources.resw | Updates pseudo-locale dropdown strings (qps-plocm). |
| src/cascadia/TerminalSettingsEditor/Resources/ru-RU/Resources.resw | Updates localized dropdown strings (ru-RU). |
| src/cascadia/TerminalSettingsEditor/Resources/sr-Cyrl-RS/Resources.resw | Updates localized dropdown strings (sr-Cyrl-RS). |
| src/cascadia/TerminalSettingsEditor/Resources/uk-UA/Resources.resw | Updates localized dropdown strings (uk-UA). |
| src/cascadia/TerminalSettingsEditor/Resources/zh-CN/Resources.resw | Updates localized dropdown strings (zh-CN). |
| src/cascadia/TerminalSettingsEditor/Resources/zh-TW/Resources.resw | Updates localized dropdown strings (zh-TW). |
| src/cascadia/TerminalSettingsEditor/MainPage.cpp | Keeps shell integration initialization aligned with the consolidated enablement model. |
| src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.idl | Replaces per-toggle projected settings with dropdown selection + list model. |
| src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.h | Adds dropdown list/selection surface and policy “restricted” indicator. |
| src/cascadia/TerminalSettingsEditor/AIAgents.cpp | Wires updated resource keys for the new caption/hyperlink strings. |
| src/cascadia/TerminalApp/Resources/en-US/Resources.resw | Updates FRE UI strings/options and shell-integration error messaging (en-US). |
| src/cascadia/TerminalApp/Resources/en-GB/Resources.resw | Updates FRE UI strings/options and some error messaging (en-GB). |
| src/cascadia/TerminalApp/Resources/de-DE/Resources.resw | Updates FRE dropdown strings/options and related messaging (de-DE). |
| src/cascadia/TerminalApp/Resources/es-ES/Resources.resw | Updates FRE dropdown strings/options and related messaging (es-ES). |
| src/cascadia/TerminalApp/Resources/es-MX/Resources.resw | Updates FRE dropdown strings/options and related messaging (es-MX). |
| src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw | Updates FRE dropdown strings/options and related messaging (fr-FR). |
| src/cascadia/TerminalApp/Resources/fr-CA/Resources.resw | Updates FRE dropdown strings/options and related messaging (fr-CA). |
| src/cascadia/TerminalApp/Resources/it-IT/Resources.resw | Updates FRE dropdown strings/options and related messaging (it-IT). |
| src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw | Updates FRE dropdown strings/options and related messaging (ja-JP). |
| src/cascadia/TerminalApp/Resources/ko-KR/Resources.resw | Updates FRE dropdown strings/options and related messaging (ko-KR). |
| src/cascadia/TerminalApp/Resources/id-ID/Resources.resw | Updates FRE dropdown strings/options and related messaging (id-ID). |
| src/cascadia/TerminalApp/Resources/ms-MY/Resources.resw | Updates FRE dropdown strings/options and related messaging (ms-MY). |
| src/cascadia/TerminalApp/Resources/nl-NL/Resources.resw | Updates FRE dropdown strings/options and related messaging (nl-NL). |
| src/cascadia/TerminalApp/Resources/pt-PT/Resources.resw | Updates FRE dropdown strings/options and related messaging (pt-PT). |
| src/cascadia/TerminalApp/Resources/pt-BR/Resources.resw | Updates FRE dropdown strings/options and related messaging (pt-BR). |
| src/cascadia/TerminalApp/Resources/ru-RU/Resources.resw | Updates FRE dropdown strings/options and related messaging (ru-RU). |
| src/cascadia/TerminalApp/Resources/sr-Cyrl-RS/Resources.resw | Updates FRE dropdown strings/options and related messaging (sr-Cyrl-RS). |
| src/cascadia/TerminalApp/Resources/zh-CN/Resources.resw | Updates FRE dropdown strings/options and related messaging (zh-CN). |
| src/cascadia/TerminalApp/Resources/zh-TW/Resources.resw | Updates FRE dropdown strings/options and related messaging (zh-TW). |
| src/cascadia/TerminalApp/Resources/vi-VN/Resources.resw | Updates FRE dropdown strings/options and related messaging (vi-VN). |
| src/cascadia/TerminalApp/Resources/ur-PK/Resources.resw | Updates FRE dropdown strings/options and related messaging (ur-PK). |
| src/cascadia/TerminalApp/Resources/te-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (te-IN). |
| src/cascadia/TerminalApp/Resources/ta-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (ta-IN). |
| src/cascadia/TerminalApp/Resources/mr-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (mr-IN). |
| src/cascadia/TerminalApp/Resources/ml-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (ml-IN). |
| src/cascadia/TerminalApp/Resources/kok-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (kok-IN). |
| src/cascadia/TerminalApp/Resources/ne-NP/Resources.resw | Updates FRE dropdown strings/options and related messaging (ne-NP). |
| src/cascadia/TerminalApp/Resources/hi-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (hi-IN). |
| src/cascadia/TerminalApp/Resources/gu-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (gu-IN). |
| src/cascadia/TerminalApp/Resources/bn-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (bn-IN). |
| src/cascadia/TerminalApp/Resources/as-IN/Resources.resw | Updates FRE dropdown strings/options and related messaging (as-IN). |
| src/cascadia/TerminalApp/Resources/qps-ploc/Resources.resw | Updates pseudo-locale FRE dropdown strings/options and related messaging (qps-ploc). |
| src/cascadia/TerminalApp/Resources/qps-ploca/Resources.resw | Updates pseudo-locale FRE dropdown strings/options and related messaging (qps-ploca). |
| src/cascadia/TerminalApp/Resources/qps-plocm/Resources.resw | Updates pseudo-locale FRE dropdown strings/options and related messaging (qps-plocm). |
| src/cascadia/TerminalApp/FreOverlay.h | Replaces toggle handlers with dropdown selection plumbing in FRE. |
Review details
- Files reviewed: 116/116 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🔵 Needs a closer look
Several new/updated user-facing strings are misleading or inconsistent with the new dropdown’s local-only vs send-to-agent modes and should be corrected before approval.
Review details
Suppressed comments (5)
Previously missed (4) — in code that hasn't changed since the last review.
src/cascadia/TerminalApp/Resources/en-US/Resources.resw:1142
- This FRE dropdown description also says "Have your agent detect errors…", which is misleading for the local-only detection mode. Rewording to attribute detection to the terminal (and agent involvement only for the send-to-agent mode) should better match the three-state behavior.
src/cascadia/TerminalApp/Resources/en-US/Resources.resw:1260 - These FRE error messages refer to "Auto error handling", but the UI label for the setting is "Error detection". Aligning the term used in the error message with the visible setting name will make it clearer to users what was turned off (and avoids requiring locales to embed an English feature name in translated strings).
This issue also appears on line 1261 of the same file.
src/cascadia/TerminalApp/Resources/zh-CN/Resources.resw:1325
- This localized error message embeds the English feature name "Auto error handling" in the zh-CN string. Since the UI label is localized ("自动错误处理"), using the localized term here will read more naturally and avoids mixing languages in user-facing errors.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw:787 - The caption currently says "Have your agent detect errors…", but the "Detect errors automatically" option explicitly does not send failures to an agent. Consider wording this as the terminal detecting errors (and only involving the agent for the send-to-agent mode) to avoid confusing users about what data is shared.
src/cascadia/TerminalApp/Resources/en-US/Resources.resw:1264
- Same as the previous message: this string uses "Auto error handling" even though the UI presents the setting as "Error detection". Using the same term users see in the dropdown will reduce confusion.
<data name="FreOverlay_InstallErrorShellIntegrationExecutionPolicy" xml:space="preserve">
<value>PowerShell execution policy is blocking scripts. Auto error handling has been turned off.</value>
<comment>{Locked="PowerShell","Auto error handling"} FRE setup error. PowerShell execution policy blocked scripts, so Auto error handling was turned off.</comment>
</data>
- Files reviewed: 116/116 changed files
- Comments generated: 0 new
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🟡 Changes recommended
Some newly introduced user-facing strings are internally inconsistent with the new three-mode behavior and should be clarified/aligned before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 116/116 changed files
- Comments generated: 2
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🔵 Needs a closer look
There are remaining user-facing inconsistencies in policy-gated option availability and localized shell-integration failure wording that should be aligned before approval.
Review details
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
src/cascadia/TerminalApp/FreOverlay.cpp:278
- When Auto-fix is policy-blocked, the Settings page removes the “Detect and fix errors” option (AIAgentsViewModel skips it), but the FRE keeps it visible and just disables it. If the intended policy behavior is that the option is unavailable, consider skipping the item here too for consistency across Settings and FRE.
src/cascadia/TerminalApp/Resources/ur-PK/Resources.resw:288 - The updated translator comment says Auto error handling was turned off, but the localized value still says “error detection was turned off” (خرابی کی نشاندہی). This makes the message inconsistent with the renamed setting and also makes the comment’s {Locked="Auto error handling"} guidance inaccurate unless the value includes that token.
src/cascadia/TerminalApp/Resources/en-GB/Resources.resw:360
- This FRE error string still says “Error detection has been turned off”, but the rest of the PR renames the setting to “Auto error handling” (and this same file already uses that wording in the execution-policy error). This is inconsistent for users and makes it unclear which setting was disabled.
<data name="FreOverlay_InstallErrorShellIntegration" xml:space="preserve">
<value>Failed to install shell integration. Error detection has been turned off. You can re-enable it and try again, or save to continue without it.</value>
- Files reviewed: 116/116 changed files
- Comments generated: 0 new
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🟡 Changes recommended
The new AutoErrorHandling SettingContainer configuration can clear the ComboBox’s automation name (accessibility/UIA) due to SettingContainer applying an empty generated accessible name to non-Panel content when Header isn’t a string.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 24/24 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🔵 Needs a closer look
The new “Error detection” setting description text in multiple locales implies failed commands are always sent to the agent, which is incorrect for the “Detect errors” (local-only) mode.
Review details
Suppressed comments (16)
Previously missed (15) — in code that hasn't changed since the last review.
src/cascadia/TerminalSettingsEditor/Resources/de-DE/Resources.resw:2932
- This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/es-ES/Resources.resw:2932 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/fr-FR/Resources.resw:2933 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/it-IT/Resources.resw:2932 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw:2932 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/ko-KR/Resources.resw:2992 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/pt-BR/Resources.resw:2975 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/qps-ploc/Resources.resw:2923 - This description implies failed commands are always sent to an agent, but the “Detect errors” option explicitly does not send failures to an agent. The description should cover both modes (detect-only vs detect+send).
src/cascadia/TerminalSettingsEditor/Resources/qps-ploca/Resources.resw:2923 - This description implies failed commands are always sent to an agent, but the “Detect errors” option explicitly does not send failures to an agent. The description should cover both modes (detect-only vs detect+send).
src/cascadia/TerminalSettingsEditor/Resources/qps-plocm/Resources.resw:2923 - This description implies failed commands are always sent to an agent, but the “Detect errors” option explicitly does not send failures to an agent. The description should cover both modes (detect-only vs detect+send).
src/cascadia/TerminalSettingsEditor/Resources/ru-RU/Resources.resw:2975 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/sr-Cyrl-RS/Resources.resw:2990 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/uk-UA/Resources.resw:2636 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/zh-CN/Resources.resw:2992 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/zh-TW/Resources.resw:2932 - This description implies failed commands are sent to an agent unconditionally, but that only applies to the “Detect and fix errors” option. With “Detect errors”, failures should not be sent to an AI agent, so the description should be updated to reflect the optional nature of sending.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw:786
- The setting description says it will “send failed commands to your agent”, but that’s only true for the “Detect and fix errors” option. With “Detect errors”, failures are explicitly not sent to an agent, so this description is misleading.
<value>Have your agent automatically detect errors in the shell and send failed commands to your agent.</value>
- Files reviewed: 24/24 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Considered the latest review summary, but declining: this Settings description is the explicitly required verbatim product copy. The dropdown mapping in the PR description and the option-specific resource comments distinguish local-only detection from sending failures to the agent for fixes. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: db42c688-98f2-43c6-aa6e-bda061817e5a
There was a problem hiding this comment.
🟡 Changes recommended
The new en-US setting description text states failures are sent to the agent even though the dropdown includes a detect-only mode that explicitly does not send failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 24/24 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The new “Error detection” umbrella description text implies failures are always sent to the agent, which conflicts with the local-only “Detect errors” mode and should be corrected for accuracy.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 24/24 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The ComboBox selection binding currently boxes EnumEntry items in CurrentAutoErrorHandling(), which can break SelectedItem identity matching and leave the dropdown out of sync.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 24/24 changed files
- Comments generated: 1
- Review effort level: Lite
Summary
autoErrorDetectionEnabledandautoFixEnabledsettings so existing configurations remain compatibleSetting mapping
The dropdown does not introduce a new
autoErrorHandlingJSON setting. It continues to update the two existing boolean settings.autoErrorDetectionEnabledautoFixEnabledDetect errors"detect"truefalseDetect and fix errors"suggest"truetrueOff"off"falsefalseValidation
cargo build --target x86_64-pc-windows-msvc --manifest-path tools/wta/Cargo.tomlcmd.exe /c "tools\razzle.cmd && bz"SettingsModelUnitTests::CustomAgentAndPolicyTests::AutoErrorSettingsRoundtripSettingsModelUnitTests::CustomAgentAndPolicyTests::EffectiveAutoFixFalseWhenDetectionOffSettingsModelUnitTests::CustomAgentAndPolicyTests::AutoFixPolicyPreservesErrorDetectionRelated to #780 and #789.