feat(dashboard): add new node/edge type support to NodeInfo sidebar

Add badge colors for 8 new node types (config, document, service,
table, endpoint, pipeline, schema, resource) and directional labels
for 8 new edge types (deploys, serves, migrates, documents, provisions,
routes, defines_schema, triggers).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lum1104
2026-03-28 18:46:11 +08:00
co-authored by Claude Opus 4.6
parent 07ac08248e
commit 6e3213e849
@@ -7,6 +7,14 @@ const typeBadgeColors: Record<string, string> = {
class: "text-node-class border border-node-class/30 bg-node-class/10",
module: "text-node-module border border-node-module/30 bg-node-module/10",
concept: "text-node-concept border border-node-concept/30 bg-node-concept/10",
config: "text-node-config border border-node-config/30 bg-node-config/10",
document: "text-node-document border border-node-document/30 bg-node-document/10",
service: "text-node-service border border-node-service/30 bg-node-service/10",
table: "text-node-table border border-node-table/30 bg-node-table/10",
endpoint: "text-node-endpoint border border-node-endpoint/30 bg-node-endpoint/10",
pipeline: "text-node-pipeline border border-node-pipeline/30 bg-node-pipeline/10",
schema: "text-node-schema border border-node-schema/30 bg-node-schema/10",
resource: "text-node-resource border border-node-resource/30 bg-node-resource/10",
};
const complexityBadgeColors: Record<string, string> = {
@@ -58,6 +66,22 @@ function getDirectionalLabel(edgeType: string, isSource: boolean): string {
return "related to";
case "similar_to":
return "similar to";
case "deploys":
return isSource ? "deploys" : "deployed by";
case "serves":
return isSource ? "serves" : "served by";
case "migrates":
return isSource ? "migrates" : "migrated by";
case "documents":
return isSource ? "documents" : "documented by";
case "provisions":
return isSource ? "provisions" : "provisioned by";
case "routes":
return isSource ? "routes to" : "routed from";
case "defines_schema":
return isSource ? "defines schema for" : "schema defined by";
case "triggers":
return isSource ? "triggers" : "triggered by";
default:
return isSource ? edgeType : `${edgeType} (reverse)`;
}