chore(graphify): knowledge graph of the repo (1398 nodes, 1627 edges)

Generated via /graphify over the full tree (177 files, ~320k words).
Produces graph.html, graph.json, GRAPH_REPORT.md plus per-file
extraction cache so incremental --update runs reuse prior results.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
oierandClaude Opus 4.7 committed 2026-04-21 16:25:53 +02:00
1 parent 6bc7092ce5
commit b660ead40d
190 files changed
+37288

No files matched your search

+257
View File
@@ -0,0 +1,257 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>graphify - graphify-out/graph.html</title>
<script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0f0f1a; color: #e0e0e0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; display: flex; height: 100vh; overflow: hidden; }
#graph { flex: 1; }
#sidebar { width: 280px; background: #1a1a2e; border-left: 1px solid #2a2a4e; display: flex; flex-direction: column; overflow: hidden; }
#search-wrap { padding: 12px; border-bottom: 1px solid #2a2a4e; }
#search { width: 100%; background: #0f0f1a; border: 1px solid #3a3a5e; color: #e0e0e0; padding: 7px 10px; border-radius: 6px; font-size: 13px; outline: none; }
#search:focus { border-color: #4E79A7; }
#search-results { max-height: 140px; overflow-y: auto; padding: 4px 12px; border-bottom: 1px solid #2a2a4e; display: none; }
.search-item { padding: 4px 6px; cursor: pointer; border-radius: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item:hover { background: #2a2a4e; }
#info-panel { padding: 14px; border-bottom: 1px solid #2a2a4e; min-height: 140px; }
#info-panel h3 { font-size: 13px; color: #aaa; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
#info-content { font-size: 13px; color: #ccc; line-height: 1.6; }
#info-content .field { margin-bottom: 5px; }
#info-content .field b { color: #e0e0e0; }
#info-content .empty { color: #555; font-style: italic; }
.neighbor-link { display: block; padding: 2px 6px; margin: 2px 0; border-radius: 3px; cursor: pointer; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid #333; }
.neighbor-link:hover { background: #2a2a4e; }
#neighbors-list { max-height: 160px; overflow-y: auto; margin-top: 4px; }
#legend-wrap { flex: 1; overflow-y: auto; padding: 12px; }
#legend-wrap h3 { font-size: 13px; color: #aaa; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.legend-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; border-radius: 4px; font-size: 12px; }
.legend-item:hover { background: #2a2a4e; padding-left: 4px; }
.legend-item.dimmed { opacity: 0.35; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.legend-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-count { color: #666; font-size: 11px; }
#stats { padding: 10px 14px; border-top: 1px solid #2a2a4e; font-size: 11px; color: #555; }
</style>
</head>
<body>
<div id="graph"></div>
<div id="sidebar">
<div id="search-wrap">
<input id="search" type="text" placeholder="Search nodes..." autocomplete="off">
<div id="search-results"></div>
</div>
<div id="info-panel">
<h3>Node Info</h3>
<div id="info-content"><span class="empty">Click a node to inspect it</span></div>
</div>
<div id="legend-wrap">
<h3>Communities</h3>
<div id="legend"></div>
</div>
<div id="stats">1398 nodes &middot; 1627 edges &middot; 200 communities</div>
</div>
<script>
const RAW_NODES = [{"id": "apps_web_postcss_config_js", "label": "postcss.config.js", "color": {"background": "#9C755F", "border": "#9C755F", "highlight": {"background": "#ffffff", "border": "#9C755F"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "postcss.config.js", "community": 98, "community_name": "postcss.config (postcss.config.js)", "source_file": "apps/web/postcss.config.js", "file_type": "code", "degree": 0}, {"id": "apps_web_vitest_setup_ts", "label": "vitest.setup.ts", "color": {"background": "#BAB0AC", "border": "#BAB0AC", "highlight": {"background": "#ffffff", "border": "#BAB0AC"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "vitest.setup.ts", "community": 99, "community_name": "vitest.setup (vitest.setup.ts)", "source_file": "apps/web/vitest.setup.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_playwright_config_ts", "label": "playwright.config.ts", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "playwright.config.ts", "community": 100, "community_name": "playwright.config (playwright.config.ts)", "source_file": "apps/web/playwright.config.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_tailwind_config_ts", "label": "tailwind.config.ts", "color": {"background": "#F28E2B", "border": "#F28E2B", "highlight": {"background": "#ffffff", "border": "#F28E2B"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "tailwind.config.ts", "community": 101, "community_name": "tailwind.config (tailwind.config.ts)", "source_file": "apps/web/tailwind.config.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_vite_config_ts", "label": "vite.config.ts", "color": {"background": "#E15759", "border": "#E15759", "highlight": {"background": "#ffffff", "border": "#E15759"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "vite.config.ts", "community": 102, "community_name": "vite.config (vite.config.ts)", "source_file": "apps/web/vite.config.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_svelte_config_js", "label": "svelte.config.js", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "svelte.config.js", "community": 103, "community_name": "svelte.config (svelte.config.js)", "source_file": "apps/web/svelte.config.js", "file_type": "code", "degree": 0}, {"id": "apps_web_vitest_config_ts", "label": "vitest.config.ts", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "vitest.config.ts", "community": 104, "community_name": "vitest.config (vitest.config.ts)", "source_file": "apps/web/vitest.config.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_src_app_d_ts", "label": "app.d.ts", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "app.d.ts", "community": 105, "community_name": "app.d (app.d.ts)", "source_file": "apps/web/src/app.d.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_src_sw_ts", "label": "sw.ts", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "sw.ts", "community": 106, "community_name": "sw (sw.ts)", "source_file": "apps/web/src/sw.ts", "file_type": "code", "degree": 0}, {"id": "apps_web_src_lib_auth_ts", "label": "auth.ts", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "auth.ts", "community": 4, "community_name": "Frontend Svelte Stores", "source_file": "apps/web/src/lib/auth.ts", "file_type": "code", "degree": 2}, {"id": "auth_login", "label": "login()", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "login()", "community": 4, "community_name": "Frontend Svelte Stores", "source_file": "apps/web/src/lib/auth.ts", "file_type": "code", "degree": 2}, {"id": "auth_logout", "label": "logout()", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "logout()", "community": 4, "community_name": "Frontend Svelte Stores", "source_file": "apps/web/src/lib/auth.ts", "file_type": "code", "degree": 2}, {"id": "apps_web_src_lib_supabase_ts", "label": "supabase.ts", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "boLine truncated
const RAW_EDGES = [{"from": "apps_web_src_lib_auth_ts", "to": "auth_login", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "apps_web_src_lib_auth_ts", "to": "auth_logout", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "auth_login", "to": "supabase_getsupabase", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "auth_logout", "to": "supabase_getsupabase", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "apps_web_src_lib_supabase_ts", "to": "supabase_passthroughlock", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "apps_web_src_lib_supabase_ts", "to": "supabase_getsupabase", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "supabase_getsupabase", "to": "realtimesync_subscribetolist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_loadnotes", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_loadarchivednotes", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_loadtrashednotes", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_loadnote", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_createnote", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_patchnote", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_permanentdeletenote", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "notes_duplicatenote", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "search_runsearch", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_loadlists", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_loadtrashedlists", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_createlist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_renamelist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_softdeletelist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_restorelist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_permanentdeletelist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_archivelist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_completelist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "supabase_getsupabase", "to": "lists_resetlist", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": Line truncated
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "Paraglide Runtime Messages", "count": 186}, {"cid": 1, "color": "#F28E2B", "label": "English Translations", "count": 185}, {"cid": 2, "color": "#E15759", "label": "Spanish Translations", "count": 185}, {"cid": 3, "color": "#76B7B2", "label": "PWA Service Worker (Workbox)", "count": 106}, {"cid": 4, "color": "#59A14F", "label": "Frontend Svelte Stores", "count": 78}, {"cid": 5, "color": "#EDC948", "label": "Deploy + Infra Decisions", "count": 58}, {"cid": 6, "color": "#B07AA1", "label": "Playwright E2E Tests", "count": 41}, {"cid": 7, "color": "#FF9DA7", "label": "Functional Domain Entities", "count": 39}, {"cid": 8, "color": "#9C755F", "label": "Auth Architecture + Gotchas", "count": 36}, {"cid": 9, "color": "#BAB0AC", "label": "Integration Test Helpers", "count": 29}, {"cid": 10, "color": "#4E79A7", "label": "Offline Sync Queue", "count": 19}, {"cid": 11, "color": "#F28E2B", "label": "Add-Item UX (mock)", "count": 12}, {"cid": 12, "color": "#E15759", "label": "Shopping Session Card UX", "count": 10}, {"cid": 13, "color": "#76B7B2", "label": "Task List UX (priorities)", "count": 10}, {"cid": 14, "color": "#59A14F", "label": "Left Sidebar Navigation", "count": 9}, {"cid": 15, "color": "#EDC948", "label": "Lists Dashboard UX", "count": 9}, {"cid": 16, "color": "#B07AA1", "label": "Grocery Qty-Stepper UX", "count": 8}, {"cid": 17, "color": "#FF9DA7", "label": "Search Results UX", "count": 8}, {"cid": 18, "color": "#9C755F", "label": "Active Shopping Item List", "count": 7}, {"cid": 19, "color": "#BAB0AC", "label": "Notes Quick-Capture UX", "count": 7}, {"cid": 20, "color": "#4E79A7", "label": "Lists Card Grid UX", "count": 7}, {"cid": 21, "color": "#F28E2B", "label": "Undo Queue", "count": 6}, {"cid": 22, "color": "#E15759", "label": "User Settings Screens", "count": 6}, {"cid": 23, "color": "#76B7B2", "label": "Task Subtasks UX", "count": 6}, {"cid": 24, "color": "#59A14F", "label": "Notes Grid UX", "count": 6}, {"cid": 25, "color": "#EDC948", "label": "Shopping Session Mobile UX", "count": 6}, {"cid": 26, "color": "#B07AA1", "label": "Session Item Row UX", "count": 6}, {"cid": 27, "color": "#FF9DA7", "label": "Grocery CRUD Row UX", "count": 6}, {"cid": 28, "color": "#9C755F", "label": "Notes Mobile UX", "count": 6}, {"cid": 29, "color": "#BAB0AC", "label": "Paraglide Tag Switching", "count": 5}, {"cid": 30, "color": "#4E79A7", "label": "Collective + Membership Entities", "count": 5}, {"cid": 31, "color": "#F28E2B", "label": "PWA Icon Assets", "count": 5}, {"cid": 32, "color": "#E15759", "label": "Shopping Budget Insight UX", "count": 5}, {"cid": 33, "color": "#76B7B2", "label": "User Settings Form UX", "count": 5}, {"cid": 34, "color": "#59A14F", "label": "Simplified Grocery UX", "count": 5}, {"cid": 35, "color": "#EDC948", "label": "Lists Sidebar Nav UX", "count": 5}, {"cid": 36, "color": "#B07AA1", "label": "Sync Strategy + Realtime", "count": 5}, {"cid": 37, "color": "#FF9DA7", "label": "Domain Roles + Business Rules", "count": 5}, {"cid": 38, "color": "#9C755F", "label": "iOS PWA Meta + Caveats", "count": 4}, {"cid": 39, "color": "#BAB0AC", "label": "Offline-First Strategy", "count": 4}, {"cid": 40, "color": "#4E79A7", "label": "Avatar Emoji Picker UX", "count": 4}, {"cid": 41, "color": "#F28E2B", "label": "Task Priority Badges UX", "count": 4}, {"cid": 42, "color": "#E15759", "label": "Settings Avatar Tabs UX", "count": 4}, {"cid": 43, "color": "#76B7B2", "label": "Mobile Grocery Header", "count": 4}, {"cid": 44, "color": "#59A14F", "label": "Quick-Add Chip Row UX", "count": 4}, {"cid": 45, "color": "#EDC948", "label": "Search Page Chrome", "count": 4}, {"cid": 46, "color": "#B07AA1", "label": "List Detail Svelte Page", "count": 3}, {"cid": 47, "color": "#FF9DA7", "label": "Dev Service Worker", "count": 3}, {"cid": 48, "color": "#9C755F", "label": "Search Result Cards UX", "count": 3}, {"cid": 49, "color": "#BAB0AC", "label": "Settings Language + Danger Zone", "count": 3}, {"cid": 50, "color": "#4E79A7", "label": "Tasks Page Sidebar UX", "count": 3}, {"cid": 51, "color": "#F28E2B", "label": "Add Item Input UX", "count": 3}, {"cid": 52, "color": "#E15759", "label": "Shopping Session Header", "count": 3}, {"cid": 53, "color": "#76B7B2", "label": "Inventory List Header", "count": 3}, {"cid": 54, "color": "#59A14F", "label": "Monolith Editorial Sidebar", "count": 3}, {"cid": 55, "color": "#EDC948", "label": "Grocery List Header UX", "count": 3}, {"cid": 56, "color": "#B07AA1", "label": "Colectivo Brand Sidebar", "count": 3}, {"cid": 57, "color": "#FF9DA7", "label": "Tasks Side Panel UX", "count": 3}, {"cid": 58, "color": "#9C755F", "label": "Note Capture Input UX", "count": 3}, {"cid": 59, "color": "#BAB0AC", "label": "Monolith Mobile Header", "count": 3}, {"cid": 60, "color": "#4E79A7", "label": "screen (Create button (primary dark))", "count": 3}, {"cid": 61, "color": "#F28E2B", "label": "CLAUDE (Gotcha: colectivo-web is confidential cl)", "count":Line truncated
// HTML-escape helper — prevents XSS when injecting graph data into innerHTML
function esc(s) {
return String(s).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#39;');
}
// Build vis datasets
const nodesDS = new vis.DataSet(RAW_NODES.map(n => ({
id: n.id, label: n.label, color: n.color, size: n.size,
font: n.font, title: n.title,
_community: n.community, _community_name: n.community_name,
_source_file: n.source_file, _file_type: n.file_type, _degree: n.degree,
})));
const edgesDS = new vis.DataSet(RAW_EDGES.map((e, i) => ({
id: i, from: e.from, to: e.to,
label: '',
title: e.title,
dashes: e.dashes,
width: e.width,
color: e.color,
arrows: { to: { enabled: true, scaleFactor: 0.5 } },
})));
const container = document.getElementById('graph');
const network = new vis.Network(container, { nodes: nodesDS, edges: edgesDS }, {
physics: {
enabled: true,
solver: 'forceAtlas2Based',
forceAtlas2Based: {
gravitationalConstant: -60,
centralGravity: 0.005,
springLength: 120,
springConstant: 0.08,
damping: 0.4,
avoidOverlap: 0.8,
},
stabilization: { iterations: 200, fit: true },
},
interaction: {
hover: true,
tooltipDelay: 100,
hideEdgesOnDrag: true,
navigationButtons: false,
keyboard: false,
},
nodes: { shape: 'dot', borderWidth: 1.5 },
edges: { smooth: { type: 'continuous', roundness: 0.2 }, selectionWidth: 3 },
});
network.once('stabilizationIterationsDone', () => {
network.setOptions({ physics: { enabled: false } });
});
function showInfo(nodeId) {
const n = nodesDS.get(nodeId);
if (!n) return;
const neighborIds = network.getConnectedNodes(nodeId);
const neighborItems = neighborIds.map(nid => {
const nb = nodesDS.get(nid);
const color = nb ? nb.color.background : '#555';
return `<span class="neighbor-link" style="border-left-color:${esc(color)}" onclick="focusNode(${JSON.stringify(nid)})">${esc(nb ? nb.label : nid)}</span>`;
}).join('');
document.getElementById('info-content').innerHTML = `
<div class="field"><b>${esc(n.label)}</b></div>
<div class="field">Type: ${esc(n._file_type || 'unknown')}</div>
<div class="field">Community: ${esc(n._community_name)}</div>
<div class="field">Source: ${esc(n._source_file || '-')}</div>
<div class="field">Degree: ${n._degree}</div>
${neighborIds.length ? `<div class="field" style="margin-top:8px;color:#aaa;font-size:11px">Neighbors (${neighborIds.length})</div><div id="neighbors-list">${neighborItems}</div>` : ''}
`;
}
function focusNode(nodeId) {
network.focus(nodeId, { scale: 1.4, animation: true });
network.selectNodes([nodeId]);
showInfo(nodeId);
}
// Track hovered node — hover detection is more reliable than click params
let hoveredNodeId = null;
network.on('hoverNode', params => {
hoveredNodeId = params.node;
container.style.cursor = 'pointer';
});
network.on('blurNode', () => {
hoveredNodeId = null;
container.style.cursor = 'default';
});
container.addEventListener('click', () => {
if (hoveredNodeId !== null) {
showInfo(hoveredNodeId);
network.selectNodes([hoveredNodeId]);
}
});
network.on('click', params => {
if (params.nodes.length > 0) {
showInfo(params.nodes[0]);
} else if (hoveredNodeId === null) {
document.getElementById('info-content').innerHTML = '<span class="empty">Click a node to inspect it</span>';
}
});
const searchInput = document.getElementById('search');
const searchResults = document.getElementById('search-results');
searchInput.addEventListener('input', () => {
const q = searchInput.value.toLowerCase().trim();
searchResults.innerHTML = '';
if (!q) { searchResults.style.display = 'none'; return; }
const matches = RAW_NODES.filter(n => n.label.toLowerCase().includes(q)).slice(0, 20);
if (!matches.length) { searchResults.style.display = 'none'; return; }
searchResults.style.display = 'block';
matches.forEach(n => {
const el = document.createElement('div');
el.className = 'search-item';
el.textContent = n.label;
el.style.borderLeft = `3px solid ${n.color.background}`;
el.style.paddingLeft = '8px';
el.onclick = () => {
network.focus(n.id, { scale: 1.5, animation: true });
network.selectNodes([n.id]);
showInfo(n.id);
searchResults.style.display = 'none';
searchInput.value = '';
};
searchResults.appendChild(el);
});
});
document.addEventListener('click', e => {
if (!searchResults.contains(e.target) && e.target !== searchInput)
searchResults.style.display = 'none';
});
const hiddenCommunities = new Set();
const legendEl = document.getElementById('legend');
LEGEND.forEach(c => {
const item = document.createElement('div');
item.className = 'legend-item';
item.innerHTML = `<div class="legend-dot" style="background:${c.color}"></div>
<span class="legend-label">${c.label}</span>
<span class="legend-count">${c.count}</span>`;
item.onclick = () => {
if (hiddenCommunities.has(c.cid)) {
hiddenCommunities.delete(c.cid);
item.classList.remove('dimmed');
} else {
hiddenCommunities.add(c.cid);
item.classList.add('dimmed');
}
const updates = RAW_NODES
.filter(n => n.community === c.cid)
.map(n => ({ id: n.id, hidden: hiddenCommunities.has(c.cid) }));
nodesDS.update(updates);
};
legendEl.appendChild(item);
});
</script>
<script>
// Render hyperedges as shaded regions
const hyperedges = [{"id": "shopping_mode_stitch_mocks", "label": "Shopping Mode: functional spec + design system + Stitch mocks", "nodes": ["analisisfuncional_modo_ir_de_compras", "design_shopping_mode_components", "codehtml_shopping_session_1", "codehtml_shopping_session_2", "codehtml_shopping_session_mobile"], "relation": "form", "confidence": "EXTRACTED", "confidence_score": 0.9, "source_file": "design/slate_collective/DESIGN.md"}, {"id": "deploy_readiness_bundle", "label": "Deploy readiness bundle (PWA + rate-limit + JWT rotation + Lighthouse + RLS audit)", "nodes": ["concept_inject_manifest_pwa", "concept_kong_rate_limit_invitations", "concept_jwt_rotation_script", "concept_lighthouse_rls_audit"], "relation": "implement", "confidence": "EXTRACTED", "confidence_score": 0.95, "source_file": "plan/fase-6-deploy-prep.md"}, {"id": "mobile_ux_monolith_cluster", "label": "Monolith Editorial mobile UX cluster (shell + masthead + gestures + undo + selection)", "nodes": ["concept_mobile_shell", "concept_masthead_editorial", "concept_undo_queue_toast", "concept_swipe_toggle_gestures", "concept_selection_mode_bulk", "design_monolith_editorial_direction"], "relation": "form", "confidence": "EXTRACTED", "confidence_score": 0.9, "source_file": "plan/fase-5-mobile-ux.md"}, {"id": "mvp_phased_roadmap", "label": "MVP phased roadmap \u2014 Fase 0 through Fase 7 in sequence", "nodes": ["plan_fase_0", "plan_fase_1", "plan_fase_2a", "plan_fase_2b", "plan_fase_3", "plan_fase_4", "plan_fase_5", "plan_fase_6", "plan_fase_7"], "relation": "participate_in", "confidence": "EXTRACTED", "confidence_score": 0.95, "source_file": "plan/fase-0-infraestructura.md"}, {"id": "search_mobile_screen_components", "label": "Search mobile screen", "nodes": ["searchmobile_top_app_bar", "searchmobile_header_eyebrow", "searchmobile_page_title", "searchmobile_search_input", "searchmobile_lists_section", "searchmobile_list_result_card", "searchmobile_tasks_section", "searchmobile_task_result_card", "searchmobile_notes_section", "searchmobile_note_result_card", "searchmobile_match_count_badge", "searchmobile_bottom_nav", "searchmobile_grouped_results_layout", "searchmobile_editorial_typography"], "relation": "participate_in", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "design/search_mobile/screen.png"}, {"id": "settings2_screen_components", "label": "Settings screen v2", "nodes": ["settings2_sidebar_branding", "settings2_sidebar_nav", "settings2_sidebar_collective_footer", "settings2_header_breadcrumb", "settings2_header_icons", "settings2_avatar_preview", "settings2_avatar_type_tabs", "settings2_emoji_picker_grid", "settings2_display_name_section", "settings2_language_section", "settings2_account_section", "settings2_danger_zone_section", "settings2_design_editorial_style", "settings2_design_autosave_pattern", "settings2_design_external_auth_hint", "settings2_design_avatar_three_modes", "settings2_purpose_user_profile"], "relation": "participate_in", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "design/settings_2/screen.png"}, {"id": "tasks_view_screen_components", "label": "Tasks view", "nodes": ["tasksview_sidebar_workspace", "tasksview_sidebar_nav_lists", "tasksview_sidebar_nav_tasks_active", "tasksview_sidebar_nav_notes", "tasksview_sidebar_nav_search", "tasksview_sidebar_user_profile", "tasksview_header_breadcrumb", "tasksview_header_title", "tasksview_header_member_avatars", "tasksview_header_overflow_menu", "tasksview_section_high_priority", "tasksview_task_finalize_q4", "tasksview_task_coordinate_design", "tasksview_section_product_dev", "tasksview_task_parent_core_api", "tasksview_task_sub_review_docs", "tasksview_task_sub_map_schema_completed", "tasksview_task_user_testing", "tasksview_section_backlog", "tasksview_task_update_deps", "tasksview_filter_pills", "tasksview_add_task_row", "tasksview_task_checkbox_control", "tasksview_priority_badges"], "relation": "participate_in", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "design/tasks_view/screen.png"}, {"id": "grocery_quickqty_screen_components", "label": "Grocery list with quick qty", "nodes": ["groceryqty_brand_header", "groceryqty_sidebar_nav", "groceryqty_page_title", "groceryqty_member_avatars", "groceryqty_overflow_menu", "groceryqty_item_row", "groceryqty_checkbox", "groceryqty_item_label", "groceryqty_stepper", "groceryqty_stepper_minus", "groceryqty_stepper_value", "groceryqty_stepper_plus", "groceryqty_suggestion_chips", "groceryqty_add_input", "groceryqty_add_button", "groceryqty_user_card", "groceryqty_design_intent_fast_qty", "groceryqty_design_intent_editorial"], "relation": "participate_in", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "design/grocery_list_with_quick_quantity_controls/screen.png"}, {"id": "shopping_session_1_components", "label": "Shopping session v1", "nodes": ["session1_close_button", "session1_session_title", "session1_presence_avatars", "session1_to_buy_section",Line truncated
// afterDrawing passes ctx already transformed to network coordinate space.
// Draw node positions raw — no manual pan/zoom/DPR math needed.
network.on('afterDrawing', function(ctx) {
hyperedges.forEach(h => {
const positions = h.nodes
.map(nid => network.getPositions([nid])[nid])
.filter(p => p !== undefined);
if (positions.length < 2) return;
ctx.save();
ctx.globalAlpha = 0.12;
ctx.fillStyle = '#6366f1';
ctx.strokeStyle = '#6366f1';
ctx.lineWidth = 2;
ctx.beginPath();
// Centroid and expanded hull in network coordinates
const cx = positions.reduce((s, p) => s + p.x, 0) / positions.length;
const cy = positions.reduce((s, p) => s + p.y, 0) / positions.length;
const expanded = positions.map(p => ({
x: cx + (p.x - cx) * 1.15,
y: cy + (p.y - cy) * 1.15
}));
ctx.moveTo(expanded[0].x, expanded[0].y);
expanded.slice(1).forEach(p => ctx.lineTo(p.x, p.y));
ctx.closePath();
ctx.fill();
ctx.globalAlpha = 0.4;
ctx.stroke();
// Label
ctx.globalAlpha = 0.8;
ctx.fillStyle = '#4f46e5';
ctx.font = 'bold 11px sans-serif';
ctx.textAlign = 'center';
ctx.fillText(h.label, cx, cy - 5);
ctx.restore();
});
});
</script>
</body>
</html>