[PR #11325] Fix layering of fragment profiles #28502

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

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

State: closed
Merged: Yes


This commit fixes layering of fragment profiles without an update key.
The previous CascadiaSettings deserializer first assembled all builtin
profiles and only then parsed the user's settings.json file.
This meant that even though fragment profiles were added to _allProfiles
unconditionally, they did get layered properly with user profiles regardless,
as user profiles were always properly layered.

The new CascadiaSettings approach since 168d28b was a direct translation of this
approach but this is incorrect: As the new approach reads user profiles first,
all inbox profiles, including fragments, must equally use proper layering,
instead of adding profiles unconditionally.

While this commit fixes the bug it maintains a regression:
Duplicate fragment profile GUIDs will not be detected and instead fragments with
identical GUID will all be added as parents to a single user profile.
I considered to fix this regression, but felt that this new behavior is better
than the old one, since a user often can't directly control installed fragments,
and is unlikely to occur in practice. This simplifies the implementation.

PR Checklist

Validation Steps Performed

  • Fragment layering works ✔️
**Original Pull Request:** https://github.com/microsoft/terminal/pull/11325 **State:** closed **Merged:** Yes --- This commit fixes layering of fragment profiles without an update key. The previous CascadiaSettings deserializer first assembled all builtin profiles and only then parsed the user's settings.json file. This meant that even though fragment profiles were added to `_allProfiles` unconditionally, they did get layered properly with user profiles regardless, as user profiles were always properly layered. The new CascadiaSettings approach since 168d28b was a direct translation of this approach but this is incorrect: As the new approach reads user profiles first, all inbox profiles, including fragments, must equally use proper layering, instead of adding profiles unconditionally. While this commit fixes the bug it maintains a regression: Duplicate fragment profile GUIDs will not be detected and instead fragments with identical GUID will all be added as parents to a single user profile. I considered to fix this regression, but felt that this new behavior is better than the old one, since a user often can't directly control installed fragments, and is unlikely to occur in practice. This simplifies the implementation. ## PR Checklist * [x] Closes #11323 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Fragment layering works ✔️
claunia added the pull-request label 2026-01-31 09:28:57 +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#28502