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

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

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

State: closed
Merged: Yes


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 ✔️
**Original Pull Request:** https://github.com/microsoft/terminal/pull/11346 **State:** closed **Merged:** Yes --- 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 ✔️
claunia added the pull-request label 2026-01-31 09:28:59 +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#28510