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:
11 files changed
+39
-42
No files matched your search
@@ -15,7 +15,7 @@ const PROMPTS = ["Summarise active tasks", "Show running agents", "Check system
|
||||
<div class="w-full self-center justify-self-center py-6 text-center">
|
||||
<span
|
||||
aria-hidden="true"
|
||||
class="mx-auto mb-3 grid size-9 place-items-center rounded-xl border border-border-strong font-bold text-primary"
|
||||
class="mx-auto mb-3 grid size-9 place-items-center rounded-xl border border-border-strong font-bold text-link"
|
||||
>A</span
|
||||
>
|
||||
<h2 class="text-lg font-semibold tracking-[-0.02em]">What are we working on?</h2>
|
||||
|
||||
@@ -26,7 +26,7 @@ defineProps<{ inline: ChatInline[] }>();
|
||||
:href="span.href"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
class="text-primary underline-offset-4 hover:underline"
|
||||
class="text-link underline-offset-4 hover:underline"
|
||||
>{{ span.text }}</a
|
||||
>
|
||||
<em v-else-if="span.kind === 'em'">{{ span.text }}</em>
|
||||
|
||||
@@ -18,7 +18,7 @@ defineProps<{ path: string; label?: string }>();
|
||||
<RouterLink
|
||||
:to="path"
|
||||
:title="`Go to ${label || path}`"
|
||||
class="inline-flex max-w-full items-center gap-1.5 rounded-full border border-primary/45 bg-primary-soft px-2.5 py-1 text-xs font-semibold text-primary transition-colors hover:border-primary hover:bg-primary/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
|
||||
class="inline-flex max-w-full items-center gap-1.5 rounded-full border border-primary/45 bg-primary-soft px-2.5 py-1 text-xs font-semibold text-link transition-colors hover:border-primary hover:bg-primary/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
|
||||
>
|
||||
<ArrowUpRight aria-hidden="true" class="size-3.5 shrink-0" />
|
||||
<span class="truncate">{{ label || path }}</span>
|
||||
|
||||
@@ -9,7 +9,7 @@ withDefaults(defineProps<{ size?: number }>(), { size: 22 });
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
aria-hidden="true"
|
||||
class="text-primary shrink-0"
|
||||
class="text-link shrink-0"
|
||||
>
|
||||
<path d="M12 2.5 21 20h-4.1L12 10.6 7.1 20H3l9-17.5Z" fill="currentColor" />
|
||||
<path d="M8.6 16.2h6.8" stroke="var(--background)" stroke-width="1.6" stroke-linecap="round" />
|
||||
|
||||
@@ -11,7 +11,7 @@ defineProps<{
|
||||
<p
|
||||
data-slot="empty-description"
|
||||
:class="cn(
|
||||
'text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',
|
||||
'text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-link',
|
||||
$attrs.class ?? '',
|
||||
)"
|
||||
>
|
||||
|
||||
@@ -13,7 +13,7 @@ const props = defineProps<{
|
||||
:class="cn(
|
||||
'text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance',
|
||||
'last:mt-0 nth-last-2:-mt-1',
|
||||
'[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',
|
||||
'[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-link',
|
||||
props.class,
|
||||
)"
|
||||
>
|
||||
|
||||
@@ -40,7 +40,7 @@ function dismiss() {
|
||||
<CardTitle>Finish setting up</CardTitle>
|
||||
<CardDescription>Archie needs these before it can work on its own.</CardDescription>
|
||||
<CardAction>
|
||||
<span class="text-lg font-semibold text-primary">{{ pct }}%</span>
|
||||
<span class="text-lg font-semibold text-link">{{ pct }}%</span>
|
||||
</CardAction>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
|
||||
+12
-5
@@ -49,6 +49,7 @@
|
||||
--color-primary: var(--primary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-primary-soft: var(--primary-soft);
|
||||
--color-link: var(--link);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-muted: var(--muted);
|
||||
@@ -102,11 +103,16 @@
|
||||
--popover-foreground: #F0EAF7;
|
||||
--foreground: #F0EAF7;
|
||||
|
||||
/* Ink on the violet is 5.64:1; white on it is 4.02:1 and fails, so the
|
||||
button label is the canvas colour in both directions, never white. */
|
||||
--primary: #A76BF5;
|
||||
--primary-foreground: #0F0A16;
|
||||
--primary-soft: rgba(167, 107, 245, 0.16);
|
||||
/* The primary surface is a deep violet so its label can be white: the
|
||||
earlier bright violet with canvas-dark ink passed the ratio on paper and
|
||||
failed in the hand -- black on bright purple vibrates at small sizes.
|
||||
White on #7E56E6 is 4.81:1. Link text on the canvas is a separate token:
|
||||
one violet cannot be both a dark-enough surface and a light-enough text
|
||||
colour, so --link carries the light tint (#B691F7, 7.78:1 on canvas). */
|
||||
--primary: #7E56E6;
|
||||
--primary-foreground: #FFFFFF;
|
||||
--primary-soft: rgba(126, 86, 230, 0.16);
|
||||
--link: #B691F7;
|
||||
|
||||
/* shadcn's `accent` is the hover surface, not the brand colour. */
|
||||
--secondary: #271838;
|
||||
@@ -175,6 +181,7 @@
|
||||
--primary: #8B5FBF;
|
||||
--primary-foreground: #FFFFFF;
|
||||
--primary-soft: rgba(139, 95, 191, 0.12);
|
||||
--link: #7A4FB3;
|
||||
|
||||
--secondary: #E9D7F7;
|
||||
--secondary-foreground: #2E2A35;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
Reference in new issue
Block a user