mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user