[PR #11346] [MERGED] Fix all fragments not loading when one is badly formed #28505

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11346
Author: @lhecker
Created: 9/28/2021
Status: Merged
Merged: 10/1/2021
Merged by: @undefined

Base: mainHead: dev/lhecker/11330-fix-fragment-regression


📝 Commits (2)

  • 1d14443 Fix all fragments not loading when one is badly formed again
  • e425366 Address Carlos' comments

📊 Changes

2 files changed (+113 additions, -53 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.h (+14 -1)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+99 -52)

📄 Description

This commit introduces a number of poor abstractions to split
SettingsLoader::_parse into _parse for content in the format of the user's
settings.json and _parseFragment which is specialized for fragment files.
The latter suppresses exceptions and supports the "updates" key for profiles.

PR Checklist

Validation Steps Performed

  • Wrote the following to
    %LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\test\test.json:
    {
      "profiles": [
        {
          "name": "bad",
          "unfocusedAppearance": ""
        },
        {
          "name": "good"
        },
        {
          "updates": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
          "background": "#333"
        }
      ]
    }
    
  • Ensured that "bad" is ignored ✔️
  • Ensured that "good" shows up and works ✔️
  • Ensured that the pwsh profile has a gray background ✔️

🔄 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/11346 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 9/28/2021 **Status:** ✅ Merged **Merged:** 10/1/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/11330-fix-fragment-regression` --- ### 📝 Commits (2) - [`1d14443`](https://github.com/microsoft/terminal/commit/1d14443ed587bdbf435962aaa66361ee259d6210) Fix all fragments not loading when one is badly formed again - [`e425366`](https://github.com/microsoft/terminal/commit/e425366ce2157834c28fbed245d72917432c9f69) Address Carlos' comments ### 📊 Changes **2 files changed** (+113 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.h` (+14 -1) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+99 -52) </details> ### 📄 Description This commit introduces a number of poor abstractions to split `SettingsLoader::_parse` into `_parse` for content in the format of the user's settings.json and `_parseFragment` which is specialized for fragment files. The latter suppresses exceptions and supports the "updates" key for profiles. ## PR Checklist * [x] Closes #11330 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Wrote the following to `%LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\test\test.json`: ```json { "profiles": [ { "name": "bad", "unfocusedAppearance": "" }, { "name": "good" }, { "updates": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "background": "#333" } ] } ``` * Ensured that "bad" is ignored ✔️ * Ensured that "good" shows up and works ✔️ * Ensured that the pwsh profile has a gray background ✔️ --- <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:58 +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#28505