feat(dashboard): tested badge on node cards (#113)

Render a small green dot next to the complexity badge whenever a node's
tags contain "tested" — surfacing the deterministic linker's signal so
users can see at a glance which files have paired tests.

Plumb node.tags through both CustomNodeData construction sites in
GraphView.tsx; KnowledgeGraphView.tsx already passes tags.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lum1104
2026-05-06 22:20:40 +08:00
Unverified
parent ba9eeab5bd
commit 6c257a55f0
2 changed files with 15 additions and 3 deletions
@@ -151,9 +151,19 @@ function CustomNodeComponent({
<span className={`text-[10px] font-semibold uppercase tracking-wider ${textColor}`}>
{data.nodeType}
</span>
<span className={`text-[9px] font-mono ${complexityColor}`}>
{data.complexity}
</span>
<div className="flex items-center gap-1.5">
<span className={`text-[9px] font-mono ${complexityColor}`}>
{data.complexity}
</span>
{data.tags?.includes("tested") && (
<span
className="inline-block w-1.5 h-1.5 rounded-full bg-node-function shadow-[0_0_4px_rgba(90,158,111,0.6)]"
role="img"
aria-label="Tested"
title="Has tests"
/>
)}
</div>
</div>
<div className="text-sm font-serif text-text-primary truncate" title={data.label}>
@@ -533,6 +533,7 @@ function useLayerDetailTopology(): LayerDetailTopology & {
nodeType: node.type,
summary: node.summary,
complexity: node.complexity,
tags: node.tags,
isHighlighted: false,
searchScore: undefined,
isSelected: false,
@@ -908,6 +909,7 @@ function buildCustomFlowNode(
nodeType: node.type,
summary: node.summary,
complexity: node.complexity,
tags: node.tags,
isHighlighted: false,
searchScore: undefined,
isSelected: false,