[PR #11325] [MERGED] Fix layering of fragment profiles #28497

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11325
Author: @lhecker
Created: 9/24/2021
Status: Merged
Merged: 9/24/2021
Merged by: @undefined

Base: mainHead: dev/lhecker/11323-fragments-layering-fixup


📝 Commits (1)

  • 1155333 Fix layering of fragment profiles

📊 Changes

2 files changed (+25 additions, -17 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+24 -17)

📄 Description

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 ✔️

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11325 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 9/24/2021 **Status:** ✅ Merged **Merged:** 9/24/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/11323-fragments-layering-fixup` --- ### 📝 Commits (1) - [`1155333`](https://github.com/microsoft/terminal/commit/1155333ba3d04b812dfce925b41a64a5af2c777c) Fix layering of fragment profiles ### 📊 Changes **2 files changed** (+25 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+24 -17) </details> ### 📄 Description 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 ✔️ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:28:55 +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#28497