Summary
In widget configuration, the Data Source dropdown for a path behaves inconsistently depending on how many sources currently publish that path:
- One source → the only option is a literal
default, and the field is set to default.
- Two or more sources →
default disappears from the list entirely; only the concrete source keys are offered. An existing default selection is silently reset, forcing the user to re-pick a concrete source.
This makes default look like a per-path artifact that comes and goes, when it is actually the most useful option — the server-merged, priority-following value. Proposal: always present it as a stable Any entry at the top of the list, with the concrete sources listed underneath.
Why default already means "any source"
default is not a placeholder for "the one source we have". At the data layer, source === 'default' reads pathValue — the Signal K server's merged / priority-selected value:
data.service.ts:258 — currentValue = source === 'default' ? dataPath.pathValue : dataPath.sources?.[source]?.sourceValue ?? null
data.service.ts:364-382 — documents that with multiple sources and SK priorities configured, default follows whichever source the server currently favors, giving automatic failover (e.g. two GPS units, one drops out, the value keeps flowing).
So "accept data from any source, let the server decide" is exactly default's runtime behavior — and it is most valuable when a path has several sources, which is precisely when the current UI removes it.
Current behavior (where)
Two config components carry the same logic:
-
src/app/widget-config/path-control-config/path-control-config.component.ts:219-234
- 1 source →
availableSources = ['default']
- >1 source →
availableSources = Object.keys(pathObject.sources) (no default); a saved default value is reset().
- Template
path-control-config.component.html:83-87 renders each option as the raw string, so the label shown is literally default.
-
src/app/widget-config/dataset-chart-options/dataset-chart-options.component.ts:141-155 (data chart widget)
- Same 1-vs-many split;
default is likewise absent from the >1 branch.
- Template
dataset-chart-options.component.html:50-57.
Problems
- Confusing label.
default reads as "the default choice", not "the merged/any-source value". Users don't know what selecting it does.
- It vanishes when it matters most. The moment a second source appears for a path, the "any source / failover" option is removed, and users are pushed to pin a single concrete source — losing automatic failover.
- Silent reset (path-control-config only). Re-opening a widget's config after a path gains a second source clears a previously-saved
default selection, so the field shows empty/invalid until re-selected.
Proposed change
- Always include an Any option as the first entry in the Data Source list, regardless of source count. It maps to the existing stored value
'default' (display label "Any", stored value unchanged).
- List the concrete sources below it (grouped/ordered as today).
- Stop dropping
default and stop resetting a saved default selection when a path has multiple sources.
- Apply to both components above so widget paths and data-chart series behave the same.
Design direction only — no code prescribed here.
Back-compat / migration
None required. The stored config value stays 'default'; "Any" is only the display label for it. Existing widgets configured with default keep working and now render a stable, meaningful option instead of one that may disappear.
Verification
- Path with a single source: Data Source shows Any (selected), no literal
default.
- Path with multiple sources: Data Source shows Any at top plus each concrete source; selecting Any persists and yields server-priority/failover behavior at runtime.
- Re-opening a widget whose saved source is
default after a second source has appeared: selection is preserved (not reset), shown as Any.
- Same for the data-chart widget's Source field.
Summary
In widget configuration, the Data Source dropdown for a path behaves inconsistently depending on how many sources currently publish that path:
default, and the field is set todefault.defaultdisappears from the list entirely; only the concrete source keys are offered. An existingdefaultselection is silently reset, forcing the user to re-pick a concrete source.This makes
defaultlook like a per-path artifact that comes and goes, when it is actually the most useful option — the server-merged, priority-following value. Proposal: always present it as a stable Any entry at the top of the list, with the concrete sources listed underneath.Why
defaultalready means "any source"defaultis not a placeholder for "the one source we have". At the data layer,source === 'default'readspathValue— the Signal K server's merged / priority-selected value:data.service.ts:258—currentValue = source === 'default' ? dataPath.pathValue : dataPath.sources?.[source]?.sourceValue ?? nulldata.service.ts:364-382— documents that with multiple sources and SK priorities configured,defaultfollows whichever source the server currently favors, giving automatic failover (e.g. two GPS units, one drops out, the value keeps flowing).So "accept data from any source, let the server decide" is exactly
default's runtime behavior — and it is most valuable when a path has several sources, which is precisely when the current UI removes it.Current behavior (where)
Two config components carry the same logic:
src/app/widget-config/path-control-config/path-control-config.component.ts:219-234availableSources = ['default']availableSources = Object.keys(pathObject.sources)(nodefault); a saveddefaultvalue isreset().path-control-config.component.html:83-87renders each option as the raw string, so the label shown is literallydefault.src/app/widget-config/dataset-chart-options/dataset-chart-options.component.ts:141-155(data chart widget)defaultis likewise absent from the >1 branch.dataset-chart-options.component.html:50-57.Problems
defaultreads as "the default choice", not "the merged/any-source value". Users don't know what selecting it does.defaultselection, so the field shows empty/invalid until re-selected.Proposed change
'default'(display label "Any", stored value unchanged).defaultand stop resetting a saveddefaultselection when a path has multiple sources.Design direction only — no code prescribed here.
Back-compat / migration
None required. The stored config value stays
'default'; "Any" is only the display label for it. Existing widgets configured withdefaultkeep working and now render a stable, meaningful option instead of one that may disappear.Verification
default.defaultafter a second source has appeared: selection is preserved (not reset), shown as Any.