From a0b54ff6a327783d64f98be563d58177cb8f48d0 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 27 Aug 2026 18:43:45 -0400 Subject: [PATCH] =?UTF-8?q?feat(ui):=20task=20rows=20show=20their=20kind?= =?UTF-8?q?=20=E2=80=94=20a=20badge=20for=20issue=20and=20spike=20(#3124)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit task_kind was only visible inside the task editor's Kind select, so every list surface rendered work, issue and spike identically and a list of tasks hid the fact that three different things were in it. ONE component, not a fifth spelling. The badge layer had already drifted — StatusBadge.vue is the recorded canon (#2960) but WorkspaceTaskPanel, ProjectView and KnowledgeView each carry their own scoped `.status-badge`. KindBadge is modelled on PriorityBadge, its closest sibling, which already does the thing that matters here: the DEFAULT value renders nothing. `work` is most tasks, so badging it would put a chip on nearly every row and say nothing — the same reason RuleListPane marks only `conditional`. COLOUR BY TEMPERATURE, measured rather than eyeballed. Issue and spike are opposite in character — corrective vs exploratory — so they split warm (warning) against cool (info), which survives being small and stays distinguishable without reading the word. Neither uses the accent; kind is not one of the places it is allowed. The raw semantic colour FAILS the contrast floor on the dark palette: warning on its own 12% tint measures 2.97:1 against AA's 4.5. So the text is the hue mixed toward --fs-text-primary, which passes and, because that token inverts by mode, follows light/dark for free. Measured both ways — issue 5.23:1 dark / 6.68:1 light, spike 5.33:1 / 9.26:1. `plan` renders hue-free and italic: retired since 0066, so a legacy row should read as archival rather than as a fourth kind competing for attention. In KnowledgeView it is passed as null instead, because the type badge beside it already says "Plan" and two chips reading the same word would look like two facts. Weight is 500, not the 600 the two older badges use — the house style allows 400 and 500 only, and copying 600 would spread it. SERVER FIX, without which this was decorative: dashboard's `_task_row` omitted task_kind entirely. The badge would have rendered nothing there while working everywhere else, which reads as "this list has no issues" rather than as a missing field. The guard is on the payload, where the omission was. Surfaces: ProjectView's three status columns, WorkspaceTaskPanel's two task lists, DashboardView's milestone and no-milestone rows, KnowledgeView's result rows. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/components/KindBadge.vue | 79 +++++++++++++++++++ .../src/components/WorkspaceTaskPanel.vue | 5 ++ frontend/src/views/DashboardView.vue | 6 +- frontend/src/views/KnowledgeView.vue | 10 ++- frontend/src/views/ProjectView.vue | 6 ++ src/scribe/services/dashboard.py | 7 +- tests/test_services_dashboard.py | 25 +++++- 7 files changed, 134 insertions(+), 4 deletions(-) create mode 100644 frontend/src/components/KindBadge.vue diff --git a/frontend/src/components/KindBadge.vue b/frontend/src/components/KindBadge.vue new file mode 100644 index 0000000..3622a96 --- /dev/null +++ b/frontend/src/components/KindBadge.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/frontend/src/components/WorkspaceTaskPanel.vue b/frontend/src/components/WorkspaceTaskPanel.vue index 09ad42e..982a5cc 100644 --- a/frontend/src/components/WorkspaceTaskPanel.vue +++ b/frontend/src/components/WorkspaceTaskPanel.vue @@ -4,6 +4,8 @@ import { RouterLink } from "vue-router"; import { apiGet, apiPatch, apiPost, apiDelete } from "@/api/client"; import { useToastStore } from "@/stores/toast"; import TaskLogSection from "@/components/TaskLogSection.vue"; +import KindBadge from "@/components/KindBadge.vue"; +import type { TaskKind } from "@/types/note"; import { renderMarkdown } from "@/utils/markdown"; import { Trash2, X } from "lucide-vue-next"; import { relativeTimeOrDate } from "@/composables/useRelativeTime"; @@ -28,6 +30,7 @@ interface Task { due_date: string | null; updated_at: string; body?: string; + task_kind?: TaskKind; } const tasks = ref([]); @@ -242,6 +245,7 @@ defineExpose({ reload: loadAll }); {{ task.title }} + {{ task.due_date }} {{ relativeTimeOrDate(task.updated_at) }} @@ -267,6 +271,7 @@ defineExpose({ reload: loadAll }); {{ task.title }} + {{ task.due_date }} {{ relativeTimeOrDate(task.updated_at) }} diff --git a/frontend/src/views/DashboardView.vue b/frontend/src/views/DashboardView.vue index 5ee73e8..da19833 100644 --- a/frontend/src/views/DashboardView.vue +++ b/frontend/src/views/DashboardView.vue @@ -1,9 +1,11 @@