Files
archie/ui/src/tasks/AttemptConfig.vue
T
sam 94f79177a2
deploy / gate (push) Successful in 4m53s
Quality / check (push) Successful in 6m42s
deploy / archied-image (push) Successful in 3m20s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
fix(ui): adopt the type scale across components/ui and pages (#1758)
components/ui and the pages now use only the style.css scale:
text-[0.8rem]→text-label, text-[0.625rem]→text-micro, text-base/text-sm→
text-label (rows and controls), text-xs→text-caption (captions and
secondary text), text-lg/text-xl/text-2xl→text-title (panel and page
titles). Rendered markdown (ChatMarkdown/ChatInline/markdown.ts) keeps
Tailwind steps as the issue allows. 196 files, class-token swaps only.
2026-11-06 23:07:46 +11:00

63 lines
2.0 KiB
Vue

<script setup lang="ts">
import { computed } from "vue";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { configSchema } from "@/lib/task-meta";
import JsonBlock from "./JsonBlock.vue";
import PanelError from "./PanelError.vue";
import PanelLoading from "./PanelLoading.vue";
import { selectConfigEvent } from "./attempt-config";
import type { TaskEvent } from "./task-run";
/**
* The effective configuration one attempt ran under, taken from the task's own
* event stream. See attempt-config.ts for why this panel issues no request and
* why the selection is by kind AND attempt.
*/
const props = defineProps<{
events: TaskEvent[] | null | undefined;
attempt: number | null;
}>();
const event = computed(() => selectConfigEvent(props.events, props.attempt));
// An unrecognised schema is shown verbatim with a note rather than
// reinterpreted, so a server-side bump degrades to the raw view.
const schema = computed(() => {
const data = event.value?.data || {};
return typeof data.schema === "string" ? data.schema : "";
});
const document = computed(() => event.value?.data?.document ?? {});
const recognised = computed(() => schema.value === configSchema());
</script>
<template>
<PanelLoading
v-if="events === undefined"
label="Loading this task's events…"
/>
<PanelError
v-else-if="events === null"
title="Could not load this task's events"
detail="Archie did not answer."
/>
<Empty v-else-if="!event">
<EmptyHeader>
<EmptyTitle>No configuration captured</EmptyTitle>
</EmptyHeader>
</Empty>
<div v-else>
<div class="mb-3 text-caption 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-label text-warn">Unknown schema{{ schema ? ` (${schema})` : "" }}.</p>
<JsonBlock :value="event.data" />
</template>
</div>
</template>