Files
kandev/apps/web/lib/watcher-profile-default.ts
T
João Salavisa d58a1df32d fix(i18n): localize watcher fallback labels (#2596)
Co-authored-by: Kandev Agent <agent@kandev.dev>
2026-08-13 01:00:32 +01:00

14 lines
724 B
TypeScript

// Shared sentinel for the "(use step default)" option in the Agent/Executor
// Profile selects across the four watcher dialogs (Linear, Jira, GitHub issue,
// GitHub review). The form stores "" to mean "fall back to the workflow step's
// default profile", and the create/update payloads pass "" through. Radix
// disallows <SelectItem value="">, so the dropdown item carries this sentinel
// value and maps back to "" on change.
export const STEP_DEFAULT = "__step_default__";
// Map a select value back to the stored profile id, collapsing the sentinel to
// "" so the payload keeps signalling "use step default".
export function resolveProfileId(value: string): string {
return value === STEP_DEFAULT ? "" : value;
}