fix(webui): strip the task detail page to one head strip and honest states
The page stacked five chrome strips before its content and every state wrote an essay. The head is now one strip -- title, workflow, actions, a single meta line -- the retry explainer is gone (the confirm dialog already carries the commit-discard consequence), and empty states say the fact in the title without a paragraph re-deriving it.
This commit is contained in:
1 parent
abe2f40e05
commit
cf11f63271
9 files changed
+67
-106
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
|
||||
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
|
||||
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
|
||||
|
||||
import JsonBlock from "./JsonBlock.vue";
|
||||
import PanelError from "./PanelError.vue";
|
||||
@@ -44,31 +44,18 @@ const recognised = computed(() => schema.value === CONFIG_SCHEMA);
|
||||
|
||||
<Empty v-else-if="!event">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>Not captured for this run</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Archie records the effective configuration when it dispatches an attempt. Attempt {{ attempt }} has no such
|
||||
record — it predates the record, or the capture did not run. Nothing here says the run used the defaults.
|
||||
</EmptyDescription>
|
||||
<EmptyTitle>No configuration captured for attempt {{ attempt }}</EmptyTitle>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
<div v-else>
|
||||
<p class="mb-2 max-w-[75ch] text-sm text-fg-muted">
|
||||
This is attempt {{ event.attempt }}'s effective task-runtime configuration: a non-secret subset covering bot
|
||||
identity, models, limits, budgets, dispatch, diff cap, notifications, forge host and tool policy. It is not the
|
||||
dashboard configuration view — providers, repositories, identities, credentials and lock state are not part of
|
||||
it.
|
||||
</p>
|
||||
<div class="mb-3 text-xs text-fg-muted">
|
||||
Captured {{ event.at || "at an unrecorded time"
|
||||
}}<span v-if="event.stage"> in stage {{ event.stage }}</span>
|
||||
</div>
|
||||
<JsonBlock v-if="recognised" :value="document" />
|
||||
<template v-else>
|
||||
<p class="mb-2 text-sm text-warn">
|
||||
Recorded in an unknown schema{{ schema ? ` (${schema})` : "" }}. The raw payload is shown verbatim; nothing
|
||||
here reinterprets it.
|
||||
</p>
|
||||
<p class="mb-2 text-sm text-warn">Unknown schema{{ schema ? ` (${schema})` : "" }} — shown verbatim.</p>
|
||||
<JsonBlock :value="event.data" />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -43,20 +43,13 @@ const nothingRecorded = computed(() => !props.state?.found || !captures.value.le
|
||||
<Empty v-else-if="undecodable">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>A change capture was recorded but could not be read</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
This attempt has a change capture event, but this dashboard could not decode its payload. That is a read
|
||||
failure, not a statement about what the attempt changed.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
<Empty v-else-if="nothingRecorded">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>No change capture was recorded for this attempt</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Archie records what an attempt changed when it commits or pushes that work. Nothing was recorded here — the
|
||||
attempt may predate capture, or it produced no commit. This is not the same as "no files changed".
|
||||
</EmptyDescription>
|
||||
<EmptyTitle>No change capture recorded for this attempt</EmptyTitle>
|
||||
<EmptyDescription>The attempt may predate capture, or it produced no commit.</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
|
||||
@@ -31,10 +31,7 @@ defineEmits<{ retry: [] }>();
|
||||
@retry="$emit('retry')"
|
||||
/>
|
||||
<div v-else>
|
||||
<p class="mb-3 text-sm text-fg-muted">
|
||||
The stored task record and its events, verbatim. Events are unfiltered on purpose: this is every event the task
|
||||
has, and each one carries the attempt it belongs to. Attempt {{ attempt }} is the one selected above.
|
||||
</p>
|
||||
<p class="mb-3 text-sm text-fg-muted">The stored record and every event, verbatim.</p>
|
||||
<JsonBlock :value="state" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Play, RefreshCw } from "@lucide/vue";
|
||||
import { RefreshCw } from "@lucide/vue";
|
||||
import { computed } from "vue";
|
||||
|
||||
import {
|
||||
@@ -24,30 +24,26 @@ import { useTaskRun } from "./use-task-run";
|
||||
* Restarting a task as a new run.
|
||||
*
|
||||
* The control is only live where the task itself offers the action: a new run
|
||||
* can only start from a parked task, so anywhere else the page says why rather
|
||||
* than offering a button that will be refused. The refusal that does arrive
|
||||
* (the task moved between the read and the click) is rendered from the error
|
||||
* class, because "you cannot do that", "your session has expired" and "the
|
||||
* daemon did not answer" need three different responses from the operator.
|
||||
* can only start from a parked task, so anywhere else the button is disabled
|
||||
* and the title says why. The refusal that does arrive (the task moved between
|
||||
* the read and the click) is rendered from the error class, because "you
|
||||
* cannot do that", "your session has expired" and "the daemon did not answer"
|
||||
* need three different responses from the operator.
|
||||
*
|
||||
* `compact` renders the bare control for the header's action row; on its own
|
||||
* the component also renders the disabled reason.
|
||||
*/
|
||||
const props = defineProps<{ id: string }>();
|
||||
const props = defineProps<{ id?: string; compact?: boolean }>();
|
||||
|
||||
const run = useTaskRun();
|
||||
|
||||
// The action's own kind decides how loud the button is: `retry` is primary in
|
||||
// the served catalogue, and would be quiet on the day it is not.
|
||||
const variant = computed(() => (run.retryKind === "primary" ? "default" : "outline"));
|
||||
|
||||
const confirmText = computed(
|
||||
() =>
|
||||
`Start a new run for "${run.task?.title || `task ${props.id}`}"? This is a new attempt, and the previous attempt's commits are discarded.`,
|
||||
() => `Start a new run for "${run.task?.title || `task ${props.id}`}"? The previous attempt's commits are discarded.`,
|
||||
);
|
||||
|
||||
const unavailable = computed(() => {
|
||||
if (run.canRetry || run.taskList === undefined) return "";
|
||||
return run.task
|
||||
? `A new run can only start from a parked task. This task is ${statusLabel(run.task.status ?? "")}.`
|
||||
: "This task's operator controls could not be read.";
|
||||
return run.task ? `New runs start from a parked task. This task is ${statusLabel(run.task.status ?? "")}.` : "";
|
||||
});
|
||||
|
||||
const errorText = computed(() => {
|
||||
@@ -60,37 +56,32 @@ const errorText = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="mb-4 flex flex-wrap items-center gap-3" aria-label="Start a new run">
|
||||
<AlertDialog>
|
||||
<AlertDialogTrigger as-child>
|
||||
<Button :variant="variant" :disabled="!run.canRetry || run.retryBusy" title="Retry this task as a new run">
|
||||
<Spinner v-if="run.retryBusy" data-icon="inline-start" />
|
||||
<Play v-else data-icon="inline-start" />
|
||||
{{ run.retryBusy ? "Starting…" : "Start a new run" }}
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Start a 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>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
|
||||
<p class="min-w-0 flex-1 basis-[22rem] text-sm text-fg-muted">
|
||||
Starts a new attempt for this task: a fresh worktree reset onto the base branch. The previous attempt's
|
||||
commits are discarded — they are not carried into the new run.
|
||||
</p>
|
||||
<p v-if="unavailable" class="min-w-0 flex-1 basis-[22rem] text-sm text-fg-muted">{{ unavailable }}</p>
|
||||
<Alert v-if="errorText" variant="destructive" class="basis-full">
|
||||
<AlertDescription>{{ errorText }}</AlertDescription>
|
||||
</Alert>
|
||||
</section>
|
||||
</template>
|
||||
<AlertDialog>
|
||||
<AlertDialogTrigger as-child>
|
||||
<Button
|
||||
:variant="run.retryKind === 'primary' ? 'default' : 'outline'"
|
||||
:disabled="!run.canRetry || run.retryBusy"
|
||||
:title="unavailable || 'Retry this task as a new run'"
|
||||
>
|
||||
<Spinner v-if="run.retryBusy" data-icon="inline-start" />
|
||||
{{ run.retryBusy ? "Starting…" : "Start a new run" }}
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Start a 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>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
<Alert v-if="errorText" variant="destructive" class="mt-2">
|
||||
<AlertDescription>{{ errorText }}</AlertDescription>
|
||||
</Alert>
|
||||
</template>
|
||||
@@ -6,7 +6,6 @@ import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Tabs } from "@/components/ui/tabs";
|
||||
|
||||
import AttemptSelector from "./AttemptSelector.vue";
|
||||
import StartNewRun from "./StartNewRun.vue";
|
||||
import TabBar from "./TabBar.vue";
|
||||
import TaskDetailNotice from "./TaskDetailNotice.vue";
|
||||
import TaskHeader from "./TaskHeader.vue";
|
||||
@@ -46,7 +45,6 @@ const run = provideTaskRun(taskId);
|
||||
<TaskHeader :id="rawId" />
|
||||
<TaskMetaBar />
|
||||
<TaskNotes :id="rawId" />
|
||||
<StartNewRun :id="rawId" />
|
||||
<AttemptSelector />
|
||||
|
||||
<Card>
|
||||
|
||||
+13
-18
@@ -5,34 +5,28 @@ import { RouterLink } from "vue-router";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
import StartNewRun from "./StartNewRun.vue";
|
||||
import { useTaskRun } from "./use-task-run";
|
||||
|
||||
/**
|
||||
* The run page's head: which task this is, and the two things an operator does
|
||||
* from here -- go back, or re-read everything.
|
||||
* The run page's head, one strip: the task, its workflow line, and the
|
||||
* actions. Back and Refresh are page chrome; Start a new run lives here too,
|
||||
* since a restart is the page's one decision. The commit-discard consequence
|
||||
* is stated in the confirm dialog, not beside the button.
|
||||
*/
|
||||
const props = defineProps<{ id: string }>();
|
||||
|
||||
const run = useTaskRun();
|
||||
|
||||
const title = computed(() => run.task?.title || `Task #${props.id}`);
|
||||
const sub = computed(() => {
|
||||
const task = run.task;
|
||||
return [
|
||||
`One run of task ${props.id}`,
|
||||
task?.workflow ? `${task.workflow} workflow` : "",
|
||||
task?.repo ? `${task.owner}/${task.repo}` : "",
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" · ");
|
||||
});
|
||||
const workflow = computed(() => (run.task?.workflow ? `${run.task.workflow} workflow` : ""));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mb-5 flex flex-wrap items-start justify-between gap-5">
|
||||
<div>
|
||||
<h1 class="text-3xl font-semibold tracking-[-0.03em]">{{ title }}</h1>
|
||||
<p class="mt-2 text-sm text-fg-muted">{{ sub }}</p>
|
||||
<div class="mb-4 flex flex-wrap items-start justify-between gap-x-5 gap-y-2">
|
||||
<div class="min-w-0">
|
||||
<h1 class="text-2xl font-semibold tracking-[-0.02em]">{{ title }}</h1>
|
||||
<p v-if="workflow" class="mt-1 text-sm text-fg-muted">{{ workflow }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<Button variant="outline" as-child>
|
||||
@@ -41,10 +35,11 @@ const sub = computed(() => {
|
||||
Back to tasks
|
||||
</RouterLink>
|
||||
</Button>
|
||||
<Button @click="run.refreshAll">
|
||||
<Button variant="outline" @click="run.refreshAll">
|
||||
<RefreshCw data-icon="inline-start" />
|
||||
Refresh
|
||||
</Button>
|
||||
<StartNewRun compact :id="id" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
@@ -20,10 +20,10 @@ const run = useTaskRun();
|
||||
|
||||
const note = computed(() => {
|
||||
if (run.taskList === null) {
|
||||
return "The task list could not be read, so this page cannot show the task's current status or its operator controls. The run history below comes from the task's own endpoints.";
|
||||
return "The task list could not be read, so the current status and operator controls are unavailable.";
|
||||
}
|
||||
if (Array.isArray(run.taskList) && !run.task) {
|
||||
return `Task ${props.id} is not among the tasks this dashboard lists (the list covers the 100 most recently updated). Its recorded attempts are shown below; the Debug tab holds the stored record verbatim.`;
|
||||
return `Task ${props.id} is outside the recent-tasks list (the 100 most recently updated). Its recorded attempts are shown below.`;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user