Commit Graph

4962 Commits

Author SHA1 Message Date
Carlos Zamora
7283227485 Fix Export Tab leaking Enter via Command Palette 2026-06-23 18:08:28 -07:00
Anshika Jain
8824b02a78 Always use MRU tab focus on tab close regardless of TabSwitcherMode (#20272)
## Summary
Always focus the MRU (most recently used) tab when closing the current
tab, regardless of TabSwitcherMode setting.

## References
Fixes #19819

## Detailed Description
Removed the `TabSwitcherMode` check in `_RemoveTab` (TabManagement.cpp)
so tab-close focus behavior is always MRU-based, decoupling it from the
tab switcher preference as noted by @DHowett.

## Validation Steps
- Opened 3 tabs, navigated Tab3 → Tab1, closed Tab1
- With fix: Tab3 focused  (MRU)
- Without fix: Tab2 focused (next in order)

## PR Checklist
 Closes #19819
2026-06-23 18:20:08 +00:00
Phil Scott
0c4881bc9c Fixes xbox controller crashing the Terminal (#20234)
## Summary of the Pull Request
Fixes a denial of service by a toddler with an Xbox controller wanting
to play Forza. They can impatiently press up and down and close out the
terminal window.

Issue is upstream in WinUI, but I think this gathers things into a state
where Terminal can at least recover by adding a `GettingFocus` handler
on the `TabViewItem` that cancels that gamepad focus move before it
reaches the framework handler.

## References and Relevant Issues
Issue #19671 and #20089

## Validation Steps Performed
Handed a controller to my toddler while working in terminal. I also
banged on the keys myself.

## PR Checklist
Closes #19671 
Closes #20089
2026-06-23 10:27:17 -07:00
Dustin L. Howett
05b613cf06 Pre-warm SHGetKnownFolder to avoid a deadlock in the nvidia driver (#20351)
The nvidia driver attempts to use SHGetKnownFolder (which has its own
lock!) under the loader lock, which occasionally triggers a deadlock
when we attempt to do the same thing during settings load.

Closes #20350 (superseded)
Closes #20348

Co-authored-by: gleb <46842077+groovg@users.noreply.github.com>
2026-06-22 18:09:00 -05:00
Danyal Ahmed
d288fa09d6 Fix font face keyboard selection crash (#20255)
## Summary

Fixes a crash in the Settings UI font face control when selecting a font
suggestion with the keyboard and pressing Enter.

The font face `AutoSuggestBox` path was explicitly unfocusing the box
after a chosen suggestion was submitted. During the keyboard suggestion
commit path, that `Focus(FocusState::Unfocused)` call can trigger a
WinUI/XAML crash before the settings model update completes.

This change avoids explicitly unfocusing the `AutoSuggestBox` in the
chosen-suggestion path and instead commits the selected font and moves
focus to the parent container.

Fixes #20245.

## Validation

Manually validated with a local `CascadiaPackage` Debug x64 build:

- Reproduced the crash before the fix.
- Opened Settings → Defaults → Appearance → Font face.
- Typed a partial font name.
- Used arrow keys to select a suggestion.
- Pressed Enter.
- Verified Terminal no longer crashes.
- Verified the selected font is applied and Save works.
2026-06-22 14:53:05 -07:00
BamBamTram32
d21b580353 Update README.md (#20273)
Improved README accessibility alt text
2026-06-22 21:18:38 +00:00
Dustin L. Howett
0732b483ac Reflect OS PR !15916518: conhost: add ETL to our Feature Tests (#20334)
This may help us diagnose the OneCore windowing failures.

Related work items: MSFT-62650388
2026-06-22 12:16:54 -07:00
Windows Console Service Bot
47253ef22b Localization Updates - main - 06/17/2026 03:05:24 (#20330)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
2026-06-19 22:53:08 +00:00
Mike Griese
1282d56a33 Add support for "workspaces" based on window names (redux) (#20314)
This adds a new feature to the Windows Terminal: "Workspaces"

Workspaces are very shamelessly inspired by Edge workspaces of the same
name.

The core idea is that when users name a window and they close that
window, we will persist that Windows layout and buffers, seperately from
the rest of window restoration. So a user can open a named window, open
some profiles, some panes, do some stuff in it, then close it, and we
will keep that state around for the next time the user opens that window
name.

Unnamed windows still behave the same. If you close an unnamed window,
and it's not the last window, then we won't persist the state of it.

To facilitate restoring named windows, we add a `openWorkspace` action.
This allows us to persist the open workspace action in the window layout
restoration path. So when we deserialize the list of tab layouts, and
open workspace action will tell us, hey, go retrieve this known
workspace from the state.json, instead of trying to serialize the window
state in two places.

As demoed in the video, we add a flyout to list the windows that the
user has open, and the named workspaces that they have saved. This
allows users to quickly reopen previously closed workspaces, as well as
quickly rename a window, thereby adding it to the list of saved
workspaces. This button can also be hidden using the theme settings.

Closes #17084

(this is a reboot of #20162, but with the event from #20311)
2026-06-16 16:59:17 -05:00
Dustin L. Howett
94dfb15916 Import changes from os.2020 (#20322)
Sometimes, changes like this just appear and we have to deal with them.
2026-06-16 17:56:17 +00:00
Dustin L. Howett
b7108c6528 Don't ignore the user's default environment inheritance setting for wt (#20321) 2026-06-15 15:41:29 -05:00
Mike Griese
9853bc9607 Update formatting scripts for Preview-only VS and pwsh 7 (#20312)
This is a pair of changes to make the code formatting scripts work,
circa 2026.

* If you only have VS Insiders installed, then vswhere can't actually
find a clang-format to build with. You need `-prerelease` to let it also
find preview builds of VS.
* Years ago we updated OpenConsole.psm1 to only support pwsh 7. I, of
course, use `cmd` as my dev env for terminal, so I use `runformat.cmd`,
which always shelled to `powershell` (5). This updates that tool to use
pwsh 7. Clearly this impacted only me ever.

related to #20162
2026-06-11 17:02:51 -05:00
Mike Griese
2c9d15200e Convert the Open New Window handler to an event (#20311)
From ye old days where we were a multi-process app, we would
`shellexecute` to create a new Terminal process when we wanted to open a
new window.

Now that we're all one process (#18215), this dance doesn't make sense
anymore.

So: let's just add a bunch of plumbing to take the IContentArgs up to
the emperor and have it hand them back to a new window.

(this will be used to resurrect #20162)
2026-06-11 16:26:34 -05:00
Dustin L. Howett
60a58c93d7 Update the WinGet configs, vsconfig and README for VS 2026 (#20313) 2026-06-10 23:22:02 +00:00
Dustin L. Howett
fc958b13ce Move to Visual Studio 2026, SDK 26100 and toolset v145 (#20225) 2026-06-10 17:43:30 -05:00
Dustin L. Howett
56bb43c265 chore: upgrade gsl to 4.2.2 (#20306)
GSL 4.2.2 contains a fix for a warning (in GSL itself, natch!) that was
making MSVC quite upset with us.
2026-06-08 23:30:52 +00:00
Windows Console Service Bot
39e5453b19 Localization Updates - main - OSC 777 and Navigation Pane (#20277)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
Servicing-command: edit
2026-06-08 18:11:14 -05:00
Carlos Zamora
47e255f057 Revert "Fix Settings tab color mismatch with Settings page background (#19999)" (#20292)
This reverts commit 3ab2acc2ad aka Fix
Settings tab color mismatch with Settings page background (#19999).

Closes #20186
Re-opens #19873
2026-06-05 10:46:44 -07:00
Carlos Zamora
77e8ca9cb2 Revert "Add support for "workspaces" based on window names (#20162)" (#20291)
This reverts commit 4b8b6ffc67: Add
support for "workspaces" based on window names (#20162)

@DHowett found the following blocking issues:
-
https://github.com/microsoft/terminal/pull/20162#discussion_r3359134869
- unrelated changes in `tools/runformat.cmd` and `OpenConsole.psm1`
2026-06-04 16:35:29 -07:00
Mike Griese
4b8b6ffc67 Add support for "workspaces" based on window names (#20162)
This adds a new feature to the Windows Terminal: "Workspaces"

Workspaces are very shamelessly inspired by Edge workspaces of the same
name.

The core idea is that when users name a window and they close that
window, we will persist that Windows layout and buffers, seperately from
the rest of window restoration. So a user can open a named window, open
some profiles, some panes, do some stuff in it, then close it, and we
will keep that state around for the next time the user opens that window
name.

Unnamed windows still behave the same. If you close an unnamed window,
and it's not the last window, then we won't persist the state of it.

To facilitate restoring named windows, we add a `openWorkspace` action.
This allows us to persist the open workspace action in the window layout
restoration path. So when we deserialize the list of tab layouts, and
open workspace action will tell us, hey, go retrieve this known
workspace from the state.json, instead of trying to serialize the window
state in two places.

As demoed in the video, we add a flyout to list the windows that the
user has open, and the named workspaces that they have saved. This
allows users to quickly reopen previously closed workspaces, as well as
quickly rename a window, thereby adding it to the list of saved
workspaces. This button can also be hidden using the theme settings.

Closes #17084
2026-06-04 16:00:25 -05:00
Alimkhan Slambek
5aff9c9769 docs: fix DevOps capitalization in README (#20288)
## Summary of the Pull Request
Fix DevOps capitalization in README.

## Detailed Description of the Pull Request / Additional comments
Updated "Devops" to "DevOps" in README for consistent capitalization.

## Validation Steps Performed
* Checked README formatting
* Verified markdown renders correctly
2026-06-04 19:10:14 +00:00
Carlos Zamora
93bdbfaa3d Add support for OSC777 (Send Notification) (#20012)
## Summary of the Pull Request
targets #20010

This adds support for the `OSC 777 ; notify ; title ; body ST` sequence.
This allows client applications to send a notification to the Terminal.
When this notification is clicked, it summons the terminal window that
sent it.

## Validation Steps Performed
```pwsh
# in PowerShell. Terminal should not be focused.
sleep 2; Write-Output "`e]777;notify;Hello;This is a notification`a"
```

## PR Checklist
- [X] Closes #7718
- [ ] Documentation updated
- [X] Schema updated (if necessary)

Heavily based on #19938
Co-authored by @zadjii-msft
2026-06-03 17:54:01 -07:00
Dustin L. Howett
7d582e9290 chore: remove remaining references to ATL and MFC (#20260)
Apparently we got rid of ATL in 2019 with #719
2026-06-01 14:44:04 -07:00
Windows Console Service Bot
7fc12cf949 Localization Updates - "Dropdown Menu" (#20259)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
2026-05-29 14:00:30 -05:00
Carlos Zamora
00e0ecb8b5 Add screen reader announcement for opening/closing navigation pane (#20275)
## Summary of the Pull Request
Adds a manual event handler for `PaneOpened`/`PaneClosed` on the
navigation view in the settings UI. After catching the event, we raise a
UIA notification event to force the attached screen reader to read out
"Navigation pane opened/closed" appropriately. This experience aligns
with WinUI and the text is localized appropriately.

## Validation Steps Performed
 Narrator announces "Navigation pane opened/closed" appropriately
(aligns with WinUI 3 gallery experience)

## PR Checklist
Closes #19687 
📝 NOTE: the associated issue is currently affecting our accessibility
score
2026-05-29 18:57:00 +00:00
Dustin L. Howett
8ef8e95eb5 meta: add a solution filter that only opens conhost components (#20271)
It loads faster, and a full "solution" build produces everything
required to run and test conhost.
2026-05-29 10:37:13 -07:00
Mike Griese
458872a01a Preview the selected tab in tabSearch too (#20256)
Currently when you use the cmdpal in tabswitcher mode, we "preview"
switching to that tab. We don't do that for `tabSearch` mode though.

Fixing that was half a line of code. Now we do.

Closes #20233
2026-05-21 17:28:02 -07:00
Carlos Zamora
a8a5c88111 Redesign new tab menu page -> dropdown (#20203)
## Summary of the Pull Request
Renames the "New tab menu" page to "Dropdown menu".
Redesigns the page with the following notes:
- the preview is now on the right side so that it's always visible
- moves preview buttons into border with previewed new tab menu entries
- when the window narrows, removes the icons from the controls, then
changes layout to be vertical so that it all fits.

Aside from the main redesign changes above, a lot of the other changes
are to make sure that spacing and alignment looks ok.

## Validation Steps Performed
- [x] Wide view
- [x] Medium width view
- [x] Narrow view

## PR Checklist
Related to #17000
2026-05-21 13:42:51 -07:00
Dustin L. Howett
8fe6c21ef8 Keep the font size delta across settings reloads (#20230)
This is a trivial fix for an issue we get a somewhat outsized number of
complaints about.

When the user has adjusted the font size in any direction, we'll just
keep track of the magnitude and apply it every time the settings change.

Yes, this means that if you zoom once and then change your real font
size it's going to zoom even more.

That probably doesn't matter.

Refs #11522
2026-05-15 13:56:48 -05:00
aarushi singh
abeac1b135 Use PlaySoundW for profile bell sounds (#20031)
We believed that this would fix an issue on Windows 10, where the volume
mixer would forget Windows Terminal after every relaunch. It turns out
that it does not.

Still, this code is much more concise and doesn't require yet another
WinRT object. Story of our lives.

Refs #17733
2026-05-15 20:51:01 +02:00
aarushi singh
12e3455bb2 Make DECSTR cursor restore behave like xterm in alt screen buffer (#20032)
There is some disagreement among terminal emulators as to whether DECSTR
(and therefore, soft reset) restores the cursor in the active buffer or
in all buffers.

We had previously chosen to restore the cursor in all buffers.

xterm restores the cursor only in the active buffer.

Closes #19918
2026-05-14 17:04:58 +00:00
Lucas Trzesniewski
fb71a0462e Add safeUriSchemes setting (#20207)
This adds a `safeUriSchemes` global setting which lets you define
hyperlink URI schemes which the user considers safe. No confirmation
dialog will be shown when trying to open hyperlinks which use these
schemes.

- This solves the root issue, but doesn't introduce any UI or
  documentation changes. I wanted to validate the approach and
  implementation with you first.
- I closely followed the code handling the `disabledProfileSources`
  setting, which is of the same type.
- This feature does not change the behavior of `http`, `https` and
  `file` schemes.

Validation

I ran the dev terminal, and tested the behavior by clicking on `vscode`
hyperlinks generated by ripgrep with various `safeUriSchemes` settings:

- Setting not defined - asks for confirmation
- `["vscode"]` - does not ask for confirmation
- `["foo", "vscode"]` - does not ask for confirmation
- `["foo"]` - asks for confirmation
- `null` - asks for confirmation
- `[]` - asks for confirmation
- `[""]` - asks for confirmation
- `[{"foo": "bar"}]` - fails to deserialize (as expected)

A few uinit tests failed, but they seem unrelated to these changes:
- `KeyBindingTests` in `UnitTests_SettingsModel`, probably because I use
  an AZERTY keyboard.
- A few `Conhost` tests, but I didn't touch this part

Refs #20065
Closes #20191
2026-05-12 21:32:56 +00:00
Dustin L. Howett
c829d4ca54 sixel: prevent allocating an absurd amount of memory or writing OOB (#20213)
This commit implements two fixes for the integer overflow/out-of-bounds
write reported in #20149.

First, it catches any exception generated in sixel char processing
(which will prevent `out_of_memory` or `bad_alloc` from being ignored
sight-unseen, and will prevent the consumption of further DCS content).

Second, it prevents us from allocating memory for an image which will
never be displayed (because it exceeds the height of the display.)

This supersedes prior work in #20153 for the same issues.

Closes #20149
Closes #20153

Co-authored-by: James Holderness <j4_james@hotmail.com>
2026-05-12 18:15:19 +02:00
Dustin L. Howett
b991eb048e Only set startingTitle once, clear up title fallback handling (#20214)
This commit ensures that we only set the starting title once when we
open a new terminal pane.

It also consolidates all title selection into Terminal::GetConsoleTitle,
which is now used in the TitleChanged event.

TitleChanged no longer stores a separate copy of the starting title if
an application attempts to _clear_ the title; that seems like a poorer
implementation of what we already had.

This supersedes work in #20204.

Closes #19340
Closes #20204

Co-authored-by: imsh <im.shaedar@gmail.com>
2026-05-12 00:08:57 +00:00
Dustin L. Howett
3e3b3ad883 Reject DTTERM Window Manipulation resizes with the current size (#20183)
This may help #20182 and #20112
Closes #19310
2026-05-11 17:42:18 -05:00
Windows Console Service Bot
d3f76e7acf Localization Updates - main - 05/07/2026 03:04:15 (#20196)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
2026-05-07 14:03:13 -05:00
Windows Console Service Bot
ea4cb8145f Localization Updates - main - 04/30/2026 03:04:35 (#20168)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
2026-05-06 16:36:17 -05:00
Sushaanth Srinivasan
a325a2fa5a Fix settings error text legibility in High Contrast mode (#20098)
Closes #18147

`SystemErrorTextColor` doesn't adapt to High Contrast themes, so the
error details in the "Failed to reload settings" dialog are illegible
(yellow on cream in HC White, for example).

Fix: skip the `ErrorTextBrush` foreground override when High Contrast is
active, letting the text inherit the system HC text color from its
parent element. This matches the existing HC detection pattern used in
`TermControl.cpp` and `MainPage.cpp`.

Validated manually on High Contrast White and Night sky themes.

Co-authored-by: SushaanthSrinivasan <SushaanthSrinivasan@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-06 02:35:16 +00:00
nmurrell07
dadde2fb11 fix(resizePane): Mark as handled only when resize succeeds (#20001)
This fix addresses issue #19983 where resizePane actions unconditionally
consume keystrokes even when no resize can occur.

The fix follows the same pattern used for moveFocus and swapPane fixes:
- Changed Tab::ResizePane to return bool indicating success
- Changed TerminalPage::_ResizePane to return bool from ResizePane  
- Updated _HandleResizePane to set args.Handled() based on whether
resize succeeded

This allows the keychord to propagate to the terminal when no resize can
occur, matching the behavior of moveFocus and swapPane (#6129).

Closes #19983

---------

Co-authored-by: nmurrell07 <nmurrell07@users.noreply.github.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
2026-05-05 19:42:48 +00:00
Dustin L. Howett
8edac5fb12 Don't allow overflowing lengths in WM_COPYDATA (#20185)
It is possible to craft a packet whose `len` is `0x80000001`.

We should not produce values that do not fit in size_t (on e.g. x86).

Reject them summarily.
2026-05-05 19:19:25 +00:00
Dustin L. Howett
dbc5177f7f Migrate some pull requests from OS (#20181)
Some work was required to ensure conhost builds.

---------

Co-authored-by: Dragos Sambotin <dragoss@microsoft.com>
Co-authored-by: Daniel Paoliello (HE HIM) <danpao@microsoft.com>
2026-05-05 00:34:13 +00:00
Carlos Zamora
b753e3dee3 Replace confirmCloseAllTabs with confirmOnClose (#20055)
## Summary of the Pull Request
Replaces the `warning.confirmCloseAllTabs` setting with a
`warning.confirmOnClose` enum setting that accepts the following:
- `never`: don't present a warning dialog when closing a session
- `automatic`: present a warning dialog when closing multiple tabs/panes
at once
- `always`: present a warning dialog when closing any session

The confirmation dialog contains a "don't ask me again" checkbox. When
checked, we update the setting to `never`.

This setting also affects the following actions:
- "close other tabs"
- "close tabs after"
- "close other panes"
- "quit"
The appropriate confirmation dialog is shown in these scenarios. We also
present an aggregate dialog instead of prompting the user once per
tab/pane. If there are no other tabs/panes, we don't present a dialog
and treat the key binding as unhandled (passing the key through).

## References and Relevant Issues
Iteration of #19944 

## Validation Steps Performed
- closing a tab:
   -  1 pane --> no dialog
   -  2 panes --> dialog
   -  action and middle clicking tab trigger same flow
- close all other tabs:
   -  no other tabs --> no dialog
   -  1 other tab --> dialog
- close all other panes:
   -  1 pane --> no dialog
   -  2 panes --> dialog
- close all tabs after the current tab:
   -  no tabs after --> no dialog (even if tabs before)
   -  1 tab after --> dialog
- close window:
   -  2 tabs --> dialog
   -  2 panes --> dialog
   -  1 tab with one pane --> no dialog
- Quit the Terminal:
   -  3 windows --> dialog
   - 1 window --> dialog
-  "don't ask me again" checkbox checked --> setting changed to "never"
-  "never" --> no dialog for scenarios above
-  "always" --> dialog always appears, even when closing a single pane

## PR Checklist
Closes #5301 
Closes #6641
"don't ask me again" checkbox is also mentioned in #10000 

Co-authored by @zadjii-msft
2026-05-04 10:43:34 -07:00
Carlos Zamora
a834313fb7 Add a setting for sending a notification on BEL (#20011)
## Summary of the Pull Request
Targets #20010 

Adds another `bellStyle` flag option. This sends a windows toast
notification to the user when a BEL is encountered

- [X] Closes #18605 
- [ ] Documentation updated

Heavily based on #19936 
Co-authored by @zadjii-msft
2026-05-04 10:38:17 -07:00
Carlos Zamora
059986ebce [Unpackaged] Fix taskbar glomming due to AUMID (#20064)
The bug was caused by an AUMID mismatch between the Taskbar's .lnk file
and Windows Terminal. Since no AUMID was associated with the .exe, the
OS automatically creates one for us. However, #20018 added an AUMID for
unpackaged scenarios, so now there was a mismatch, resulting in a new
taskbar entry being created.

To fix this, we check if a .lnk points to our .exe in the taskbar.
There's 3 cases here:
1. no .lnk of interest exists --> set the AUMID normally
2. the .lnk carries our AUMID --> set the AUMID normally
3. the .lnk doesn't have an AUMID (aka uses the auto-resolved one) -->
- for this launch: don't set the AUMID so that we both use the
auto-resolved one
- on next launch: set the AUMID on the .lnk and process so that they all
agree

## Validation Steps Performed
In unpackaged folder, move WindowsTerminal.exe to the taskbar (creates
.lnk)...
 Double-click the .exe --> Same taskbar entry is used
 Double-click the .exe _again_ --> second window goes to same taskbar
entry

The first window doesn't have to close for this to work. It just * works
*!

Bug introduced in #20018 
Closes #20053
2026-05-01 16:56:19 -05:00
Carlos Zamora
e4e3f08efc Add toast notification infrastructure (#20010)
## Summary of the Pull Request
Adds the infrastructure for toast notifications. Breakdown:
- `DesktopNotification`:
- `DesktopNotificationArgs` includes the struct to group all
notification-related data together.
   - `SendNotification()` actually sends it
- `AppCommandlineArgs.cpp`: added a check for the `--from-toast` no-op
sentinel; ensures no new window is created
- Most of the other changes are just bubbling up the notification from
the `TerminalPaneContent` to `TerminalPage`
- `TabManagement.cpp`: `_SendDesktopNotification()` does the final
packaging of the notification before calling the `DesktopNotification`
API

This supports finding the right tab when it's been reordered or even
moved to a new window!
This also has expanded to support finding the right pane, which is
resilient to pane swaps/closing too. When the pane can't be found, we
just fallback to the tab.
If the pane is already focused, we don't send a notification.

This simply adds the infrastructure! Looks like nothing can actually
take advantage of it yet, but it's been tested with the changes in
#20011.

Heavily based on #19935
Co-authored by @zadjii-msft
2026-04-29 17:24:45 -07:00
Dustin L. Howett
84e807cbeb appx: add appLicensing to Preview and Stable manifests (#20163)
This should prevent an outage like the one from #19764
2026-04-29 17:04:16 -05:00
Carlos Zamora
115ec2cbb9 Fix rounding error for word selection (#20084)
## Summary of the Pull Request
Dustin reported this bug to me. Thankfully it was an easy fix.

## References and Relevant Issues
Bug from implementing #5099

## Validation Steps Performed
Double-click ____ of right-most cell of a word selects the current word
 right-half
 left-half
2026-04-29 17:01:43 -05:00
Carlos Zamora
3362651659 Tab menu: show "restart" + maintain items' enable state (#19972)
## Summary of the Pull Request
Changes how/when we display the "restart connection" item in the tab's
context menu. Now, we always display it, but it's disabled if we're not
in a terminal tab.

Applies similar enable/disable logic to the rest of the menu items.
Previous to this, they just wouldn't do anything (which is fair, they
didn't make any sense).

## Validation Steps Performed
Check tab's menu in following scenarios:
 terminal pane
 settings tab
 snippets pane

Closes #18891
2026-04-29 18:54:43 +00:00
Carlos Zamora
c72600dd4f Add more settings model unit tests (#20117)
## Summary of the Pull Request
Adds tests to `UnitTests_SettingsModel` to improve coverage. Tests
include:
- `SettingInheritanceFallback`: Settings inherit from user defaults;
unset settings fall back to built-in defaults
- `ClearSettingRestoresInheritance`: `ClearXxx()` removes the value at
the current layer, causing fallback to the parent
- `HasSettingAtSpecificLayer`: `HasXxx() `distinguishes explicitly set
values from inherited ones
- `ModifyProfileSettingAndRoundtrip`: Change a profile setting via
setter and `ToJson()` reflects it
- `ModifyGlobalSettingAndRoundtrip`: Change global settings via setter
and `ToJson()` reflects them
- `ModifyColorSchemeAndRoundtrip`: Change a color scheme property and
the serialized JSON reflects it
- `FixupUserSettingsDetectsChanges`: A clean roundtrip produces
idempotent FixupUserSettings() (returns false)
- `FixupCommandlinePatching`: 4 sub-cases: CMD/PowerShell short names
get patched to full paths, no-op when already clean, custom profiles are
untouched

This also updates `TestCloneInheritanceTree` to verify that `HasXxx()`
and settters that modify the clone don't modify the original.

This is being done in preparation for auto-save to help ensure we don't
have any regressions.

## Validation Steps Performed
 Tests pass
 Manually reviewed the new tests, they make sense and do add value
(though some are less valuable than others, admittedly)
 Sent Copilot on a quest to ensure we're not adding redundant tests. It
did catch a few and remove them fwiw.
2026-04-29 10:16:30 -07:00
Windows Console Service Bot
eeb9f7a805 Localization Updates - minor wording changes after spell check - 04/24/2026 03:05:26 (#20140)
Co-authored-by: Console Service Bot <consvc@microsoft.com>
2026-04-28 03:41:39 +00:00