feat(dashboard): red-dot weak-point map on /defects (T7)

Overlay each filed defect as a red dot inside its section box with a
diagonal date label; cap visible dots and collapse the remainder to a
"+N more" using the authoritative per-section counts (T6).

Add an `overlay` scoped slot to BoardView (C2) so the dashboard can layer
dots without forking the board definition (F1); the reporting view leaves
it empty. DotMap groups the bounded feed by section and the /defects page
wires both endpoints.
This commit is contained in:
Julien Calixte
2026-05-28 00:31:17 +02:00
parent c6b991646a
commit 3e5f7d3643
5 changed files with 189 additions and 3 deletions

View File

@@ -1,6 +1,23 @@
<script setup lang="ts">
// Defect-viewing route (`/defects`) — the read-only board with the weak-point
// map and feed. Same domain as reporting (ADR 0004).
import { sections } from '~/board/definition'
interface DefectView {
id: string
sectionId: string
createdAt: string
}
// Fetch enough of the feed to fill every section's dot cap, plus the
// authoritative per-section totals that drive each "+N more" (T6).
const { data: defects } = await useFetch<DefectView[]>('/api/defects', {
query: { limit: sections.length * 12 },
default: () => [],
})
const { data: counts } = await useFetch<Record<string, number>>('/api/defects/counts', {
default: () => ({}),
})
</script>
<template>
@@ -10,8 +27,8 @@
<p class="opacity-70">Every defect filed on the board.</p>
</header>
<BoardView />
<DotMap :defects="defects" :counts="counts" />
<p class="opacity-60">The red-dot map (T7) and defect feed (T8) land next.</p>
<p class="opacity-60">The defect feed and verbatim modal (T8) land next.</p>
</main>
</template>