Commit Graph

4964 Commits

Author SHA1 Message Date
Carlos Zamora
2c8a634ffa Remove 'Reset Profile' 2026-06-16 14:06:35 -07:00
Carlos Zamora
577bf32d4d Improve clear mechanism 2026-06-11 13:15:43 -07:00
Carlos Zamora
1d0461d163 Fix deep link for nested settings + Apply Description as AP.FullDescription 2026-06-11 12:09:19 -07:00
Carlos Zamora
93659aaacc spell 2026-06-10 17:13:25 -07:00
Carlos Zamora
844a8451ae Finish WCT Parity + simplify comments + code format 2026-06-10 16:36:45 -07:00
Carlos Zamora
977b4146cb Simplify PR for review 2026-06-09 17:14:56 -07:00
Carlos Zamora
feb35b7c8d Merge branch 'main' into dev/cazamor/sui-rejuv/setting-container 2026-06-09 14:10:36 -07: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
Carlos Zamora
f7eb2fbb08 remove SettingContainer; migrate everything to WCT controls 2026-05-20 19:19:03 -07:00
Carlos Zamora
6383fff42b complete port: visual styling confirmed to look like WCT 2026-05-19 19:24:34 -07:00
Carlos Zamora
58e3407de6 fix .Items and StyleExtensions 2026-05-19 17:51:18 -07:00
Carlos Zamora
a175b6291a fix disable handling for AlwaysShowTabs 2026-05-18 18:29:58 -07:00
Carlos Zamora
e60562d99d port chevron animation & click handling; use WCT styling 2026-05-18 17:36:50 -07:00
Carlos Zamora
96d0762a77 port over more WCT SettingsCard/Expander functionality 2026-05-18 15:06:28 -07:00
Carlos Zamora
c64b2433da code format 2026-05-15 13:28:47 -07:00
Carlos Zamora
17538eb499 Convert Navigators to SettingsCards 2026-05-15 13:28:30 -07:00
Carlos Zamora
edfc599d6d Consolidate SettingContainer styles 2026-05-15 12:50:53 -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
Carlos Zamora
acc1a59367 Port SettingsCard/Expander from WCT; have SettingContainer use it 2026-05-14 19:31:22 -07: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