feat: show profile metadata in the picker subtitle - #107
Merged
Conversation
Profiles have carried a free-form `[metadata]` map for a while — the form
preserves it when editing — but nothing ever displayed it, and neither the
field nor the feature was documented. It was storage with no surface.
`picker.info` now accepts `metadata.<key>` alongside the fixed field
names:
[metadata]
env = "staging"
[picker]
info = ["aor", "metadata.env"]
This covers whatever tells profiles apart that the SIP fields do not —
which environment an account belongs to, which tenant it serves, which
extension answers on it. That last one matters when the registration
username is a device id rather than anything dialable, which is the usual
shape at a provider.
The new arm replaces the `_ => None` catch-all, so a test pins that an
unknown field name is still ignored rather than resolving to something,
and that a bare `metadata` naming no key stays empty.
`notes` was missing from the documented field list too, though it has
always worked.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Profiles have carried a free-form
[metadata]map for a while, but nothingdisplayed it and nothing documented it.
picker.infonow acceptsmetadata.<key>:For whatever tells profiles apart that the SIP fields do not — environment,
tenant, or the extension that answers on an account whose registration username
is a device id.
The new arm replaces the
_ => Nonecatch-all, so tests pin that unknown fieldnames are still ignored.
noteswas missing from the documented field list too.