feat(ui/events,settings): give the event, source, trigger, model, credential and extension lists the original layout (#2023)

Tables use fixed column widths and the ghost add button. The models page
keeps the aliases section with one inline row per alias.
This commit is contained in:
sam committed 2026-11-22 02:36:13 +11:00
1 parent f8c572ebef
commit 9c5af2c2d3
7 files changed
+134 -168

No files matched your search

+9 -9
View File
@@ -44,12 +44,12 @@ const linked = computed(() => String(route.query.event ?? ""));
const time = (at?: string) => (at ? Date.parse(at) : 0);
const columns: DataTableColumn<EventRecord>[] = [
{ id: "received", label: "Received", fixed: true, sort: (e) => time(e.received_at) },
{ id: "source", label: "Source", fixed: true, sort: (e) => e.source },
{ id: "type", label: "Type", fixed: true, sort: (e) => e.type },
{ id: "matched", label: "Matched", sort: (e) => (e.matched ? 1 : 0) },
{ id: "occurred", label: "Occurred", hidden: true, sort: (e) => time(e.occurred_at) },
{ id: "linked", label: "Same as", hidden: true },
{ id: "type", label: "Type", fixed: true, width: "auto", sort: (e) => e.type },
{ id: "source", label: "Source", fixed: true, width: "12rem", sort: (e) => e.source },
{ id: "matched", label: "Trigger", width: "9rem", sort: (e) => (e.matched ? 1 : 0) },
{ id: "received", label: "Received", fixed: true, width: "9rem", sort: (e) => time(e.received_at) },
{ id: "occurred", label: "Occurred", hidden: true, width: "9rem", sort: (e) => time(e.occurred_at) },
{ id: "linked", label: "Same as", hidden: true, width: "10rem" },
];
</script>
@@ -87,13 +87,13 @@ const columns: DataTableColumn<EventRecord>[] = [
:initial-sort="{ id: 'received', desc: true }"
>
<template #cell-received="{ row }"><Timestamp :at="row.received_at" /></template>
<template #cell-source="{ row }">{{ row.source }}</template>
<template #cell-type="{ row }"><span class="font-mono text-caption">{{ row.type }}</span></template>
<template #cell-source="{ row }"><span class="font-mono">{{ row.source }}</span></template>
<template #cell-type="{ row }"><span class="font-mono">{{ row.type }}</span></template>
<template #cell-matched="{ row }">
<Badge :variant="row.matched ? 'ok' : 'idle'">{{ row.matched ? "Matched" : "Unmatched" }}</Badge>
</template>
<template #cell-occurred="{ row }"><Timestamp :at="row.occurred_at" /></template>
<template #cell-linked="{ row }"><span class="font-mono text-caption">{{ row.linked_to }}</span></template>
<template #cell-linked="{ row }"><span class="font-mono text-caption text-fg-muted">{{ row.linked_to?.slice(0, 8) }}</span></template>
<template #detail="{ row }"><EventDetail :id="row.id" /></template>
<template #empty>
<Empty><EmptyHeader><EmptyTitle>No events</EmptyTitle></EmptyHeader></Empty>
+4 -4
View File
@@ -28,9 +28,9 @@ onMounted(() => {
const columns: DataTableColumn<EventSource_>[] = [
{ id: "name", label: "Source", fixed: true, sort: (s) => s.name },
{ id: "connector", label: "Connector", sort: (s) => s.connector },
{ id: "verification", label: "Verification" },
{ id: "key", label: "Grouped by" },
{ id: "connector", label: "Connector", width: "12rem", sort: (s) => s.connector },
{ id: "verification", label: "Verification", width: "14rem" },
{ id: "key", label: "Grouped by", width: "16rem" },
];
// A put creates a source or rotates its token; either way the token is shown
@@ -126,7 +126,7 @@ const connectorNames = computed(() => (connectors.data.value ?? []).map((c) => c
<div v-else-if="!data" role="status" aria-label="Loading sources" class="space-y-2"><Skeleton class="h-8 w-full" /></div>
<template v-else>
<div class="mb-2 flex justify-end">
<Button size="sm" aria-label="Add source" title="Add source" @click="openAdd"><Plus /></Button>
<Button size="icon-sm" variant="ghost" aria-label="Add source" title="Add source" @click="openAdd"><Plus /></Button>
</div>
<DataTable :columns="columns" :rows="data" :row-key="(s) => s.name" storage-key="sources">
<template #cell-name="{ row }"><span class="font-medium">{{ row.name }}</span></template>
+10 -9
View File
@@ -20,6 +20,7 @@ import { errors } from "@/copy/errors";
import { api, describeError, type Trigger, type TriggerInput } from "@/lib/api";
import { fromLines, toLines } from "@/lib/lines";
import { useRead } from "@/lib/use-read";
import { interval } from "@/workflows/use-workflow-list";
import { triggerInput } from "./trigger";
/** With `workflow`, only the triggers that run it, and new ones run it. */
@@ -36,11 +37,11 @@ onMounted(() => {
const rows = computed(() => (data.value ?? []).filter((t) => !props.workflow || t.workflow === props.workflow));
const columns = computed<DataTableColumn<Trigger>[]>(() => [
{ id: "name", label: "Trigger", fixed: true, sort: (t) => t.name },
{ id: "fires", label: "Fires on", fixed: true },
...(props.workflow ? [] : [{ id: "workflow", label: "Workflow", sort: (t: Trigger) => t.workflow }]),
{ id: "filter", label: "Filter", hidden: true },
{ id: "enabled", label: "On", fixed: true, class: "w-0" },
{ id: "name", label: "Trigger", fixed: true, width: "auto", sort: (t) => t.name },
{ id: "fires", label: "Fires on", fixed: true, width: "18rem" },
...(props.workflow ? [] : [{ id: "workflow", label: "Workflow", width: "14rem", sort: (t: Trigger) => t.workflow }]),
{ id: "filter", label: "Filter", hidden: true, width: "16rem" },
{ id: "enabled", label: "On", fixed: true, width: "5rem" },
]);
const busy = ref(false);
@@ -96,15 +97,15 @@ async function submit(): Promise<void> {
<div v-else-if="!data" role="status" aria-label="Loading triggers" class="space-y-2"><Skeleton class="h-8 w-full" /></div>
<template v-else>
<div class="mb-2 flex justify-end">
<Button size="sm" aria-label="Add trigger" title="Add trigger" @click="open()"><Plus /></Button>
<Button size="icon-sm" variant="ghost" aria-label="Add trigger" title="Add trigger" @click="open()"><Plus /></Button>
</div>
<DataTable :columns="columns" :rows="rows" :row-key="(t) => t.name" :storage-key="workflow ? 'workflow-triggers' : 'triggers'">
<template #cell-name="{ row }"><span class="font-medium">{{ row.name }}</span></template>
<template #cell-fires="{ row }">
<template v-if="row.every">Every {{ row.every }}</template>
<template v-else>{{ row.source }} <span class="font-mono text-caption">{{ row.event_type }}</span></template>
<template v-if="row.every">Every {{ interval(row.every) }}</template>
<template v-else>{{ row.source }} <span class="font-mono text-caption text-fg-muted">{{ row.event_type }}</span></template>
</template>
<template #cell-workflow="{ row }"><RouterLink class="underline" :to="`/workflows/${row.workflow}`">{{ row.workflow }}</RouterLink></template>
<template #cell-workflow="{ row }"><RouterLink class="hover:underline" :to="`/workflows/${row.workflow}`">{{ row.workflow }}</RouterLink></template>
<template #cell-filter="{ row }">
<span v-if="!row.every" class="font-mono text-caption">{{ Object.entries(row.filter ?? {}).map(([k, v]) => `${k}=${v}`).join(", ") }}</span>
</template>
+100 -135
View File
@@ -1,20 +1,15 @@
<script setup lang="ts">
import { Plus } from "@lucide/vue";
import { computed, onMounted, ref } from "vue";
import { Plus, Trash2 } from "@lucide/vue";
import { computed, onMounted, ref, watch } from "vue";
import PageHeader from "@/base/PageHeader.vue";
import { Button } from "@/components/ui/button";
import { DataTable, type DataTableColumn } from "@/components/ui/data-table";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { Input } from "@/components/ui/input";
import { MoreMenu } from "@/components/ui/more-menu";
import { ReadError } from "@/components/ui/read-error";
import { Label } from "@/components/ui/label";
import { Section } from "@/components/ui/section";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { SettingRow } from "@/components/ui/setting-row";
import { Skeleton } from "@/components/ui/skeleton";
import { Spinner } from "@/components/ui/spinner";
import { errors } from "@/copy/errors";
import { api, describeError, type AgentModel } from "@/lib/api";
import { useRead } from "@/lib/use-read";
@@ -28,145 +23,115 @@ onMounted(() => {
void credentials.reload();
});
interface Row extends AgentModel { alias: string }
const rows = computed<Row[]>(() => Object.entries(data.value ?? {}).map(([alias, m]) => ({ alias, ...m })));
const columns: DataTableColumn<Row>[] = [
{ id: "alias", label: "Alias", fixed: true, sort: (r) => r.alias },
{ id: "model", label: "Model", fixed: true, sort: (r) => r.model },
{ id: "class", label: "Provider", sort: (r) => r.class },
{ id: "base", label: "Base URL", hidden: true },
{ id: "key", label: "API key" },
];
const NONE = "__none__";
const editing = ref(false);
const isNew = ref(true);
const form = ref({ alias: "", class: "", model: "", base_url: "", api_key_credential: NONE });
function open(row?: Row): void {
isNew.value = !row;
actionError.value = "";
tested.value = "";
form.value = {
alias: row?.alias ?? "",
class: row?.class ?? "",
model: row?.model ?? "",
base_url: row?.base_url ?? "",
api_key_credential: row?.api_key_credential || NONE,
};
editing.value = true;
}
const model = (): AgentModel => ({
class: form.value.class.trim(),
model: form.value.model.trim(),
base_url: form.value.base_url.trim() || undefined,
api_key_credential: form.value.api_key_credential === NONE ? undefined : form.value.api_key_credential,
interface Form { class: string; model: string; base_url: string; key: string }
const form = (m?: AgentModel): Form => ({ class: m?.class ?? "", model: m?.model ?? "", base_url: m?.base_url ?? "", key: m?.api_key_credential || NONE });
const body = (f: Form): AgentModel => ({
class: f.class.trim(),
model: f.model.trim(),
base_url: f.base_url.trim() || undefined,
api_key_credential: f.key === NONE ? undefined : f.key,
});
const busy = ref(false);
const actionError = ref("");
const tested = ref("");
async function test(): Promise<void> {
busy.value = true;
actionError.value = "";
tested.value = "";
// Edits are held per alias until that alias is saved.
const edits = ref<Record<string, Form>>({});
const added = ref<string[]>([]);
watch(data, (models) => {
const next: Record<string, Form> = {};
for (const [alias, m] of Object.entries(models ?? {})) next[alias] = edits.value[alias] && dirty(alias) ? edits.value[alias] : form(m);
for (const alias of ["default", ...added.value]) next[alias] ??= edits.value[alias] ?? form();
edits.value = next;
});
const saved = (alias: string) => form(data.value?.[alias]);
function dirty(alias: string): boolean {
const now = edits.value[alias];
const was = saved(alias);
return !!now && (now.class !== was.class || now.model !== was.model || now.base_url !== was.base_url || now.key !== was.key);
}
const aliases = computed(() => [...new Set(["default", ...Object.keys(data.value ?? {}), ...added.value])]);
const bearer = computed(() => (credentials.data.value ?? []).filter((c) => c.kind === "bearer"));
const field = (alias: string): Form => edits.value[alias] ?? form();
const busy = ref("");
const rowError = ref<Record<string, string>>({});
const tested = ref<Record<string, string>>({});
async function run(alias: string, act: () => Promise<void>): Promise<void> {
busy.value = alias;
rowError.value = { ...rowError.value, [alias]: "" };
try {
const answer = await api.testAgentModel(model());
tested.value = `${answer.model} answered “${answer.answer.trim()}”`;
await act();
} catch (cause) {
actionError.value = describeError(cause, errors.common.unknown);
rowError.value = { ...rowError.value, [alias]: describeError(cause, errors.common.unknown) };
} finally {
busy.value = false;
busy.value = "";
}
}
async function save(): Promise<void> {
busy.value = true;
actionError.value = "";
try {
const alias = form.value.alias.trim();
await api.putAgentModel(alias === "default" ? "" : alias, model());
editing.value = false;
const save = (alias: string) =>
run(alias, async () => {
await api.putAgentModel(alias === "default" ? "" : alias, body(field(alias)));
added.value = added.value.filter((a) => a !== alias);
await reload();
} catch (cause) {
actionError.value = describeError(cause, errors.common.unknown);
} finally {
busy.value = false;
}
}
const pending = ref<Row | null>(null);
const removeError = ref("");
async function remove(row: Row): Promise<void> {
busy.value = true;
removeError.value = "";
try {
await api.deleteAgentModel(row.alias === "default" ? "" : row.alias);
});
const test = (alias: string) =>
run(alias, async () => {
const answer = await api.testAgentModel(body(field(alias)));
tested.value = { ...tested.value, [alias]: `${answer.model} answered “${answer.answer.trim()}”` };
});
const remove = (alias: string) =>
run(alias, async () => {
if (data.value?.[alias]) await api.deleteAgentModel(alias === "default" ? "" : alias);
added.value = added.value.filter((a) => a !== alias);
delete edits.value[alias];
await reload();
} catch (cause) {
removeError.value = describeError(cause, errors.common.unknown);
} finally {
busy.value = false;
}
});
const newAlias = ref("");
function addAlias(): void {
const name = newAlias.value.trim();
if (!name || aliases.value.includes(name)) return;
added.value = [...added.value, name];
edits.value = { ...edits.value, [name]: form() };
newAlias.value = "";
}
</script>
<template>
<div>
<PageHeader title="Models">
<Button size="sm" aria-label="Add model" title="Add model" @click="open()"><Plus /></Button>
</PageHeader>
<ReadError v-if="error" :message="error" retry-label="Retry" @retry="reload" />
<div v-else-if="!data" role="status" aria-label="Loading models" class="space-y-2"><Skeleton class="h-8 w-full" /></div>
<DataTable v-else :columns="columns" :rows="rows" :row-key="(r) => r.alias" storage-key="agent-models">
<template #cell-alias="{ row }"><span class="font-medium">{{ row.alias }}</span></template>
<template #cell-model="{ row }"><span class="font-mono text-caption">{{ row.model }}</span></template>
<template #cell-class="{ row }">{{ row.class }}</template>
<template #cell-base="{ row }"><span class="font-mono text-caption">{{ row.base_url }}</span></template>
<template #cell-key="{ row }">{{ row.api_key_credential }}</template>
<template #actions="{ row }">
<MoreMenu :label="`${row.alias} actions`"><DropdownMenuItem @select="open(row)">Edit</DropdownMenuItem><DropdownMenuItem class="text-danger" @select="pending = row">Delete</DropdownMenuItem></MoreMenu>
</template>
<template #empty><Empty><EmptyHeader><EmptyTitle>No models</EmptyTitle></EmptyHeader></Empty></template>
</DataTable>
<p v-if="removeError" role="alert" class="pt-2 text-caption text-danger">{{ removeError }}</p>
<AlertDialog :open="pending !== null" @update:open="(v: boolean) => { if (!v) pending = null; }">
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete model?</AlertDialogTitle>
<AlertDialogDescription>Delete the alias "{{ pending?.alias }}"? Workflows that name it will fail.</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction @click="if (pending) { const row = pending; pending = null; void remove(row); }">Delete model</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
<Dialog v-model:open="editing">
<DialogContent class="sm:max-w-2xl">
<DialogHeader><DialogTitle>{{ isNew ? "Add model" : `Edit ${form.alias}` }}</DialogTitle></DialogHeader>
<form id="model-form" @submit.prevent="save">
<SettingRow v-if="isNew" label="Alias" for="model-alias" hint="Workflows name it; default is used when they name none."><Input id="model-alias" v-model="form.alias" required /></SettingRow>
<SettingRow label="Provider" for="model-class"><Input id="model-class" v-model="form.class" placeholder="openai" required /></SettingRow>
<SettingRow label="Model" for="model-name"><Input id="model-name" v-model="form.model" required /></SettingRow>
<SettingRow label="Base URL" for="model-base" hint="Empty uses the provider's own."><Input id="model-base" v-model="form.base_url" type="url" /></SettingRow>
<SettingRow label="API key" for="model-key" hint="A bearer credential.">
<Select v-model="form.api_key_credential">
<SelectTrigger id="model-key" class="w-full"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem :value="NONE">None</SelectItem>
<SelectItem v-for="c in (credentials.data.value ?? []).filter((c) => c.kind === 'bearer')" :key="c.name" :value="c.name">{{ c.name }}</SelectItem>
</SelectContent>
</Select>
</SettingRow>
<p v-if="tested" role="status" class="pt-2 text-caption text-ok">{{ tested }}</p>
<p v-if="actionError" role="alert" class="pt-2 text-caption text-danger">{{ actionError }}</p>
</form>
<DialogFooter>
<Button variant="outline" :disabled="busy || !form.class || !form.model" @click="test">Test</Button>
<Button type="submit" form="model-form" :disabled="busy">Save</Button>
</DialogFooter>
</DialogContent>
</Dialog>
<PageHeader title="Models" />
<div v-if="error" class="mb-4 text-label text-danger" role="alert">
<p>{{ error }}</p>
<Button variant="outline" size="sm" @click="reload">Retry</Button>
</div>
<p v-else-if="!data" class="flex items-center gap-2 text-label text-fg-muted"><Spinner />Loading models…</p>
<Section v-else title="Aliases">
<p v-if="!data.default" class="mb-3 text-label text-warn" role="alert">Set the default alias.</p>
<Empty v-if="!aliases.length"><EmptyHeader><EmptyTitle>No models</EmptyTitle></EmptyHeader></Empty>
<div v-for="alias in aliases" :key="alias" class="border-b border-border py-2.5 last-of-type:border-b-0">
<div class="flex flex-wrap items-center gap-3">
<Label :for="`model-${alias}`" class="w-28 text-label font-medium @max-xl:w-full">{{ alias }}</Label>
<Input v-model="field(alias).class" class="w-32 font-mono" placeholder="provider" :aria-label="`${alias} provider`" />
<Input :id="`model-${alias}`" v-model="field(alias).model" class="min-w-40 flex-1 basis-40 font-mono" placeholder="model" />
<Input v-model="field(alias).base_url" type="url" class="min-w-40 flex-1 basis-40 font-mono" placeholder="Base URL" :aria-label="`${alias} base URL`" />
<Select v-model="field(alias).key">
<SelectTrigger class="w-44 @max-xl:w-full" :aria-label="`${alias} API key`"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem :value="NONE">No key</SelectItem>
<SelectItem v-for="c in bearer" :key="c.name" :value="c.name">{{ c.name }}</SelectItem>
</SelectContent>
</Select>
<span class="ml-auto flex items-center gap-1">
<Button variant="outline" size="sm" :disabled="!!busy || !field(alias).class || !field(alias).model" @click="test(alias)">Test</Button>
<Button size="sm" :disabled="!!busy || !dirty(alias) || !field(alias).class || !field(alias).model" @click="save(alias)">Save</Button>
<Button v-if="alias !== 'default' || data.default" variant="ghost" size="icon" :aria-label="`Remove alias ${alias}`" :disabled="!!busy" @click="remove(alias)"><Trash2 /></Button>
</span>
</div>
<p v-if="tested[alias]" role="status" class="pt-1.5 text-caption text-ok">{{ tested[alias] }}</p>
<p v-if="rowError[alias]" role="alert" class="pt-1.5 text-caption text-danger">{{ rowError[alias] }}</p>
</div>
<form class="flex flex-wrap gap-2 border-t border-border pt-3" @submit.prevent="addAlias">
<Input v-model="newAlias" class="max-w-56 font-mono" placeholder="alias" aria-label="New alias" />
<Button type="submit" variant="outline" size="sm" :disabled="!newAlias.trim()"><Plus data-icon="inline-start" />Add alias</Button>
</form>
</Section>
</div>
</template>
+3 -3
View File
@@ -34,8 +34,8 @@ onMounted(() => {
const columns: DataTableColumn<Credential>[] = [
{ id: "name", label: "Credential", fixed: true, sort: (c) => c.name },
{ id: "kind", label: "Kind", sort: (c) => c.kind },
{ id: "fields", label: "Fields" },
{ id: "kind", label: "Kind", width: "10rem", sort: (c) => c.kind },
{ id: "fields", label: "Fields", width: "24rem" },
];
interface FieldForm { from: "value" | "engine"; value: string; engine: string; key: string }
@@ -94,7 +94,7 @@ async function submit(): Promise<void> {
<template>
<div>
<PageHeader title="Credentials">
<Button size="sm" aria-label="Add credential" title="Add credential" :disabled="!kinds.data.value" @click="open()"><Plus /></Button>
<Button size="icon-sm" variant="ghost" aria-label="Add credential" title="Add credential" :disabled="!kinds.data.value" @click="open()"><Plus /></Button>
</PageHeader>
<p v-if="restarted.length" role="status" class="mb-2 text-caption text-fg-muted">Restarted {{ restarted.join(", ") }}.</p>
<ReadError v-if="error || kinds.error.value" :message="error || kinds.error.value" retry-label="Retry" @retry="reload(); kinds.reload()" />
+6 -6
View File
@@ -31,11 +31,11 @@ onMounted(reload);
const columns = computed<DataTableColumn<Extension>[]>(() => [
{ id: "name", label: "Name", fixed: true, sort: (e) => e.name },
{ id: "state", label: "State", fixed: true, sort: (e) => e.state },
{ id: "version", label: "Version", sort: (e) => e.version ?? "" },
...(props.kind === "connectors" ? [{ id: "capabilities", label: "Declares" }] : []),
{ id: "path", label: "Path", hidden: true },
{ id: "egress", label: "Egress", hidden: true },
{ id: "state", label: "State", fixed: true, width: "9rem", sort: (e) => e.state },
{ id: "version", label: "Version", width: "8rem", sort: (e) => e.version ?? "" },
...(props.kind === "connectors" ? [{ id: "capabilities", label: "Declares", width: "14rem" }] : []),
{ id: "path", label: "Path", hidden: true, width: "18rem" },
{ id: "egress", label: "Egress", hidden: true, width: "14rem" },
]);
const CAPABILITY_GROUPS = [
@@ -151,7 +151,7 @@ async function remove(): Promise<void> {
<div v-else-if="!data" role="status" :aria-label="`Loading ${noun}s`" class="space-y-2"><Skeleton class="h-8 w-full" /></div>
<template v-else>
<div class="mb-2 flex justify-end">
<Button size="sm" :aria-label="`Add ${noun}`" :title="`Add ${noun}`" @click="open()"><Plus /></Button>
<Button size="icon-sm" variant="ghost" :aria-label="`Add ${noun}`" :title="`Add ${noun}`" @click="open()"><Plus /></Button>
</div>
<DataTable :columns="columns" :rows="data" :row-key="(e) => e.name" :storage-key="`extensions-${kind}`">
<template #cell-name="{ row }"><span class="font-medium">{{ row.name }}</span></template>
+2 -2
View File
@@ -21,13 +21,13 @@ export interface WorkflowRow {
const time = (at?: string) => (at ? Date.parse(at) : 0);
/** "24h0m0s" as the server prints a Go duration, "24h" as a person reads it. */
function every(duration: string): string {
export function interval(duration: string): string {
return duration.replace(/(?<=\D)0s$/, "").replace(/(?<=\D)0m$/, "");
}
/** How a trigger starts its workflow, in words. */
export function startedBy(trigger: Trigger): string {
return trigger.every ? `Every ${every(trigger.every)}` : `${trigger.source} ${trigger.event_type}`;
return trigger.every ? `Every ${interval(trigger.every)}` : `${trigger.source} ${trigger.event_type}`;
}
/** Running workflows first, then by how recently they ran, then by name. */