app: centralize kind→icon in one KIND_ICONS map

Every surface hand-mapped deployment kind → lucide icon, so they could (and did) drift. Add KIND_ICONS/kindIcon to lib/labels beside kindLabel, and route KindBadge (→ all detail headers/cards/sections), the Overview tiles, and the program links through it.
This commit is contained in:
2026-07-07 17:13:52 -07:00
parent 96ffa8aae7
commit 26f6b1d43c
4 changed files with 36 additions and 9 deletions

View File

@@ -1,3 +1,24 @@
import type { LucideIcon } from "lucide-react"
import { Box, Clock, LayoutTemplate, Package, Server, Waypoints, Wrench } from "lucide-react"
// Canonical kind → icon — the single source of truth so the nav, Overview tiles,
// cards, the System map, and the command palette all speak one visual language.
// (Colors live in KindBadge; labels/descriptions are below.) `program` is the
// catalog pseudo-kind, not a deployment kind — the same Package glyph the
// Programs nav entry and Overview tile use.
export const KIND_ICONS: Record<string, LucideIcon> = {
service: Server,
job: Clock,
tool: Wrench,
static: LayoutTemplate,
reference: Waypoints,
program: Package,
}
export function kindIcon(kind: string): LucideIcon {
return KIND_ICONS[kind] ?? Box
}
export const LAUNCHER_LABELS: Record<string, string> = {
python: "Python",
command: "Command",