fix(webui): task page drops filler copy, the unattributed-events note and the New run tooltip

This commit is contained in:
sam committed 2026-10-13 17:16:25 +11:00
1 parent 4fd6efb7f0
commit 20cb2fd99d
9 files changed
+81 -117

No files matched your search

-9
View File
@@ -70,15 +70,6 @@ export function rowClass(level: string | null | undefined): string {
return LEVEL_ROW[levelKind(level)];
}
/**
* The end of an attempt's log: which attempt, and how much it wrote. The count
* is the lines on screen, so a filtered pane says how much the filter left.
*/
export function attemptFooter(attempt: number, lines: number): string {
const count = Math.max(0, Math.trunc(lines) || 0);
return `End of attempt ${attempt} \u00b7 ${count} line${count === 1 ? "" : "s"}`;
}
export function fmtValue(v: unknown): string {
if (v == null) return "";
return typeof v === "object" ? JSON.stringify(v) : String(v);
-13
View File
@@ -147,18 +147,5 @@ const startedAt = computed(() => {
</EmptyHeader>
</Empty>
</div>
<!-- Rendered in every loaded state, the empty ones included: a deployment
where every event predates the attempt column answers with no attempts
at all, and reporting "No attempts recorded" there without the count
would present unattributable history as nothing having happened. -->
<p
v-if="Number(state.unattributed_events) > 0"
class="mt-3 max-w-[70ch] text-xs text-fg-muted"
>
{{ Number(state.unattributed_events) }} event{{
Number(state.unattributed_events) === 1 ? "" : "s"
}}
on this task predate attempt attribution and cannot be assigned to a run.</p>
</template>
</template>
+4 -4
View File
@@ -67,21 +67,21 @@ const errorText = computed(() => {
:class="props.class"
:variant="run.retryKind === 'primary' ? 'default' : 'outline'"
:disabled="!run.canRetry || run.retryBusy"
:title="unavailable || 'Retry this task as a new run'"
:title="unavailable || undefined"
>
<Spinner v-if="run.retryBusy" data-icon="inline-start" />{{ run.retryBusy ? "Starting…" : "Start a new run" }}
<Spinner v-if="run.retryBusy" data-icon="inline-start" />{{ run.retryBusy ? "Starting…" : "New run" }}
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Start a new run</AlertDialogTitle>
<AlertDialogTitle>New run</AlertDialogTitle>
<AlertDialogDescription>{{ confirmText }}</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction @click="run.performRetry">
<RefreshCw data-icon="inline-start" />
Start a new run</AlertDialogAction>
New run</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
+1 -1
View File
@@ -39,7 +39,7 @@ const attempt = computed(() => run.attempts?.attempts?.find((a) => a.attempt ===
const failure = computed(() => {
const stage = attempt.value?.stages?.find((s) => s.error);
const current = run.attemptNumber === run.currentAttempt;
if (current && status.value === "parked") return { title: "Parked: this run needs your attention", detail: run.task?.park_reason || stage?.error || "", parked: true };
if (current && status.value === "parked") return { title: "Parked", detail: run.task?.park_reason || stage?.error || "", parked: true };
if (attempt.value?.status === "failed" || (current && status.value === "dead")) return { title: `Attempt ${run.attemptNumber} failed${stage?.name ? ` during ${stage.name}` : ""}`, detail: stage?.error || run.task?.park_reason || "", parked: false };
return null;
});
+2 -8
View File
@@ -11,7 +11,6 @@ import {
EmptyTitle,
} from "@/components/ui/empty";
import { api } from "@/lib/api";
import { attemptFooter } from "@/lib/log";
import PanelLoading from "./PanelLoading.vue";
import TaskLogFilters from "./TaskLogFilters.vue";
@@ -265,14 +264,9 @@ watch([() => route.hash, current], async () => {
>
<LogRow v-for="(entry, i) in view.entries" :key="entry.id ?? i" :entry="entry" :data-log-id="entry.id" tabindex="-1" />
</div>
<!-- Below the frame, not inside it: the log scrolls, and where an attempt
ended is the one line that must stay put while it does. -->
<p class="px-1 pt-2 text-xs text-fg-subtle">
{{ attemptFooter(resolvedAttempt, view.entries.length) }}
</p>
<div v-if="canPage" class="mt-2 flex flex-wrap items-center gap-2 px-1">
<Button variant="outline" size="sm" :disabled="!canOlder" @click="loadOlder">Load older</Button>
<Button variant="outline" size="sm" :disabled="!canNewer || paging" @click="loadNewer">Load newer</Button>
<Button variant="outline" size="sm" :disabled="!canOlder" @click="loadOlder">Older</Button>
<Button variant="outline" size="sm" :disabled="!canNewer || paging" @click="loadNewer">Newer</Button>
<span v-if="paging" class="text-xs text-fg-muted">Loading…</span>
<span v-else-if="pageError" class="text-xs text-danger">Could not load that page</span>
<span v-else-if="current?.more_available" class="text-xs text-fg-muted"
-1
View File
@@ -84,7 +84,6 @@ export interface Attempt {
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>;