[PR #19239] Add SSH folder to NTM for dynamic profiles #31759

Open
opened 2026-01-31 09:49:21 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19239

State: closed
Merged: Yes


Summary of the Pull Request

Automatically generates an "SSH" folder in the new tab menu that contains all profiles generated by the SSH profile generator. This folder is created if the SSH generator created some profiles and the folder hasn't been created before. Detecting if the folder was generated is done via the new bool ApplicationState::SSHFolderGenerated. The logic is similar to SettingsLoader::DisableDeletedProfiles().

Found a bug on new tab menu's folder inlining feature where we were counting the number of raw entries to determine whether to inline or not. Since the folder only contained the match profiles entry, this bug made it so that the profile entries would always be inlined. The fix was very simple: count the number of resolved entries instead of the raw entries. This can be pulled into its own PR and serviced, if desired.

References and Relevant Issues

#18814
#14042

Validation Steps Performed

Existing users get an SSH folder if profiles were generated

PR Checklist

Closes #19043

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19239 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Automatically generates an "SSH" folder in the new tab menu that contains all profiles generated by the SSH profile generator. This folder is created if the SSH generator created some profiles and the folder hasn't been created before. Detecting if the folder was generated is done via the new `bool ApplicationState::SSHFolderGenerated`. The logic is similar to `SettingsLoader::DisableDeletedProfiles()`. Found a bug on new tab menu's folder inlining feature where we were counting the number of raw entries to determine whether to inline or not. Since the folder only contained the match profiles entry, this bug made it so that the profile entries would always be inlined. The fix was very simple: count the number of _resolved_ entries instead of the raw entries. This can be pulled into its own PR and serviced, if desired. ## References and Relevant Issues #18814 #14042 ## Validation Steps Performed ✅ Existing users get an SSH folder if profiles were generated ## PR Checklist Closes #19043
claunia added the pull-request label 2026-01-31 09:49:21 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31759