Use supervisor-provided options for string app config fields#53077
Closed
kingpanther13 wants to merge 3 commits into
Closed
Use supervisor-provided options for string app config fields#53077kingpanther13 wants to merge 3 commits into
kingpanther13 wants to merge 3 commits into
Conversation
Closed
14 tasks
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Supervisor emits options on both multi- and single-value match nodes; consume them for singles too instead of silently dropping them. Password-masked and format-typed fields keep their text selector. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kingpanther13
force-pushed
the
app-config-multi-string-options
branch
from
July 10, 2026 15:02
e0dc633 to
9a408cc
Compare
Keep single-value fields on the text selector: the single-value custom_value picker cannot store an empty string (clearing emits undefined and the key is dropped on save), which would silently change stored-value semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kingpanther13
marked this pull request as ready for review
July 10, 2026 15:41
MindFreeze
approved these changes
Jul 11, 2026
MindFreeze
left a comment
Member
There was a problem hiding this comment.
LGTM but lets see what happens with the supervisor PR
Author
|
Closing per the outcome in home-assistant/supervisor#7023: the fix moves into the Samba add-on itself. Step 1 (home-assistant/addons#4717) normalizes stored |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Proposed change
Multi-value string fields in app configuration always render with an empty
suggestion list, because the selector conversion hard-codes
options: []. Forusers this means fields like the Samba add-on's "Enabled shares" open an empty
dropdown and valid values must be typed from memory.
home-assistant/supervisor#7023 makes Supervisor include
optionson stringschema nodes whose
match()regex is a simple alternation of literals. Thischange passes those through to the select selector so valid values appear as
suggestions.
custom_valuestays enabled, so free-text entry is unaffected andvalidation semantics do not change. Single-value string fields deliberately
keep their text selector even when options are present: the single-value
custom_valuepicker cannot store an empty string (clearing emitsundefined,which drops the key on save), so converting them would silently change
stored-value semantics. The schema-to-selector mapping for string fields is
extracted into a small util module with unit tests covering each outcome.
This PR functionally depends on home-assistant/supervisor#7023: today's
Supervisor never includes
optionson string schema nodes, so without that PRthis change is a safe no-op (
entry.optionsis undefined and behavior isbyte-identical to today). Either merge order is safe, but there is no
user-visible effect until the Supervisor counterpart lands.
Screenshots
To be added: before (the current empty suggestion list on the Samba add-on's
"Enabled shares" field) and after (requires running this branch against a
Supervisor that includes home-assistant/supervisor#7023).
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
To help with the load of incoming pull requests: