fix(ui): group run picker and run actions apart from workflow edit actions

This commit is contained in:
sam committed 2026-10-18 23:46:19 +11:00
1 parent a0524c0cf3
commit fbe0742ef6
1 file changed
+15 -13
+15 -13
View File
@@ -363,19 +363,7 @@ function syncScroll(event: Event): void {
<TabsTrigger v-if="$slots.runs" value="runs" class="max-xl:hidden">Runs <span class="ml-1 font-mono text-xs text-fg-subtle">{{ runsCount ?? 0 }}</span></TabsTrigger>
</TabsList>
<span v-if="SECTIONS[view]" class="shrink-0 text-xs font-medium text-fg-muted xl:hidden">{{ SECTIONS[view] }}</span>
<div class="ml-auto flex min-w-0 items-center gap-1">
<div v-if="runs.length && view === 'canvas'" class="flex min-w-0 items-center gap-1">
<OptionSelect :model-value="watched" :options="runOptions" aria-label="Run shown on the canvas" class="min-w-0 max-w-24 sm:max-w-56" @update:model-value="pick" />
<template v-if="watchedRun">
<!-- One run control keeps the row short; the run's other actions
are on the run, behind Open run in this menu. -->
<TaskRowActions :task="watchedRun" :only="watchedRun.actions?.slice(0, 1)" class="max-md:hidden" @done="refresh" />
</template>
</div>
<span v-if="!parsed.ok" class="hidden max-w-md truncate text-xs text-danger sm:block" role="status" :title="validationLabel(parsed)">{{ validationLabel(parsed) }}</span>
<span v-if="!parsed.ok" class="sm:hidden" role="status" :title="validationLabel(parsed)">
<CircleAlert class="size-4 text-danger" aria-hidden="true" /><span class="sr-only">{{ validationLabel(parsed) }}</span>
</span>
<div role="group" aria-label="Runs" class="ml-auto flex min-w-0 items-center gap-1">
<!-- The dialog is teleported, so hiding this wrapper below sm hides the
trigger only and leaves the one dialog reachable from the menu. -->
<div v-if="stored !== undefined && (view === 'canvas' || view === 'yaml')" class="max-sm:hidden">
@@ -387,6 +375,20 @@ function syncScroll(event: Event): void {
@started="(id) => { view = 'canvas'; void follow(id); }"
/>
</div>
<div v-if="runs.length && view === 'canvas'" class="flex min-w-0 items-center gap-1">
<OptionSelect :model-value="watched" :options="runOptions" aria-label="Run shown on the canvas" class="min-w-0 max-w-24 sm:max-w-56" @update:model-value="pick" />
<template v-if="watchedRun">
<!-- One run control keeps the row short; the run's other actions
are on the run, behind Open run in this menu. -->
<TaskRowActions :task="watchedRun" :only="watchedRun.actions?.slice(0, 1)" class="max-md:hidden" @done="refresh" />
</template>
</div>
</div>
<div role="group" aria-label="Edit" class="flex min-w-0 items-center gap-1 border-l pl-2">
<span v-if="!parsed.ok" class="hidden max-w-md truncate text-xs text-danger sm:block" role="status" :title="validationLabel(parsed)">{{ validationLabel(parsed) }}</span>
<span v-if="!parsed.ok" class="sm:hidden" role="status" :title="validationLabel(parsed)">
<CircleAlert class="size-4 text-danger" aria-hidden="true" /><span class="sr-only">{{ validationLabel(parsed) }}</span>
</span>
<DropdownMenu>
<DropdownMenuTrigger as-child>
<Button type="button" variant="outline" size="icon-sm" aria-label="More"><Ellipsis /></Button>