[PR #2803] Add a schema reference to the userDefaults and patch one into user data #25084

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

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

State: closed
Merged: Yes


Summary of the Pull Request

This pull request both adds a schema to the default JSON file written out for the user and adds code to patch a $schema into existing user settings.

References

#2704

PR Checklist

  • Tests added/passed/updated
  • I've discussed this with core contributors already.

Detailed Description of the Pull Request / Additional comments

We have to re-parse the settings string after every patch, because there's a chance the object offsets have moved around on us. Alternatively, we could always patch from the bottom up. That approach seems more fragile, even if it's technically faster.

Validation Steps Performed

The tests probably fail, but I tried it locally against my settings file :P

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2803 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request This pull request both adds a schema to the default JSON file written out for the user and adds code to patch a `$schema` into existing user settings. ## References #2704 ## PR Checklist * [ ] Tests added/passed/updated * [ ] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments We have to re-parse the settings string after every patch, because there's a chance the object offsets have moved around on us. Alternatively, we could always patch from the bottom up. That approach seems more fragile, even if it's technically faster. ## Validation Steps Performed The tests probably fail, but I tried it locally against my settings file :P
claunia added the pull-request label 2026-01-31 09:07:11 +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#25084