fix(ui): keep the workflows toolbar readable on the 36px ladder

The run selector is the only control that gives up width, and beside the
workflow list it had none left: Open and the run's version move into the one
menu at every width, so the picked run stays readable from 390 to 1440.

Step editor and binding fields take the next rung (h-8) so they match the
selects and switches they sit beside.
This commit is contained in:
sam committed 2026-10-18 22:42:14 +11:00
1 parent 4f53eb4a06
commit ee80926091
5 files changed
+14 -14

No files matched your search

+3 -3
View File
@@ -315,14 +315,14 @@ const resume = () => transition(api.bindingResume, "pending_approval");
list="bind-paths"
:aria-label="`${name} payload path`"
placeholder="payload path"
class="h-7 w-full font-mono text-xs"
class="h-8 w-full font-mono text-xs"
/>
<Input
v-else
v-model="rows[name]!.value"
:aria-label="`${name} fixed value`"
placeholder="fixed value"
class="h-7 w-full font-mono text-xs"
class="h-8 w-full font-mono text-xs"
/>
<p v-if="rows[name]!.from === 'path' && resolved(name).failure" class="text-xs text-danger">{{ resolved(name).failure }}</p>
<p v-else-if="rows[name]!.from === 'path' && resolved(name).value !== undefined" class="truncate font-mono text-xs text-success" :title="resolved(name).value">{{ resolved(name).value }}</p>
@@ -334,7 +334,7 @@ const resume = () => transition(api.bindingResume, "pending_approval");
list="bind-paths"
aria-label="Repository payload path"
placeholder="payload path"
class="h-7 w-full font-mono text-xs"
class="h-8 w-full font-mono text-xs"
/>
<p v-if="resolved(REPOSITORY_FIELD).failure" class="text-xs text-danger">{{ resolved(REPOSITORY_FIELD).failure }}</p>
<p v-else-if="resolved(REPOSITORY_FIELD).value !== undefined" class="truncate font-mono text-xs text-success">{{ resolved(REPOSITORY_FIELD).value }}</p>
+1 -1
View File
@@ -38,7 +38,7 @@ function add(): void {
</div>
<div v-if="list.length" class="divide-y divide-border rounded-md border border-border">
<div v-for="([name, spec], i) in list" :key="i" class="flex items-center gap-2 px-2 py-1.5">
<Input :model-value="name" class="h-7 min-w-0 flex-1 font-mono text-xs" :aria-label="`${field} name`" @change="edit(i, ($event.target as HTMLInputElement).value.trim(), spec)" />
<Input :model-value="name" class="h-8 min-w-0 flex-1 font-mono text-xs" :aria-label="`${field} name`" @change="edit(i, ($event.target as HTMLInputElement).value.trim(), spec)" />
<OptionSelect :model-value="spec.type ?? 'string'" :options="TYPES" class="w-24" :aria-label="`${name} type`" @update:model-value="edit(i, name, { ...spec, type: $event })" />
<Switch :model-value="spec.required === true" :title="spec.required ? 'Required' : 'Optional'" :aria-label="`${name} required`" @update:model-value="edit(i, name, { ...spec, required: $event || undefined })" />
<Button type="button" variant="ghost" size="icon-xs" :aria-label="`Remove ${name}`" @click="write(list.filter((_, j) => j !== i))"><Trash2 /></Button>
+4 -4
View File
@@ -222,11 +222,11 @@ const ON_FAILURE = [{ value: "", label: "Park the task" }, { value: "continue",
<Input
v-else-if="field.kind === 'number'"
type="number"
class="h-7 w-24 text-right text-[13px]"
class="h-8 w-24 text-right text-[13px]"
:model-value="(settings[field.key] as number | undefined) ?? ''"
@update:model-value="(value) => setSetting(field.key, String(value) === '' ? undefined : Number(String(value)))"
/>
<Input v-else class="h-7 w-40 text-[13px]" :model-value="text(field.key)" @focus="focused = field.key" @update:model-value="(value) => setSetting(field.key, String(value))" />
<Input v-else class="h-8 w-40 text-[13px]" :model-value="text(field.key)" @focus="focused = field.key" @update:model-value="(value) => setSetting(field.key, String(value))" />
</div>
</section>
@@ -282,7 +282,7 @@ const ON_FAILURE = [{ value: "", label: "Park the task" }, { value: "continue",
<label class="flex min-h-10 items-center gap-3 px-3 py-1.5">
<span class="flex-1 text-[13px]" title="Empty always runs. A field such as inputs.enabled, !inputs.skip, or steps.plan.result.ready == true">Run only when</span>
<Input
class="h-7 w-48 font-mono text-xs"
class="h-8 w-48 font-mono text-xs"
placeholder="inputs.enabled"
:aria-invalid="flowProblem && flowProblem.startsWith('when') ? true : undefined"
:model-value="(step.when as string) ?? ''"
@@ -300,7 +300,7 @@ const ON_FAILURE = [{ value: "", label: "Park the task" }, { value: "continue",
min="1"
max="10"
placeholder="1"
class="h-7 w-20 text-right text-[13px]"
class="h-8 w-20 text-right text-[13px]"
:model-value="(step.retry as { attempts?: number } | undefined)?.attempts ?? ''"
@update:model-value="(value) => setRetry({ attempts: String(value) === '' ? undefined : Number(String(value)) })"
/>
+5 -5
View File
@@ -360,10 +360,8 @@ function syncScroll(event: Event): void {
<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">
<Button as-child variant="ghost" size="sm" class="max-md:hidden"><RouterLink :to="`/tasks/${watchedRun.id}`">Open</RouterLink></Button>
<Button v-if="watchedRevision" type="button" variant="ghost" size="sm" class="max-md:hidden font-mono text-xs" title="Open the version this run used" @click="openRevision(watchedRevision.version)">v{{ watchedRevision.version }}</Button>
<!-- One run control keeps the row short; the run's other actions
are on the run, one Open away. -->
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>
@@ -390,8 +388,10 @@ function syncScroll(event: Event): void {
<DropdownMenuItem v-if="stored !== undefined" class="xl:hidden" @select="view = 'history'">History</DropdownMenuItem>
<DropdownMenuItem v-if="$slots.performance" class="xl:hidden" @select="view = 'performance'">Performance</DropdownMenuItem>
<DropdownMenuItem v-if="$slots.runs" class="xl:hidden" @select="view = 'runs'">Runs <span class="ml-auto font-mono text-xs text-fg-subtle">{{ runsCount ?? 0 }}</span></DropdownMenuItem>
<DropdownMenuItem v-if="watchedRun" as-child class="md:hidden"><RouterLink :to="`/tasks/${watchedRun.id}`">Open run</RouterLink></DropdownMenuItem>
<DropdownMenuItem v-if="watchedRevision" class="md:hidden" @select="openRevision(watchedRevision.version)">Version {{ watchedRevision.version }}</DropdownMenuItem>
<!-- The run's page and the version it pinned are menu items, not
row controls: the row keeps the width for the picked run. -->
<DropdownMenuItem v-if="watchedRun" as-child><RouterLink :to="`/tasks/${watchedRun.id}`">Open run</RouterLink></DropdownMenuItem>
<DropdownMenuItem v-if="watchedRevision" @select="openRevision(watchedRevision.version)">Version {{ watchedRevision.version }}</DropdownMenuItem>
<DropdownMenuItem v-if="stored !== undefined && (view === 'canvas' || view === 'yaml')" class="sm:hidden" :disabled="!parsed.ok" @select="runOpen = true">{{ dirty ? "Test" : "Run" }}</DropdownMenuItem>
<DropdownMenuItem v-if="dirty" @select="draftOpen = true">Draft changes <span class="ml-auto font-mono text-xs text-fg-subtle">{{ changes.length }}</span></DropdownMenuItem>
<DropdownMenuItem v-if="dirty" :disabled="archieWorking" @select="restorePublished"><RotateCcw />Restore</DropdownMenuItem>
+1 -1
View File
@@ -121,7 +121,7 @@ const needs = computed<{ captures?: boolean; gate_retries?: number }>(() => {
type="number"
min="0"
placeholder="0"
class="h-7 w-20 text-right text-[13px]"
class="h-8 w-20 text-right text-[13px]"
:model-value="needs.gate_retries ?? ''"
@update:model-value="(value) => set('needs', { ...needs, gate_retries: String(value) === '' ? undefined : Number(String(value)) })"
/>