[PR #9079] Introduce setting override tracking and update SettingContainer #27419

Closed
opened 2026-01-31 09:21:51 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


This PR adds improved override message generation for inheritance in
SUI. The settings model now has an OriginTag to be able to denote
where a Profile came from. This tag is used in the SettingContainer
to generate a more specific override message.

References

#6800 - SUI Epic
#8919 - SUI Inheritance PR
#8804 - SUI Inheritance (old issue)

Detailed Description of the Pull Request / Additional comments

  • Terminal Settings Model
    • Introduced PROJECTED_SETTING as a macro to more easily declare the
      functions for each setting
    • Introduced <setting>OverrideSource which finds the Profile that
      has <setting> defined
    • Introduced OriginTag Profile::Origin {Custom, InBox, Generated} to
      trace where a profile came from
    • DefaultProfileUtils creates profiles for profile generators. So
      that now sets the Origin tag to Generated
    • CascadiaSettings::LoadDefaults() tags all profiles created as
      InBox.
    • The view model had to ingest the API change to be able to interact
      with <setting>OverrideSource
  • Override Message Generation
    • The reset button now has a more specific tooltip
    • The reset button now only appears if base layer is being overridden
    • We use the settings model changes to determine the message to
      display for the target

Validation Steps Performed

Tested the following cases:

  • overrides nothing (inherited setting)
  • overrides value inherited from...
    • base layer
    • a profile generator
    • in-box profile
  • global settings should not have this feature
**Original Pull Request:** https://github.com/microsoft/terminal/pull/9079 **State:** closed **Merged:** Yes --- This PR adds improved override message generation for inheritance in SUI. The settings model now has an `OriginTag` to be able to denote where a `Profile` came from. This tag is used in the `SettingContainer` to generate a more specific override message. ## References #6800 - SUI Epic #8919 - SUI Inheritance PR #8804 - SUI Inheritance (old issue) ## Detailed Description of the Pull Request / Additional comments - **Terminal Settings Model** - Introduced `PROJECTED_SETTING` as a macro to more easily declare the functions for each setting - Introduced `<setting>OverrideSource` which finds the `Profile` that has \<setting\> defined - Introduced `OriginTag Profile::Origin {Custom, InBox, Generated}` to trace where a profile came from - `DefaultProfileUtils` creates profiles for profile generators. So that now sets the `Origin` tag to `Generated` - `CascadiaSettings::LoadDefaults()` tags all profiles created as `InBox`. - The view model had to ingest the API change to be able to interact with `<setting>OverrideSource` - **Override Message Generation** - The reset button now has a more specific tooltip - The reset button now only appears if base layer is being overridden - We use the settings model changes to determine the message to display for the target ## Validation Steps Performed Tested the following cases: - overrides nothing (inherited setting) - overrides value inherited from... - base layer - a profile generator - in-box profile - global settings should not have this feature
claunia added the pull-request label 2026-01-31 09:21:51 +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#27419