Polish YAML workflow channel scope

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
Taylor Ho
2026-08-14 22:12:41 -07:00
parent d3ce5e2d61
commit 5232a74a80
2 changed files with 9 additions and 2 deletions
@@ -177,7 +177,12 @@ export function ChannelCombobox({
<button
aria-disabled="true"
aria-label={`${ariaLabel}: ${selectedLabel}. Read only.`}
className="flex w-full cursor-default items-center justify-center rounded-lg px-3 py-2 text-lg font-semibold text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring"
className={cn(
"flex w-full cursor-default items-center rounded-lg px-3 py-2 text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
variant === "header" &&
"justify-center border-0 bg-transparent text-lg font-semibold",
variant === "field" && "text-sm font-normal",
)}
id={id}
type="button"
>
@@ -453,7 +453,7 @@ export function WorkflowDialog({
<div className="space-y-1">
<ChannelCombobox
channels={channels}
defaultOpen={mode === "create"}
defaultOpen={mode === "create" && editorMode === "form"}
disabled={mutation.isPending}
id="wf-channel-select"
onChange={(value) => {
@@ -462,6 +462,7 @@ export function WorkflowDialog({
if (value) onEditorPaneChange({ type: "trigger" });
}}
required
variant={editorMode === "yaml" ? "field" : "header"}
value={selectedChannelId}
/>
{channels.length === 0 ? (
@@ -476,6 +477,7 @@ export function WorkflowDialog({
id="wf-channel-select"
onChange={setSelectedChannelId}
readOnly
variant={editorMode === "yaml" ? "field" : "header"}
value={selectedChannel.id}
/>
) : null