@adea-ai/ui 0.146.11 → 0.147.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,8 @@ export type UpdateChannelControlProps = {
10
10
  persist: (value: UpdateChannel) => Promise<UpdateChannel>;
11
11
  /** Disable beyond the dialog's own working state, e.g. a host save in flight. */
12
12
  disabled?: Accessor<boolean>;
13
+ /** Per-channel option labels, when the defaults don't fit the app. Values remain unchanged. */
14
+ labels?: Partial<Record<UpdateChannel, string>>;
13
15
  /** Per-channel row descriptions, when the defaults don't fit the app. */
14
16
  descriptions?: Partial<Record<UpdateChannel, string>>;
15
17
  /**
@@ -22,8 +24,8 @@ export type UpdateChannelControlProps = {
22
24
  /**
23
25
  * The updater dialog's release-channel row: one setting, a select trailing.
24
26
  * Every desktop application that ships channels presents the same three of
25
- * them with the same copy, which is why the row lives here rather than being
26
- * redrawn per app. A save always flows through the dialog's `recheck`, so a
27
+ * them with consistent behavior, which is why the row lives here rather than
28
+ * being redrawn per app. A save always flows through the dialog's `recheck`, so a
27
29
  * channel switch re-asks the feed and the offer never outlives its channel.
28
30
  */
29
31
  export declare function UpdateChannelControl(props: UpdateChannelControlProps): import("solid-js").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"channel-control.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/update-dialog/channel-control.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+C,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAErF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,aAAa,GAAG,KAAK,CAAA;AAc5D,MAAM,MAAM,yBAAyB,GAAG;IACtC,wEAAwE;IACxE,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,kCAAkC;IAClC,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAA;IAClC,0EAA0E;IAC1E,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IACzD,iFAAiF;IACjF,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAA;IACrD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,kCAiFpE"}
1
+ {"version":3,"file":"channel-control.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/update-dialog/channel-control.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+C,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAErF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,aAAa,GAAG,KAAK,CAAA;AAc5D,MAAM,MAAM,yBAAyB,GAAG;IACtC,wEAAwE;IACxE,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,kCAAkC;IAClC,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAA;IAClC,0EAA0E;IAC1E,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IACzD,iFAAiF;IACjF,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,+FAA+F;IAC/F,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAA;IAC/C,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAA;IACrD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,kCAoFpE"}
@@ -27,8 +27,8 @@ var CHANNEL_DESCRIPTIONS = {
27
27
  /**
28
28
  * The updater dialog's release-channel row: one setting, a select trailing.
29
29
  * Every desktop application that ships channels presents the same three of
30
- * them with the same copy, which is why the row lives here rather than being
31
- * redrawn per app. A save always flows through the dialog's `recheck`, so a
30
+ * them with consistent behavior, which is why the row lives here rather than
31
+ * being redrawn per app. A save always flows through the dialog's `recheck`, so a
32
32
  * channel switch re-asks the feed and the offer never outlives its channel.
33
33
  */
34
34
  function UpdateChannelControl(props) {
@@ -95,7 +95,12 @@ function UpdateChannelControl(props) {
95
95
  get value() {
96
96
  return channel();
97
97
  },
98
- options: CHANNEL_OPTIONS,
98
+ get options() {
99
+ return CHANNEL_OPTIONS.map((option) => ({
100
+ ...option,
101
+ label: props.labels?.[option.value] ?? option.label
102
+ }));
103
+ },
99
104
  onChange: (event) => void save(event.currentTarget.value)
100
105
  });
101
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"channel-control.js","names":["SettingsRow","NativeSelect","createEffect","createSignal","onCleanup","Show","Accessor","ChannelControlActions","UpdateChannel","CHANNEL_OPTIONS","ReadonlyArray","value","label","CHANNEL_DESCRIPTIONS","Record","stable","dev","UpdateChannelControlProps","controls","read","Promise","persist","disabled","descriptions","Partial","reloadOn","UpdateChannelControl","props","channel","setChannel","loaded","setLoaded","saving","setSaving","error","setError","active","then","catch","finally","save","next","previous","persisted","recheck","saved","caught","Error","message","_el$","_tmpl$","_$insert","_$createComponent","description","children","options","onChange","event","currentTarget","when","_el$2","_tmpl$2","_$createComponent"],"sources":["../../../../src/components/composites/update-dialog/channel-control.tsx"],"sourcesContent":["import { SettingsRow } from '../settings'\nimport { NativeSelect } from '../../ui/native-select'\nimport { createEffect, createSignal, onCleanup, Show, type Accessor } from 'solid-js'\n\nimport type { ChannelControlActions } from './update-dialog'\n\nexport type UpdateChannel = 'stable' | 'pre-release' | 'dev'\n\nconst CHANNEL_OPTIONS: ReadonlyArray<{ value: UpdateChannel; label: string }> = [\n { value: 'stable', label: 'Stable' },\n { value: 'pre-release', label: 'Pre-release' },\n { value: 'dev', label: 'Dev' },\n]\n\nconst CHANNEL_DESCRIPTIONS: Record<UpdateChannel, string> = {\n stable: 'Tested releases after about four days in pre-release.',\n 'pre-release': 'Daily pre-release builds arrive early, with rough edges included.',\n dev: 'Follows every dev build from main. Intended for development machines.',\n}\n\nexport type UpdateChannelControlProps = {\n /** The dialog's channel actions; every save flows through `recheck`. */\n controls: ChannelControlActions\n /** Read the persisted channel. */\n read: () => Promise<UpdateChannel>\n /** Persist a selection; resolves with the channel that actually stuck. */\n persist: (value: UpdateChannel) => Promise<UpdateChannel>\n /** Disable beyond the dialog's own working state, e.g. a host save in flight. */\n disabled?: Accessor<boolean>\n /** Per-channel row descriptions, when the defaults don't fit the app. */\n descriptions?: Partial<Record<UpdateChannel, string>>\n /**\n * Re-read the persisted channel whenever this value changes. Supply it when\n * the channel can move while the dialog is closed — a service that gets torn\n * down, or a CLI writing the same setting — and hand it the dialog's `open`.\n */\n reloadOn?: Accessor<unknown>\n}\n\n/**\n * The updater dialog's release-channel row: one setting, a select trailing.\n * Every desktop application that ships channels presents the same three of\n * them with the same copy, which is why the row lives here rather than being\n * redrawn per app. A save always flows through the dialog's `recheck`, so a\n * channel switch re-asks the feed and the offer never outlives its channel.\n */\nexport function UpdateChannelControl(props: UpdateChannelControlProps) {\n const [channel, setChannel] = createSignal<UpdateChannel>('stable')\n const [loaded, setLoaded] = createSignal(false)\n const [saving, setSaving] = createSignal(false)\n const [error, setError] = createSignal<string | null>(null)\n\n createEffect(() => {\n props.reloadOn?.()\n let active = true\n onCleanup(() => {\n active = false\n })\n void props\n .read()\n .then((value) => {\n if (active) setChannel(value)\n })\n .catch(() => {\n if (active) setError('The current update channel could not be read.')\n })\n .finally(() => {\n if (active) setLoaded(true)\n })\n })\n\n const save = async (value: string) => {\n const next = value as UpdateChannel\n if (!loaded() || saving() || props.controls.disabled() || next === channel()) return\n const previous = channel()\n let persisted = false\n setChannel(next)\n setSaving(true)\n setError(null)\n\n try {\n await props.controls.recheck(async () => {\n try {\n const saved = await props.persist(next)\n setChannel(saved)\n persisted = true\n } catch (caught) {\n setChannel(previous)\n setError(\n caught instanceof Error ? caught.message : 'The update channel could not be saved.'\n )\n throw caught\n }\n })\n } catch (caught) {\n // The shared dialog renders the recheck failure. Roll back only if the\n // channel write itself failed; a failed feed check keeps the saved choice.\n if (!persisted) {\n setChannel(previous)\n setError(\n caught instanceof Error ? caught.message : 'The update channel could not be saved.'\n )\n }\n } finally {\n setSaving(false)\n }\n }\n\n return (\n <div class=\"flex flex-col gap-2\">\n <SettingsRow\n label=\"Update channel\"\n description={props.descriptions?.[channel()] ?? CHANNEL_DESCRIPTIONS[channel()]}\n >\n <NativeSelect\n aria-label=\"Update channel\"\n disabled={\n !loaded() || saving() || props.controls.disabled() || (props.disabled?.() ?? false)\n }\n value={channel()}\n options={CHANNEL_OPTIONS}\n onChange={(event) => void save(event.currentTarget.value)}\n />\n </SettingsRow>\n <Show when={error()}>{(message) => <p role=\"alert\">{message()}</p>}</Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAQA,IAAMS,kBAA0E;CAC9E;EAAEE,OAAO;EAAUC,OAAO;CAAS;CACnC;EAAED,OAAO;EAAeC,OAAO;CAAc;CAC7C;EAAED,OAAO;EAAOC,OAAO;CAAM;AAAC;AAGhC,IAAMC,uBAAsD;CAC1DE,QAAQ;CACR,eAAe;CACfC,KAAK;AACP;;;;;;;;AA4BA,SAAgBU,qBAAqBC,OAAkC;CACrE,MAAM,CAACC,SAASC,cAAc1B,aAA4B,QAAQ;CAClE,MAAM,CAAC2B,QAAQC,aAAa5B,aAAa,KAAK;CAC9C,MAAM,CAAC6B,QAAQC,aAAa9B,aAAa,KAAK;CAC9C,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A,IAAA0B,WAAA;IAAA,OAAAF,gBAE9EnD,cAAY;KAAA,cAAA;KAAA,IAEXqB,WAAQ;MAAA,OACN,CAACQ,OAAO,KAAKE,OAAO,KAAKL,MAAMT,SAASI,SAAS,MAAMK,MAAML,WAAW,KAAK;KAAM;KAAA,IAErFX,QAAK;MAAA,OAAEiB,QAAQ;KAAC;KAChB2B,SAAS9C;KACT+C,WAAWC,UAAU,KAAKjB,KAAKiB,MAAMC,cAAc/C,KAAK;IAAC,CAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAwC,OAAAF,MAAAG,gBAG5D/C,MAAI;GAAA,IAACsD,OAAI;IAAA,OAAEzB,MAAM;GAAC;GAAAoB,WAAIN,mBAAO;IAAA,IAAAY,QAAAC,QAAA;IAAAV,OAAAS,OAAsBZ,OAAO;IAAA,OAAAY;GAAA,EAAA,CAAA;EAAO,CAAA,GAAA,IAAA;EAAA,OAAAX;CAAA,EAAA,CAAA;AAGxE"}
1
+ {"version":3,"file":"channel-control.js","names":["SettingsRow","NativeSelect","createEffect","createSignal","onCleanup","Show","Accessor","ChannelControlActions","UpdateChannel","CHANNEL_OPTIONS","ReadonlyArray","value","label","CHANNEL_DESCRIPTIONS","Record","stable","dev","UpdateChannelControlProps","controls","read","Promise","persist","disabled","labels","Partial","descriptions","reloadOn","UpdateChannelControl","props","channel","setChannel","loaded","setLoaded","saving","setSaving","error","setError","active","then","catch","finally","save","next","previous","persisted","recheck","saved","caught","Error","message","_el$","_tmpl$","_$insert","_$createComponent","description","children","options","map","option","onChange","event","currentTarget","when","_el$2","_tmpl$2","_$createComponent"],"sources":["../../../../src/components/composites/update-dialog/channel-control.tsx"],"sourcesContent":["import { SettingsRow } from '../settings'\nimport { NativeSelect } from '../../ui/native-select'\nimport { createEffect, createSignal, onCleanup, Show, type Accessor } from 'solid-js'\n\nimport type { ChannelControlActions } from './update-dialog'\n\nexport type UpdateChannel = 'stable' | 'pre-release' | 'dev'\n\nconst CHANNEL_OPTIONS: ReadonlyArray<{ value: UpdateChannel; label: string }> = [\n { value: 'stable', label: 'Stable' },\n { value: 'pre-release', label: 'Pre-release' },\n { value: 'dev', label: 'Dev' },\n]\n\nconst CHANNEL_DESCRIPTIONS: Record<UpdateChannel, string> = {\n stable: 'Tested releases after about four days in pre-release.',\n 'pre-release': 'Daily pre-release builds arrive early, with rough edges included.',\n dev: 'Follows every dev build from main. Intended for development machines.',\n}\n\nexport type UpdateChannelControlProps = {\n /** The dialog's channel actions; every save flows through `recheck`. */\n controls: ChannelControlActions\n /** Read the persisted channel. */\n read: () => Promise<UpdateChannel>\n /** Persist a selection; resolves with the channel that actually stuck. */\n persist: (value: UpdateChannel) => Promise<UpdateChannel>\n /** Disable beyond the dialog's own working state, e.g. a host save in flight. */\n disabled?: Accessor<boolean>\n /** Per-channel option labels, when the defaults don't fit the app. Values remain unchanged. */\n labels?: Partial<Record<UpdateChannel, string>>\n /** Per-channel row descriptions, when the defaults don't fit the app. */\n descriptions?: Partial<Record<UpdateChannel, string>>\n /**\n * Re-read the persisted channel whenever this value changes. Supply it when\n * the channel can move while the dialog is closed — a service that gets torn\n * down, or a CLI writing the same setting — and hand it the dialog's `open`.\n */\n reloadOn?: Accessor<unknown>\n}\n\n/**\n * The updater dialog's release-channel row: one setting, a select trailing.\n * Every desktop application that ships channels presents the same three of\n * them with consistent behavior, which is why the row lives here rather than\n * being redrawn per app. A save always flows through the dialog's `recheck`, so a\n * channel switch re-asks the feed and the offer never outlives its channel.\n */\nexport function UpdateChannelControl(props: UpdateChannelControlProps) {\n const [channel, setChannel] = createSignal<UpdateChannel>('stable')\n const [loaded, setLoaded] = createSignal(false)\n const [saving, setSaving] = createSignal(false)\n const [error, setError] = createSignal<string | null>(null)\n\n createEffect(() => {\n props.reloadOn?.()\n let active = true\n onCleanup(() => {\n active = false\n })\n void props\n .read()\n .then((value) => {\n if (active) setChannel(value)\n })\n .catch(() => {\n if (active) setError('The current update channel could not be read.')\n })\n .finally(() => {\n if (active) setLoaded(true)\n })\n })\n\n const save = async (value: string) => {\n const next = value as UpdateChannel\n if (!loaded() || saving() || props.controls.disabled() || next === channel()) return\n const previous = channel()\n let persisted = false\n setChannel(next)\n setSaving(true)\n setError(null)\n\n try {\n await props.controls.recheck(async () => {\n try {\n const saved = await props.persist(next)\n setChannel(saved)\n persisted = true\n } catch (caught) {\n setChannel(previous)\n setError(\n caught instanceof Error ? caught.message : 'The update channel could not be saved.'\n )\n throw caught\n }\n })\n } catch (caught) {\n // The shared dialog renders the recheck failure. Roll back only if the\n // channel write itself failed; a failed feed check keeps the saved choice.\n if (!persisted) {\n setChannel(previous)\n setError(\n caught instanceof Error ? caught.message : 'The update channel could not be saved.'\n )\n }\n } finally {\n setSaving(false)\n }\n }\n\n return (\n <div class=\"flex flex-col gap-2\">\n <SettingsRow\n label=\"Update channel\"\n description={props.descriptions?.[channel()] ?? CHANNEL_DESCRIPTIONS[channel()]}\n >\n <NativeSelect\n aria-label=\"Update channel\"\n disabled={\n !loaded() || saving() || props.controls.disabled() || (props.disabled?.() ?? false)\n }\n value={channel()}\n options={CHANNEL_OPTIONS.map((option) => ({\n ...option,\n label: props.labels?.[option.value] ?? option.label,\n }))}\n onChange={(event) => void save(event.currentTarget.value)}\n />\n </SettingsRow>\n <Show when={error()}>{(message) => <p role=\"alert\">{message()}</p>}</Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAQA,IAAMS,kBAA0E;CAC9E;EAAEE,OAAO;EAAUC,OAAO;CAAS;CACnC;EAAED,OAAO;EAAeC,OAAO;CAAc;CAC7C;EAAED,OAAO;EAAOC,OAAO;CAAM;AAAC;AAGhC,IAAMC,uBAAsD;CAC1DE,QAAQ;CACR,eAAe;CACfC,KAAK;AACP;;;;;;;;AA8BA,SAAgBW,qBAAqBC,OAAkC;CACrE,MAAM,CAACC,SAASC,cAAc3B,aAA4B,QAAQ;CAClE,MAAM,CAAC4B,QAAQC,aAAa7B,aAAa,KAAK;CAC9C,MAAM,CAAC8B,QAAQC,aAAa/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qBgB,QAAQ;GAAE;GAAA,IAAA0B,WAAA;IAAA,OAAAF,gBAE9EpD,cAAY;KAAA,cAAA;KAAA,IAEXqB,WAAQ;MAAA,OACN,CAACS,OAAO,KAAKE,OAAO,KAAKL,MAAMV,SAASI,SAAS,MAAMM,MAAMN,WAAW,KAAK;KAAM;KAAA,IAErFX,QAAK;MAAA,OAAEkB,QAAQ;KAAC;KAAA,IAChB2B,UAAO;MAAA,OAAE/C,gBAAgBgD,KAAKC,YAAY;OACxC,GAAGA;OACH9C,OAAOgB,MAAML,SAASmC,OAAO/C,UAAU+C,OAAO9C;MAChD,EAAE;KAAC;KACH+C,WAAWC,UAAU,KAAKnB,KAAKmB,MAAMC,cAAclD,KAAK;IAAC,CAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAyC,OAAAF,MAAAG,gBAG5DhD,MAAI;GAAA,IAACyD,OAAI;IAAA,OAAE3B,MAAM;GAAC;GAAAoB,WAAIN,mBAAO;IAAA,IAAAc,QAAAC,QAAA;IAAAZ,OAAAW,OAAsBd,OAAO;IAAA,OAAAc;GAAA,EAAA,CAAA;EAAO,CAAA,GAAA,IAAA;EAAA,OAAAb;CAAA,EAAA,CAAA;AAGxE"}
@@ -27,6 +27,8 @@ export type UpdateChannelControlProps = {
27
27
  persist: (value: UpdateChannel) => Promise<UpdateChannel>
28
28
  /** Disable beyond the dialog's own working state, e.g. a host save in flight. */
29
29
  disabled?: Accessor<boolean>
30
+ /** Per-channel option labels, when the defaults don't fit the app. Values remain unchanged. */
31
+ labels?: Partial<Record<UpdateChannel, string>>
30
32
  /** Per-channel row descriptions, when the defaults don't fit the app. */
31
33
  descriptions?: Partial<Record<UpdateChannel, string>>
32
34
  /**
@@ -40,8 +42,8 @@ export type UpdateChannelControlProps = {
40
42
  /**
41
43
  * The updater dialog's release-channel row: one setting, a select trailing.
42
44
  * Every desktop application that ships channels presents the same three of
43
- * them with the same copy, which is why the row lives here rather than being
44
- * redrawn per app. A save always flows through the dialog's `recheck`, so a
45
+ * them with consistent behavior, which is why the row lives here rather than
46
+ * being redrawn per app. A save always flows through the dialog's `recheck`, so a
45
47
  * channel switch re-asks the feed and the offer never outlives its channel.
46
48
  */
47
49
  export function UpdateChannelControl(props: UpdateChannelControlProps) {
@@ -118,7 +120,10 @@ export function UpdateChannelControl(props: UpdateChannelControlProps) {
118
120
  !loaded() || saving() || props.controls.disabled() || (props.disabled?.() ?? false)
119
121
  }
120
122
  value={channel()}
121
- options={CHANNEL_OPTIONS}
123
+ options={CHANNEL_OPTIONS.map((option) => ({
124
+ ...option,
125
+ label: props.labels?.[option.value] ?? option.label,
126
+ }))}
122
127
  onChange={(event) => void save(event.currentTarget.value)}
123
128
  />
124
129
  </SettingsRow>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/ui",
3
- "version": "0.146.11",
3
+ "version": "0.147.0",
4
4
  "description": "The Adea design system: Kobalte-backed Solid components, semantic OKLCH tokens, and the app-shell layout primitives shared by Adea and Cortana.",
5
5
  "keywords": [
6
6
  "adea",
@@ -27,6 +27,8 @@ export type UpdateChannelControlProps = {
27
27
  persist: (value: UpdateChannel) => Promise<UpdateChannel>
28
28
  /** Disable beyond the dialog's own working state, e.g. a host save in flight. */
29
29
  disabled?: Accessor<boolean>
30
+ /** Per-channel option labels, when the defaults don't fit the app. Values remain unchanged. */
31
+ labels?: Partial<Record<UpdateChannel, string>>
30
32
  /** Per-channel row descriptions, when the defaults don't fit the app. */
31
33
  descriptions?: Partial<Record<UpdateChannel, string>>
32
34
  /**
@@ -40,8 +42,8 @@ export type UpdateChannelControlProps = {
40
42
  /**
41
43
  * The updater dialog's release-channel row: one setting, a select trailing.
42
44
  * Every desktop application that ships channels presents the same three of
43
- * them with the same copy, which is why the row lives here rather than being
44
- * redrawn per app. A save always flows through the dialog's `recheck`, so a
45
+ * them with consistent behavior, which is why the row lives here rather than
46
+ * being redrawn per app. A save always flows through the dialog's `recheck`, so a
45
47
  * channel switch re-asks the feed and the offer never outlives its channel.
46
48
  */
47
49
  export function UpdateChannelControl(props: UpdateChannelControlProps) {
@@ -118,7 +120,10 @@ export function UpdateChannelControl(props: UpdateChannelControlProps) {
118
120
  !loaded() || saving() || props.controls.disabled() || (props.disabled?.() ?? false)
119
121
  }
120
122
  value={channel()}
121
- options={CHANNEL_OPTIONS}
123
+ options={CHANNEL_OPTIONS.map((option) => ({
124
+ ...option,
125
+ label: props.labels?.[option.value] ?? option.label,
126
+ }))}
122
127
  onChange={(event) => void save(event.currentTarget.value)}
123
128
  />
124
129
  </SettingsRow>