Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting the reference to a profile from a JSON fragment file prevents the profile from showing back up again even when the profile still exists in the fragment file. #13916

Open
danmock opened this issue Sep 2, 2022 · 8 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Milestone

Comments

@danmock
Copy link

danmock commented Sep 2, 2022

Windows Terminal version

1.14.2282.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

  1. Create a fragment file with a profile in it.
    • Absolute path: $Env:LocalAppData\Microsoft\Windows Terminal\Fragments\TestFragmentDir\testFragment.json
  2. Launch Windows Terminal.
  3. The profile from the fragment file appears in the profile drop down.
  4. Close Windows Terminal.
  5. Remove the reference to the testFragment.json profile from the settings.json file.
  6. Launch Windows Terminal.
  7. The profile from the fragment file does not appear in the profile drop down.
  8. The fragment file with the profile in it still exists, along with the profile.

Expected Behavior

Either:

  • Remove the profile from the fragment file testFragment.json in addition to the reference to said profile from the settings.json file.

or

  • Upon reopening Windows Terminal after removing the reference to the testFragment.json profile from the settings.json file, the reference should reappear (as the fragment file containing the profile still exists).

Actual Behavior

As listed in Steps to reproduce.


Scenario where this is an issue:

  • My team provides users a set of fragment files containing profiles (with very specific GUIDs).
    • The fragment files are automatically generated as part of a script which users execute.
    • These profiles define the CLIs which users must interact with for interfacing with a set of repositories.
  • User U tinkers with their settings.json file, removing several profiles, including references to the profiles from the fragment files that we provided them.
  • U no longer sees the profiles associated with the fragment files we gave them, even though the fragment files still exist and have not been modified.
  • U alerts our team that they see the profiles in the fragment files, yet Windows Terminal won't show them.
  • U informs that they are unable to access the CLIs associated with their work (as defined by the profiles in the fragment files).
  • U deletes their repository, re-clones it, then generates the fragment files again, in an attempt to get Windows Terminal to show the CLIs for the repository.
  • U smashes their keyboard into their monitor when nothing is working, and promptly leans back in their chair and contemplates their life choices.
@danmock danmock added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Sep 2, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 2, 2022
@carlos-zamora carlos-zamora added the Needs-Discussion Something that requires a team discussion before we can proceed label Sep 2, 2022
@DHowett
Copy link
Member

DHowett commented Sep 2, 2022

Thanks for filing this, @danmock. There's definitely a few things we could do to make this experience better.

Off the top of my head:

As a stop-gap, do any of those things help?

We'll make sure to discuss this at a team meeting.

@lhecker
Copy link
Member

lhecker commented Sep 2, 2022

I was about to write a response as well. To just state some things that @DHowett left unsaid: The specific PR which changed this is #11007. This change was quite important to make profile deletions less confusing. For instance Visual Studio 17.3 now ships with the "VSDebugConsole" fragment. Without this change it would be impossible to properly get rid of that profile for anyone who has Visual Studio installed. But if you do need it back it still shows up ready to be cloned at any time:

image

IMO, if anything, we should improve our UX in regards to profile creation to make the discovery of previously deleted profiles more obvious to users.

@danmock
Copy link
Author

danmock commented Sep 3, 2022

Are the deleted profiles from the Duplicate a profile dropdown cached copies of the profiles as they existed when they were deleted?

@DHowett
Copy link
Member

DHowett commented Sep 3, 2022

This is where it gets weird, and why I'm not comfortable closing this out as "solved" or anything.

The profiles in that list are the actual "deleted" ones. There's a few boring and indepth reasons for that... but suffice it to say we still deserialize all of the fragments and dynamic profiles and everything before we choose which ones to show.

When you create one using Duplicate, though, you get a new profile, with a new GUID that is a deep copy of the original fragment. It's not connected to it any more. It's a weird ethereal plane version of the original fragment. ☹️

@danmock
Copy link
Author

danmock commented Sep 3, 2022

I see. For our use case that would be problematic since we require a specific GUID for the profile, for each profile.

@zadjii-msft
Copy link
Member

another related thread: #11510

@zadjii-msft zadjii-msft removed the Needs-Discussion Something that requires a team discussion before we can proceed label Sep 12, 2022
@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. labels Oct 24, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 24, 2022
@carlos-zamora carlos-zamora removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 22, 2023
@carlos-zamora carlos-zamora added this to the Terminal v1.19 milestone Mar 22, 2023
@zadjii-msft zadjii-msft modified the milestones: Terminal v1.19, Backlog Oct 4, 2023
DHowett added a commit that referenced this issue Nov 15, 2024
The original intent with dynamic profiles was that they could be
uninstalled but that Terminal would remember your settings in case they
ever came back.

After we implemented dynamic profile _deletion_, however, we
accidentally made it so that saving your settings after a dynamic
profile disappeared scoured it from the planet _forever_ (since we
remembered that we generated it, but now it was no longer in the
settings file).

This pull request implements:

- Tracking for orphaned dynamic profiles
- A new settings page for the profile that explains what happened
- Badging on the Navigation Menu indicating which profiles are orphaned
and which are hidden

Closes #14061
Closes #11510 
Refs #13916 
Refs #9997
DHowett added a commit that referenced this issue Nov 16, 2024
The original intent with dynamic profiles was that they could be
uninstalled but that Terminal would remember your settings in case they
ever came back.

After we implemented dynamic profile _deletion_, however, we
accidentally made it so that saving your settings after a dynamic
profile disappeared scoured it from the planet _forever_ (since we
remembered that we generated it, but now it was no longer in the
settings file).

This pull request implements:

- Tracking for orphaned dynamic profiles

Closes #14061
Closes #11510
Refs #13916
Refs #9997

Modified for 1.22. I am not including any of the UI affordances.

(cherry picked from commit 90866c7)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgU1-p4
Service-Version: 1.22
@zadjii-msft
Copy link
Member

@DHowett So this... wasn't also closed by #18188?

@DHowett
Copy link
Member

DHowett commented Nov 18, 2024

Correct! It’s backwards from the others - the user deletes their personal stub for a fragment and it never comes back (by design today, but Carlos’ Wxtensions page will help solve this.)

DHowett added a commit that referenced this issue Nov 18, 2024
The original intent with dynamic profiles was that they could be
uninstalled but that Terminal would remember your settings in case they
ever came back.

After we implemented dynamic profile _deletion_, however, we
accidentally made it so that saving your settings after a dynamic
profile disappeared scoured it from the planet _forever_ (since we
remembered that we generated it, but now it was no longer in the
settings file).

This pull request implements:

- Tracking for orphaned dynamic profiles

Closes #14061
Closes #11510
Refs #13916
Refs #9997

Modified for 1.22. I am not including any of the UI affordances.

(cherry picked from commit 90866c7)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgU1-p4
Service-Version: 1.22
DHowett added a commit that referenced this issue Nov 18, 2024
The original intent with dynamic profiles was that they could be
uninstalled but that Terminal would remember your settings in case they
ever came back.

After we implemented dynamic profile _deletion_, however, we
accidentally made it so that saving your settings after a dynamic
profile disappeared scoured it from the planet _forever_ (since we
remembered that we generated it, but now it was no longer in the
settings file).

This pull request implements:

- Tracking for orphaned dynamic profiles

Closes #14061
Closes #11510
Refs #13916
Refs #9997

Modified for 1.22. I am not including any of the UI affordances.

(cherry picked from commit 90866c7)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgU1-p4
Service-Version: 1.22
(cherry picked from commit 2143ca1)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgU2frw
Service-Version: 1.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants