fix(ui): frame the task page's attempts, stages, details and inputs, and fit the run tabs on a phone
This commit is contained in:
1 parent
30105666e2
commit
580108dd7f
6 files changed
+82
-81
No files matched your search
@@ -120,7 +120,7 @@ const startedAt = computed(() => {
|
||||
</Empty>
|
||||
|
||||
<div v-else>
|
||||
<div class="mb-4 flex flex-wrap items-center gap-3">
|
||||
<div class="flex flex-wrap items-center gap-3" :class="stages.length || attempt.error ? 'mb-4' : undefined">
|
||||
<Badge :variant="meta.kind">{{ meta.label }}</Badge>
|
||||
<span class="text-xs text-fg-muted">{{ startedAt }}</span>
|
||||
<span v-if="timeLimit" class="text-xs text-fg-muted">{{
|
||||
|
||||
@@ -23,7 +23,7 @@ import { RUN_TABS } from "./task-run";
|
||||
v-for="tab in RUN_TABS"
|
||||
:key="tab.id"
|
||||
:value="tab.id"
|
||||
class="flex-none px-3"
|
||||
class="flex-none px-2"
|
||||
>{{
|
||||
tab.label
|
||||
}}</TabsTrigger>
|
||||
|
||||
@@ -147,7 +147,7 @@ const headerActions = computed(() =>
|
||||
|
||||
<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"
|
||||
class="mt-3 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 rounded-xl bg-card px-4 py-3 text-xs ring-1 ring-foreground/10"
|
||||
>
|
||||
<template v-if="run.attempts?.called_by">
|
||||
<dt class="text-fg-subtle">Called by</dt>
|
||||
|
||||
@@ -16,12 +16,13 @@ const run = useTaskRun();
|
||||
|
||||
const attempts = computed(() => [...(run.attempts?.attempts ?? [])].reverse());
|
||||
const dot = (status?: string) => STATUS_FILL[stageStatusMeta(status).kind];
|
||||
const panel = "rounded-xl bg-card p-4 ring-1 ring-foreground/10";
|
||||
const heading = "mb-2 text-[11px] font-medium tracking-[0.06em] text-fg-subtle uppercase";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside class="grid gap-6" aria-label="Task details">
|
||||
<section v-if="attempts.length" aria-labelledby="rail-attempts">
|
||||
<aside class="grid gap-4" aria-label="Task details">
|
||||
<section v-if="attempts.length" :class="panel" aria-labelledby="rail-attempts">
|
||||
<h2 id="rail-attempts" :class="heading">Attempts</h2>
|
||||
<ul class="flex flex-col gap-0.5">
|
||||
<li v-for="a in attempts" :key="a.attempt">
|
||||
@@ -47,12 +48,12 @@ const heading = "mb-2 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="rail-stages">
|
||||
<section :class="panel" aria-labelledby="rail-stages">
|
||||
<h2 id="rail-stages" :class="heading">Stages</h2>
|
||||
<StageRail :state="run.attempts" />
|
||||
</section>
|
||||
|
||||
<section v-if="run.task" aria-labelledby="rail-details">
|
||||
<section v-if="run.task" :class="panel" aria-labelledby="rail-details">
|
||||
<h2 id="rail-details" :class="heading">Details</h2>
|
||||
<dl class="grid grid-cols-[6.5rem_1fr] gap-x-3 gap-y-2 text-sm">
|
||||
<dt class="text-fg-subtle">Workflow</dt>
|
||||
|
||||
@@ -28,8 +28,8 @@ export interface TaskRunTab {
|
||||
*/
|
||||
export const RUN_TABS: TaskRunTab[] = [
|
||||
{ id: "log", label: "Log" },
|
||||
{ id: "changes", label: "Changed files" },
|
||||
{ id: "config", label: "Configuration" },
|
||||
{ id: "changes", label: "Changes" },
|
||||
{ id: "config", label: "Config" },
|
||||
{ id: "debug", label: "Debug" },
|
||||
{ id: "sandbox", label: "Sandbox" },
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user