fix(webui): show park reason, one attempt control in the rail, tighter stage selection
This commit is contained in:
9 files changed
+21
-33
No files matched your search
@@ -9,6 +9,7 @@ import {
|
||||
} from "@/components/ui/empty";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
|
||||
import AttemptSelector from "./AttemptSelector.vue";
|
||||
import PanelError from "./PanelError.vue";
|
||||
import PanelLoading from "./PanelLoading.vue";
|
||||
import StageRow from "./StageRow.vue";
|
||||
@@ -106,7 +107,10 @@ const startedAt = computed(() => {
|
||||
|
||||
<div v-else>
|
||||
<div class="mb-4 flex flex-wrap items-center gap-3">
|
||||
<span class="font-semibold">Attempt {{ attempt.attempt }}</span>
|
||||
<template v-if="attempts.length > 1">
|
||||
<span class="text-sm text-fg-muted">Attempt</span>
|
||||
<AttemptSelector />
|
||||
</template>
|
||||
<Badge :variant="meta.kind">{{ meta.label }}</Badge>
|
||||
<span class="text-xs text-fg-muted">{{ startedAt }}</span>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,6 @@ const nodeClass = computed(() =>
|
||||
<template>
|
||||
<li
|
||||
class="relative grid grid-cols-[1.75rem_1fr] gap-2 pb-4 before:absolute before:top-4 before:bottom-0 before:left-[0.6875rem] before:w-px before:bg-border-strong last:before:hidden max-md:grid-cols-1 max-md:border-b max-md:border-border max-md:pb-3 max-md:before:hidden"
|
||||
:class="props.selected ? 'rounded-md bg-primary-soft' : ''"
|
||||
>
|
||||
<span
|
||||
:class="nodeClass"
|
||||
@@ -60,7 +59,7 @@ const nodeClass = computed(() =>
|
||||
aria-hidden="true"
|
||||
class="max-md:hidden"
|
||||
/>
|
||||
<div class="min-w-0" :class="props.selected ? '-my-2 rounded-md py-2' : ''">
|
||||
<div class="min-w-0">
|
||||
<!--
|
||||
Selecting a stage commands the inspector to this stage's log (the
|
||||
master-detail contract). The control is a real button so keyboard
|
||||
@@ -68,7 +67,8 @@ const nodeClass = computed(() =>
|
||||
-->
|
||||
<button
|
||||
type="button"
|
||||
class="flex w-full flex-wrap items-center gap-2 rounded text-left"
|
||||
class="-mx-2 -my-1 flex w-[calc(100%+1rem)] flex-wrap items-center gap-2 rounded-md px-2 py-1 text-left hover:bg-muted/40"
|
||||
:class="props.selected ? 'bg-primary-soft hover:bg-primary-soft' : ''"
|
||||
:aria-pressed="props.selected ?? false"
|
||||
@click="emit('select')"
|
||||
>
|
||||
|
||||
@@ -5,7 +5,6 @@ import { useRoute } from "vue-router";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Tabs } from "@/components/ui/tabs";
|
||||
|
||||
import AttemptSelector from "./AttemptSelector.vue";
|
||||
import TabBar from "./TabBar.vue";
|
||||
import TaskDetailNotice from "./TaskDetailNotice.vue";
|
||||
import TaskHeader from "./TaskHeader.vue";
|
||||
@@ -27,8 +26,8 @@ import { provideTaskRun } from "./use-task-run";
|
||||
*
|
||||
* The page is a master-detail split pane (docs/prds/task-run-master-detail.md):
|
||||
* the stage rail is the master and is always visible, the four context panels
|
||||
* are the inspector and own the tab bar. Below the shell's 900px frame
|
||||
* breakpoint the rail stacks above the inspector.
|
||||
* are the inspector and own the tab bar. Below the `lg` breakpoint the rail
|
||||
* stacks above the inspector.
|
||||
*
|
||||
* This file composes the page and nothing else: the reads and the caches are
|
||||
* use-task-run, the head, meta bar, notes, restart control, attempt selector,
|
||||
@@ -49,9 +48,7 @@ const run = provideTaskRun(taskId);
|
||||
<TaskDetailNotice v-else-if="run.missing" kind="missing" :raw="rawId" />
|
||||
<div v-else>
|
||||
<TaskHeader :id="rawId" />
|
||||
<TaskMetaBar>
|
||||
<AttemptSelector class="ml-auto" />
|
||||
</TaskMetaBar>
|
||||
<TaskMetaBar />
|
||||
<TaskNotes :id="rawId" />
|
||||
|
||||
<div
|
||||
|
||||
@@ -14,11 +14,7 @@ import { LOG_LEVELS } from "@/lib/log";
|
||||
import type { LogFilters } from "./task-run";
|
||||
|
||||
/**
|
||||
* The log pane's filter row, and the attempt it is showing.
|
||||
*
|
||||
* The attempt is not a filter: the page selects the attempt and this row
|
||||
* reports which one it is, so the pane can never read attempt 1's log while
|
||||
* claiming attempt 2.
|
||||
* The log pane's filter row.
|
||||
*
|
||||
* The two "everything" options need a sentinel value: an empty string is how a
|
||||
* Select spells "nothing selected", so `""` cannot also be an item. The CSV
|
||||
@@ -30,7 +26,6 @@ const ALL = "__all__";
|
||||
const props = defineProps<{
|
||||
filters: LogFilters;
|
||||
stages: string[];
|
||||
attempt: number;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{ filter: [next: LogFilters] }>();
|
||||
@@ -59,10 +54,6 @@ function setStage(value: unknown): void {
|
||||
|
||||
<template>
|
||||
<div class="flex flex-wrap items-center gap-3 border-b border-border pb-3">
|
||||
<span class="text-sm font-medium">{{
|
||||
attempt > 0 ? `Attempt ${attempt}` : "Current attempt"
|
||||
}}</span>
|
||||
|
||||
<div class="inline-flex items-center gap-2">
|
||||
<Select
|
||||
:model-value="levelValue"
|
||||
@@ -106,12 +97,5 @@ function setStage(value: unknown): void {
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<!-- A stage filter is a narrowing, not a clean sweep: only lines a stage
|
||||
tagged carry a stage, and agent/tool output never does. Saying so
|
||||
beside the control is what keeps a sparse result from reading as a
|
||||
broken pane. -->
|
||||
<p v-if="filters.stage" class="basis-full text-xs text-fg-muted">
|
||||
Only lines a stage tagged are shown; agent and tool output carries none.
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -112,7 +112,6 @@ const download = computed(() =>
|
||||
class="mb-3"
|
||||
:filters="filters"
|
||||
:stages="stages"
|
||||
:attempt="resolvedAttempt"
|
||||
@filter="$emit('filter', $event)"
|
||||
/>
|
||||
|
||||
|
||||
@@ -8,8 +8,7 @@ import { statusKind, statusLabel } from "@/lib/task-meta";
|
||||
import { useTaskRun } from "./use-task-run";
|
||||
|
||||
/**
|
||||
* The task's lifecycle status, plus whatever the page parks on the same row
|
||||
* (the attempt pager rides here, pushed right). Everything comes from reads
|
||||
* The task's lifecycle status and, when parked, why. Everything comes from reads
|
||||
* the page already holds, so the bar costs no request of its own.
|
||||
*
|
||||
* "Not read" and "loading" are kept apart from "no status": the task list is
|
||||
@@ -33,7 +32,11 @@ const taskStatusLabel = computed(() => statusLabel(run.task?.status ?? ""));
|
||||
>
|
||||
<template v-else-if="run.task">
|
||||
<Badge :variant="taskKind">{{ taskStatusLabel }}</Badge>
|
||||
<span
|
||||
v-if="run.task.status === 'parked' && run.task.park_reason"
|
||||
class="min-w-0 break-words text-fg-muted"
|
||||
>{{ run.task.park_reason }}</span
|
||||
>
|
||||
</template>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
@@ -51,6 +51,7 @@ export interface TaskRecord {
|
||||
issue_url?: string;
|
||||
pr_number?: number;
|
||||
pr_url?: string;
|
||||
park_reason?: string;
|
||||
actions?: string[];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user