feat(webui): run details show inputs, outputs and workflow.call links both ways

This commit is contained in:
sam committed 2026-10-05 21:01:39 +11:00
1 parent cdf4e3423c
commit 4cfbcd696c
13 files changed
+167 -91

No files matched your search

+9
View File
@@ -101,6 +101,15 @@ const nodeClass = computed(() =>
>
{{ stage.error }}
</div>
<div v-if="stage.calls?.length" class="mt-2 flex flex-wrap gap-3 text-xs">
<RouterLink
v-for="callee in stage.calls"
:key="callee"
:to="`/tasks/${callee}`"
class="text-fg-muted underline-offset-2 hover:text-foreground hover:underline"
>called task #{{ callee }}</RouterLink
>
</div>
<div
v-for="(retry, i) in retries"
:key="`retry-${i}`"
+28
View File
@@ -36,6 +36,16 @@ const parked = computed(() => status.value === "parked" && !!run.task?.park_reas
// task is finished with. Whether this task offers it at all is the server's
// action list, never this page's opinion about the status.
const HEAD_ACTIONS = ["archive"];
// The run's inputs and written outputs, one row per name.
const io = computed(() => {
const rows = (prefix: string, values?: Record<string, unknown>) =>
Object.entries(values ?? {}).map(([name, value]) => ({
label: `${prefix} ${name}`,
value: typeof value === "string" ? value : JSON.stringify(value),
}));
return [...rows("input", run.attempts?.inputs), ...rows("output", run.attempts?.outputs)];
});
const headerActions = computed(() =>
shownActionIds(run.task?.actions, HEAD_ACTIONS),
);
@@ -86,6 +96,24 @@ const headerActions = computed(() =>
</div>
</div>
<dl
v-if="io.length || run.attempts?.called_by"
class="mt-3 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs"
>
<template v-if="run.attempts?.called_by">
<dt class="text-fg-subtle">Called by</dt>
<dd>
<RouterLink :to="`/tasks/${run.attempts.called_by}`" class="font-mono text-fg-muted hover:text-foreground hover:underline"
>task #{{ run.attempts.called_by }}</RouterLink
>
</dd>
</template>
<template v-for="row in io" :key="row.label">
<dt class="text-fg-subtle">{{ row.label }}</dt>
<dd class="font-mono break-words text-fg-muted">{{ row.value }}</dd>
</template>
</dl>
<div
v-if="parked"
role="status"
+7
View File
@@ -65,6 +65,8 @@ export interface Stage {
status?: string;
duration_ms?: number;
error?: string;
/** The callee tasks this stage's workflow.call steps started. */
calls?: number[];
}
export interface Attempt {
@@ -83,6 +85,11 @@ export interface AttemptsState {
attempts?: Attempt[];
current_attempt?: number;
unattributed_events?: number;
/** What the task was started with and what its current attempt wrote. */
inputs?: Record<string, unknown>;
outputs?: Record<string, unknown>;
/** The task whose workflow.call started this one. */
called_by?: number;
}
/** One event off the task's stream, as much of it as this page reads. */