fix(webui): deepen the primary violet and give links their own tint

The bright violet passed the contrast ratio on paper and failed in the
hand: black-on-purple vibrated at button and FAB sizes. The primary surface
is now deep enough for white labels, and link text on the canvas uses a
dedicated lighter tint, since one violet cannot be both a dark-enough
surface and a light-enough text colour. Also drops an empty-state
description that restated its title.
This commit is contained in:
sam committed 2026-09-21 00:10:10 +10:00
1 parent a855573b12
commit 799a7a8249
11 files changed
+39 -42

No files matched your search

+2 -2
View File
@@ -28,7 +28,7 @@ const prNumber = computed(() => props.capture.pr_number);
</div>
<div class="mt-2 mb-3 flex flex-wrap items-center gap-3 text-xs text-fg-muted">
<span class="font-mono">
<a v-if="links.repo" class="text-primary hover:underline" :href="links.repo" target="_blank" rel="noreferrer">
<a v-if="links.repo" class="text-link hover:underline" :href="links.repo" target="_blank" rel="noreferrer">
{{ capture.owner }}/{{ capture.repo }}
</a>
<template v-else>{{ capture.owner || "" }}/{{ capture.repo || "" }}</template>
@@ -38,7 +38,7 @@ const prNumber = computed(() => props.capture.pr_number);
</span>
<span v-if="capture.head_sha" class="font-mono">{{ String(capture.head_sha).slice(0, 8) }}</span>
<template v-if="prNumber">
<a v-if="links.pr" class="text-primary hover:underline" :href="links.pr" target="_blank" rel="noreferrer">
<a v-if="links.pr" class="text-link hover:underline" :href="links.pr" target="_blank" rel="noreferrer">
PR #{{ prNumber }}
</a>
<span v-else class="font-mono">PR #{{ prNumber }}</span>
+2 -7
View File
@@ -60,18 +60,13 @@ const startedAt = computed(() => {
<Empty v-if="!attempts.length">
<EmptyHeader>
<EmptyTitle>No attempts recorded</EmptyTitle>
<EmptyDescription>
This task has no recorded run. An attempt is written when a stage event is emitted, and none exist here.
</EmptyDescription>
</EmptyHeader>
</Empty>
<Empty v-else-if="!attempt">
<EmptyHeader>
<EmptyTitle>Attempt {{ run.attemptNumber }} is not recorded for this task</EmptyTitle>
<EmptyDescription>
This task recorded attempt {{ attempts.map((a) => a.attempt).join(", ") }}.
</EmptyDescription>
<EmptyTitle>Attempt {{ run.attemptNumber }} is not recorded</EmptyTitle>
<EmptyDescription>This task recorded attempt {{ attempts.map((a) => a.attempt).join(", ") }}.</EmptyDescription>
</EmptyHeader>
</Empty>
+16 -21
View File
@@ -8,9 +8,9 @@ import { statusKind, statusLabel } from "@/lib/task-meta";
import { useTaskRun } from "./use-task-run";
/**
* The task's lifecycle status, the attempt this page is showing, and the forge
* coordinates. All three come from reads the page already holds, so the bar
* costs no request of its own.
* One meta line under the title: lifecycle status, the attempt on screen, and
* the forge coordinates. 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
* a list of the 100 most recently updated, so a task outside it is a fact
@@ -24,28 +24,23 @@ const taskKind = computed<StatusKind>(() => statusKind(run.task?.status ?? "") a
const taskStatusLabel = computed(() => statusLabel(run.task?.status ?? ""));
const attemptText = computed(() => {
if (run.attempts === null) return "run history unreadable";
if (run.attempts === undefined) return "loading…";
if (run.attemptNumber == null) return "none recorded";
if (run.attempts === null) return "";
if (run.attempts === undefined) return "";
if (run.attemptNumber == null) return "";
return `attempt ${run.attemptNumber} of ${run.currentAttempt ?? run.attemptNumber}`;
});
</script>
<template>
<div class="-mt-2 mb-4 flex flex-wrap items-center gap-4 text-sm">
<span class="inline-flex items-center gap-2">
<span class="text-xs tracking-[0.05em] text-fg-muted uppercase">Task status</span>
<span v-if="run.taskList === undefined" class="text-fg-muted">loading…</span>
<Badge v-else-if="run.task" :variant="taskKind">{{ taskStatusLabel }}</Badge>
<span v-else class="text-fg-muted">not read</span>
</span>
<span class="inline-flex items-center gap-2">
<span class="text-xs tracking-[0.05em] text-fg-muted uppercase">Attempt</span>
<span>{{ attemptText }}</span>
</span>
<div class="mb-4 flex flex-wrap items-center gap-3 text-sm">
<span v-if="run.taskList === undefined" class="text-fg-muted">loading…</span>
<template v-else-if="run.task">
<Badge :variant="taskKind">{{ taskStatusLabel }}</Badge>
</template>
<span v-if="attemptText" class="text-fg-muted">{{ attemptText }}</span>
<a
v-if="run.task?.repo_url"
class="text-primary hover:underline"
class="text-link hover:underline"
:href="run.task.repo_url"
target="_blank"
rel="noreferrer"
@@ -54,7 +49,7 @@ const attemptText = computed(() => {
</a>
<a
v-if="run.task?.issue_url && run.task?.issue_number"
class="text-primary hover:underline"
class="text-link hover:underline"
:href="run.task.issue_url"
target="_blank"
rel="noreferrer"
@@ -63,7 +58,7 @@ const attemptText = computed(() => {
</a>
<a
v-if="run.task?.pr_url && run.task?.pr_number"
class="text-primary hover:underline"
class="text-link hover:underline"
:href="run.task.pr_url"
target="_blank"
rel="noreferrer"
@@ -71,4 +66,4 @@ const attemptText = computed(() => {
PR #{{ run.task.pr_number }}
</a>
</div>
</template>
</template>