fix(ui): tighten tasks page prose and phone layout
This commit is contained in:
1 parent
6368cc783a
commit
e6e1fe0075
20 files changed
+37
-62
No files matched your search
@@ -40,7 +40,7 @@ const recognised = computed(() => schema.value === configSchema());
|
||||
<PanelError
|
||||
v-else-if="events === null"
|
||||
title="Could not load this task's events"
|
||||
detail="The run configuration could not be read. Live updates will try again when the daemon reconnects."
|
||||
detail="Archie did not answer."
|
||||
/>
|
||||
|
||||
<Empty v-else-if="!event">
|
||||
@@ -55,7 +55,7 @@ const recognised = computed(() => schema.value === configSchema());
|
||||
</div>
|
||||
<JsonBlock v-if="recognised" :value="document" />
|
||||
<template v-else>
|
||||
<p class="mb-2 text-sm text-warn">Unknown schema{{ schema ? ` (${schema})` : "" }}. Shown verbatim.</p>
|
||||
<p class="mb-2 text-sm text-warn">Unknown schema{{ schema ? ` (${schema})` : "" }}.</p>
|
||||
<JsonBlock :value="event.data" />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -26,9 +26,9 @@ const total = computed(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<p v-if="!files.length" class="py-3 text-xs text-fg-muted">This capture recorded no file entries{{
|
||||
<p v-if="!files.length" class="py-3 text-xs text-fg-muted">No file entries recorded{{
|
||||
total
|
||||
? `, though its totals cover ${total} file${total === 1 ? "" : "s"}`
|
||||
? ` (diffstat covers ${total} file${total === 1 ? "" : "s"})`
|
||||
: ""
|
||||
}}.</p>
|
||||
<template v-else>
|
||||
|
||||
@@ -38,7 +38,7 @@ const nothingRecorded = computed(
|
||||
<PanelError
|
||||
v-else-if="state === null"
|
||||
title="Could not load this attempt's changed files"
|
||||
detail="No response. Retries on reconnect."
|
||||
detail="Archie did not answer."
|
||||
/>
|
||||
|
||||
<Empty v-else-if="undecodable">
|
||||
|
||||
@@ -25,7 +25,7 @@ defineProps<{
|
||||
<PanelError
|
||||
v-else-if="state === null"
|
||||
title="Could not load the stored record"
|
||||
detail="Archie did not answer. This view retries when the connection returns."
|
||||
detail="Archie did not answer."
|
||||
/>
|
||||
<div v-else>
|
||||
<JsonBlock :value="state" />
|
||||
|
||||
@@ -159,7 +159,6 @@ async function submit() {
|
||||
:required="field.required"
|
||||
@update:model-value="(value) => (inputText[field.name] = String(value ?? ''))"
|
||||
/>
|
||||
<p class="text-xs text-fg-subtle">{{ field.type }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ onBeforeUnmount(() => {
|
||||
role="status"
|
||||
>
|
||||
<template v-if="status === 'connecting'">Connecting…</template>
|
||||
<template v-else-if="status === 'closed'">The sandbox view ended.</template>
|
||||
<template v-else>The sandbox view is unavailable.</template>
|
||||
<template v-else-if="status === 'closed'">The sandbox ended.</template>
|
||||
<template v-else>Sandbox unavailable.</template>
|
||||
</p>
|
||||
<div
|
||||
ref="host"
|
||||
|
||||
@@ -100,7 +100,7 @@ const startedAt = computed(() => {
|
||||
<PanelError
|
||||
v-else-if="state === null"
|
||||
title="Could not load this task's attempts"
|
||||
detail="No response. Retries on reconnect."
|
||||
detail="Archie did not answer."
|
||||
/>
|
||||
<template v-else>
|
||||
<Empty v-if="!attempts.length">
|
||||
@@ -145,7 +145,6 @@ const startedAt = computed(() => {
|
||||
<Empty v-else>
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>No workflow steps recorded</EmptyTitle>
|
||||
<EmptyDescription>This attempt has no recorded workflow step execution.</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
</div>
|
||||
|
||||
@@ -122,7 +122,7 @@ const nodeClass = computed(() =>
|
||||
:key="i"
|
||||
class="mt-2 text-xs text-fg-muted"
|
||||
>
|
||||
<span>Agent's own report, not verified by archie:</span>
|
||||
<span>Agent's own report, not verified by Archie:</span>
|
||||
{{ [report.title, report.detail].filter(Boolean).join(" · ") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@ const confirmText = computed(
|
||||
const unavailable = computed(() => {
|
||||
if (run.canRetry || run.taskList === undefined) return "";
|
||||
return run.task
|
||||
? `New runs start from a parked task. This task is ${statusLabel(run.task.status ?? "")}.`
|
||||
? `Only a parked task can start a new run. This task is ${statusLabel(run.task.status ?? "")}.`
|
||||
: "";
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ const errorText = computed(() => {
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogAction @click="run.performRetry">
|
||||
<RefreshCw data-icon="inline-start" />
|
||||
New run</AlertDialogAction>
|
||||
Start run</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
|
||||
@@ -35,7 +35,7 @@ const copy = computed(() =>
|
||||
: {
|
||||
title: "Task not found",
|
||||
empty: `Nothing is recorded for task ${props.raw ?? ""}`,
|
||||
detail: "No such task.",
|
||||
detail: "",
|
||||
},
|
||||
);
|
||||
</script>
|
||||
@@ -52,7 +52,7 @@ const copy = computed(() =>
|
||||
<Empty>
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>{{ copy.empty }}</EmptyTitle>
|
||||
<EmptyDescription>{{ copy.detail }}</EmptyDescription>
|
||||
<EmptyDescription v-if="copy.detail">{{ copy.detail }}</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
</CardContent>
|
||||
|
||||
@@ -64,7 +64,7 @@ const run = provideTaskRun(taskId);
|
||||
</Tabs>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<TaskRail />
|
||||
<TaskRail class="order-first lg:order-none" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -57,10 +57,9 @@ function setStage(value: unknown): void {
|
||||
<div class="inline-flex items-center gap-2">
|
||||
<Select
|
||||
:model-value="levelValue"
|
||||
aria-label="Filter log entries by level"
|
||||
@update:model-value="setLevel"
|
||||
>
|
||||
<SelectTrigger size="sm">
|
||||
<SelectTrigger size="sm" aria-label="Filter log entries by level">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -80,10 +79,9 @@ function setStage(value: unknown): void {
|
||||
<div class="inline-flex items-center gap-2">
|
||||
<Select
|
||||
:model-value="stageValue"
|
||||
aria-label="Filter log entries by stage"
|
||||
@update:model-value="setStage"
|
||||
>
|
||||
<SelectTrigger size="sm">
|
||||
<SelectTrigger size="sm" aria-label="Filter log entries by stage">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
|
||||
@@ -6,7 +6,6 @@ import LogRow from "@/base/LogRow.vue";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Empty,
|
||||
EmptyDescription,
|
||||
EmptyHeader,
|
||||
EmptyTitle,
|
||||
} from "@/components/ui/empty";
|
||||
@@ -145,9 +144,7 @@ const view = computed(() => {
|
||||
status: "This attempt's log could not be loaded",
|
||||
};
|
||||
// A reader exists in this process but the attempt has no log file. That is a
|
||||
// fact about the attempt, and saying "logging was not enabled" here (which
|
||||
// this panel used to do) told the operator to go and change a setting that
|
||||
// was already correct.
|
||||
// fact about the attempt, not about the deployment.
|
||||
if (state.found === false && !state.disabled) {
|
||||
return {
|
||||
kind: "nolog" as const,
|
||||
@@ -226,8 +223,7 @@ watch([() => route.hash, current], async () => {
|
||||
v-else-if="view.kind === 'failed'"
|
||||
class="flex flex-col items-start gap-2 py-3"
|
||||
>
|
||||
<p class="text-sm text-fg-muted">Could not load this attempt's log. Live updates will try again when the
|
||||
daemon reconnects.</p>
|
||||
<p class="text-sm text-fg-muted">Could not load this attempt's log. Archie did not answer.</p>
|
||||
</div>
|
||||
|
||||
<Empty v-else-if="view.kind === 'nolog'">
|
||||
@@ -238,16 +234,13 @@ watch([() => route.hash, current], async () => {
|
||||
|
||||
<Empty v-else-if="view.kind === 'disabled'">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>No persisted log for this attempt</EmptyTitle>
|
||||
<EmptyDescription
|
||||
>No reader for this file.</EmptyDescription
|
||||
>
|
||||
<EmptyTitle>This dashboard cannot read task logs</EmptyTitle>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
<Empty v-else-if="view.kind === 'empty'">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>Nothing recorded</EmptyTitle>
|
||||
<EmptyTitle>No entries match the current filter</EmptyTitle>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const note = computed(() => {
|
||||
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 outside the recent-tasks list (the 100 most recently updated). Its recorded attempts are shown below.`;
|
||||
return `Task ${props.id} is not in the recent tasks list, so its status and operator controls are unavailable.`;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
@@ -157,7 +157,6 @@ function open() {
|
||||
<RouterLink
|
||||
class="inline-block min-w-40 hover:underline"
|
||||
:to="`/tasks/${props.task.id}`"
|
||||
title="Open the run detail for this task"
|
||||
@click.stop
|
||||
@keydown.stop
|
||||
>
|
||||
|
||||
@@ -361,8 +361,7 @@ function requestFromMenu(id: string) {
|
||||
<DialogContent class="sm:max-w-lg">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Re-review this pull request?</DialogTitle>
|
||||
<DialogDescription>Two re-reviews allowed; this is the
|
||||
{{ props.task.rereview_rounds ? "next" : "first" }}.</DialogDescription>
|
||||
<DialogDescription>{{ props.task.rereview_rounds ? "Second" : "First" }} of two allowed.</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div class="flex flex-col gap-2">
|
||||
<Label for="review-instructions"
|
||||
@@ -372,7 +371,6 @@ function requestFromMenu(id: string) {
|
||||
id="review-instructions"
|
||||
v-model="instructions"
|
||||
class="min-h-24"
|
||||
placeholder="e.g. check the migration ordering and the SQL path"
|
||||
:disabled="inFlight"
|
||||
/>
|
||||
</div>
|
||||
@@ -445,7 +443,7 @@ function requestFromMenu(id: string) {
|
||||
<AlertDialogDescription>{{ confirmText }}</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Keep it</AlertDialogCancel>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
:variant="variantFor(confirmingMeta?.kind ?? '')"
|
||||
@click="confirmingId && run(confirmingId)"
|
||||
|
||||
@@ -36,7 +36,7 @@ const run = useTaskRun();
|
||||
<PanelError
|
||||
v-else-if="run.attempts === null"
|
||||
title="Could not load this task's attempts"
|
||||
detail="The task's run history could not be read."
|
||||
detail="Archie did not answer."
|
||||
/>
|
||||
|
||||
<Empty v-else-if="run.attemptNumber == null">
|
||||
|
||||
@@ -26,20 +26,14 @@ const copy = computed(() => {
|
||||
if (props.kind === "error") {
|
||||
return {
|
||||
title: "Archie is not responding",
|
||||
description: props.detail || "Try again shortly.",
|
||||
description: props.detail || "",
|
||||
};
|
||||
}
|
||||
if (props.kind === "empty") {
|
||||
return {
|
||||
title: "No tasks yet",
|
||||
description: "Tasks appear here once a workflow starts one.",
|
||||
};
|
||||
return { title: "No tasks yet", description: "" };
|
||||
}
|
||||
if (props.kind === "no-match") {
|
||||
return {
|
||||
title: "No matching tasks",
|
||||
description: "Try a different search or status filter.",
|
||||
};
|
||||
return { title: "No matching tasks", description: "" };
|
||||
}
|
||||
return { title: "Loading tasks…", description: "" };
|
||||
});
|
||||
@@ -56,7 +50,7 @@ const copy = computed(() => {
|
||||
<Empty v-else>
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>{{ copy.title }}</EmptyTitle>
|
||||
<EmptyDescription>{{ copy.description }}</EmptyDescription>
|
||||
<EmptyDescription v-if="copy.description">{{ copy.description }}</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
<EmptyContent v-if="props.kind === 'no-match'">
|
||||
<Button variant="ghost" size="sm" @click="emit('clear')"
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// The status vocabulary the board filters by, as pure functions of the served
|
||||
// catalog. The catalog is an argument rather than a module-level import: it
|
||||
// arrives after the app boots, so anything that captured the freeze-dried
|
||||
// defaults at import or at setup kept them for the life of the page -- which
|
||||
// is how a shared link to a served-only status filtered nothing -- and there
|
||||
// is no way to test that capture without being able to replace the catalog.
|
||||
// A caller that passes the catalog from inside a `computed` re-derives when
|
||||
// defaults at import or at setup would keep them for the life of the page. A
|
||||
// caller that passes the catalog from inside a `computed` re-derives when
|
||||
// `/api/task-meta` lands.
|
||||
//
|
||||
// Only type imports, and only from "@/": `node --test` runs this file with
|
||||
@@ -40,12 +38,9 @@ export function initialTaskFilter(
|
||||
/**
|
||||
* boardStatus is the task board's status filter: what the control shows and
|
||||
* what the table filters by, for one query value and the catalog read at the
|
||||
* moment of the call. It exists as a named derivation so the page's only
|
||||
* remaining decision is where each argument comes from -- and the catalog has
|
||||
* to be read inside the `computed`, because a caller that evaluates
|
||||
* `statusList()` while the page sets up passes the freeze-dried defaults for
|
||||
* the life of the page, which is how a shared link to a served-only status
|
||||
* filtered nothing until a reload.
|
||||
* moment of the call. The catalog has to be read inside the `computed`, because
|
||||
* a caller that evaluates `statusList()` while the page sets up passes the
|
||||
* freeze-dried defaults for the life of the page.
|
||||
*/
|
||||
export function boardStatus(query: string, catalog: StatusMeta[]): string {
|
||||
return initialTaskFilter(query, catalog);
|
||||
|
||||
@@ -216,9 +216,9 @@ export const EMPTY_LOG_FILTERS: LogFilters = { level: "", stage: "" };
|
||||
|
||||
/**
|
||||
* The identity of a log read: a task, an attempt, and the filters that produced
|
||||
* the response. Keying by task alone cannot represent two attempts -- the bug
|
||||
* this replaces -- and keying without the filters would serve attempt 2's
|
||||
* unfiltered log in answer to a filtered request.
|
||||
* the response. Keying by task alone cannot represent two attempts, and keying
|
||||
* without the filters would serve attempt 2's unfiltered log in answer to a
|
||||
* filtered request.
|
||||
*/
|
||||
export function logCacheKey(
|
||||
id: number,
|
||||
|
||||
Reference in new issue
Block a user