Files
Odoo-Modules/graphify-out/graph-overview.html
gsinghpal 47956f3244 chore(graphify): add knowledge graph + interactive maps
Generated by graphify (local Ollama backend). Includes graph.json,
GRAPH_REPORT.md, and interactive HTML map(s). Scratch cache/ and
intermediates are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 05:31:01 -04:00

307 lines
33 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>graphify - graphify-out/graph-overview.html</title>
<script src="https://unpkg.com/vis-network@9.1.6/standalone/umd/vis-network.min.js"
integrity="sha384-Ux6phic9PEHJ38YtrijhkzyJ8yQlH8i/+buBR8s3mAZOJrP1gwyvAcIYl3GWtpX1"
crossorigin="anonymous"></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; }
#legend-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 4px 0; }
#legend-controls label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: #aaa; user-select: none; }
#legend-controls label:hover { color: #e0e0e0; }
.legend-cb, #select-all-cb { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; border: 1.5px solid #3a3a5e; border-radius: 3px; background: #0f0f1a; cursor: pointer; position: relative; flex-shrink: 0; }
.legend-cb:checked, #select-all-cb:checked { background: #4E79A7; border-color: #4E79A7; }
.legend-cb:checked::after, #select-all-cb:checked::after { content: ''; position: absolute; left: 3.5px; top: 1px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
#select-all-cb:indeterminate { background: #4E79A7; border-color: #4E79A7; }
#select-all-cb:indeterminate::after { content: ''; position: absolute; left: 2px; top: 5px; width: 8px; height: 2px; background: #fff; border: none; transform: none; }
</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-controls">
<label><input type="checkbox" id="select-all-cb" checked onchange="toggleAllCommunities(!this.checked)">Select All</label>
</div>
<div id="legend"></div>
</div>
<div id="stats">30 nodes &middot; 34 edges &middot; 30 communities</div>
</div>
<script>
const RAW_NODES = [{"id": "Entech Plating", "label": "Entech Plating", "color": {"background": "#F28E2B", "border": "#F28E2B", "highlight": {"background": "#ffffff", "border": "#F28E2B"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "Entech Plating", "community": 1, "community_name": "Entech Plating", "source_file": "Entech Plating", "file_type": "module", "degree": 0}, {"id": "Obsolete Files", "label": "Obsolete Files", "color": {"background": "#E15759", "border": "#E15759", "highlight": {"background": "#ffffff", "border": "#E15759"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "Obsolete Files", "community": 2, "community_name": "Obsolete Files", "source_file": "Obsolete Files", "file_type": "module", "degree": 0}, {"id": "Work in Progress", "label": "Work in Progress", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "Work in Progress", "community": 3, "community_name": "Work in Progress", "source_file": "Work in Progress", "file_type": "module", "degree": 1}, {"id": "docs", "label": "docs", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 13.2, "font": {"size": 0, "color": "#ffffff"}, "title": "docs", "community": 4, "community_name": "docs", "source_file": "docs", "file_type": "module", "degree": 2}, {"id": "tools", "label": "tools", "color": {"background": "#BAB0AC", "border": "#BAB0AC", "highlight": {"background": "#ffffff", "border": "#BAB0AC"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "tools", "community": 29, "community_name": "tools", "source_file": "tools", "file_type": "module", "degree": 1}, {"id": "CLAUDE.md", "label": "CLAUDE.md", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "CLAUDE.md", "community": 0, "community_name": "CLAUDE.md", "source_file": "CLAUDE.md", "file_type": "module", "degree": 0}, {"id": "fusion_ltc_management", "label": "fusion_ltc_management", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 13.2, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_ltc_management", "community": 16, "community_name": "fusion_ltc_management", "source_file": "fusion_ltc_management", "file_type": "module", "degree": 2}, {"id": "fusion_schedule", "label": "fusion_schedule", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_schedule", "community": 24, "community_name": "fusion_schedule", "source_file": "fusion_schedule", "file_type": "module", "degree": 1}, {"id": "fusion_poynt", "label": "fusion_poynt", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 14.7, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_poynt", "community": 20, "community_name": "fusion_poynt", "source_file": "fusion_poynt", "file_type": "module", "degree": 3}, {"id": "fusion_loaners_management", "label": "fusion_loaners_management", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 13.2, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_loaners_management", "community": 15, "community_name": "fusion_loaners_management", "source_file": "fusion_loaners_management", "file_type": "module", "degree": 2}, {"id": "fusion_rental", "label": "fusion_rental", "color": {"background": "#F28E2B", "border": "#F28E2B", "highlight": {"background": "#ffffff", "border": "#F28E2B"}}, "size": 14.7, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_rental", "community": 21, "community_name": "fusion_rental", "source_file": "fusion_rental", "file_type": "module", "degree": 3}, {"id": "fusion_centralize_billing", "label": "fusion_centralize_billing", "color": {"background": "#FF9DA7", "border": "#FF9DA7", "highlight": {"background": "#ffffff", "border": "#FF9DA7"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_centralize_billing", "community": 7, "community_name": "fusion_centralize_billing", "source_file": "fusion_centralize_billing", "file_type": "module", "degree": 1}, {"id": "fusion_planning", "label": "fusion_planning", "color": {"background": "#9C755F", "border": "#9C755F", "highlight": {"background": "#ffffff", "border": "#9C755F"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_planning", "community": 18, "community_name": "fusion_planning", "source_file": "fusion_planning", "file_type": "module", "degree": 1}, {"id": "fusion_ringcentral", "label": "fusion_ringcentral", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 14.7, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_ringcentral", "community": 23, "community_name": "fusion_ringcentral", "source_file": "fusion_ringcentral", "file_type": "module", "degree": 3}, {"id": "fusion_accounts", "label": "fusion_accounts", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_accounts", "community": 5, "community_name": "fusion_accounts", "source_file": "fusion_accounts", "file_type": "module", "degree": 1}, {"id": "fusion_clover", "label": "fusion_clover", "color": {"background": "#F28E2B", "border": "#F28E2B", "highlight": {"background": "#ffffff", "border": "#F28E2B"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_clover", "community": 11, "community_name": "fusion_clover", "source_file": "fusion_clover", "file_type": "module", "degree": 1}, {"id": "fusion_digitize", "label": "fusion_digitize", "color": {"background": "#E15759", "border": "#E15759", "highlight": {"background": "#ffffff", "border": "#E15759"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_digitize", "community": 12, "community_name": "fusion_digitize", "source_file": "fusion_digitize", "file_type": "module", "degree": 1}, {"id": "fusion_canada_post", "label": "fusion_canada_post", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_canada_post", "community": 6, "community_name": "fusion_canada_post", "source_file": "fusion_canada_post", "file_type": "module", "degree": 1}, {"id": "fusion_so_to_po", "label": "fusion_so_to_po", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_so_to_po", "community": 26, "community_name": "fusion_so_to_po", "source_file": "fusion_so_to_po", "file_type": "module", "degree": 1}, {"id": "fusion_tasks", "label": "fusion_tasks", "color": {"background": "#FF9DA7", "border": "#FF9DA7", "highlight": {"background": "#ffffff", "border": "#FF9DA7"}}, "size": 17.9, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_tasks", "community": 27, "community_name": "fusion_tasks", "source_file": "fusion_tasks", "file_type": "module", "degree": 5}, {"id": "fusion_claims", "label": "fusion_claims", "color": {"background": "#9C755F", "border": "#9C755F", "highlight": {"background": "#ffffff", "border": "#9C755F"}}, "size": 40.0, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_claims", "community": 8, "community_name": "fusion_claims", "source_file": "fusion_claims", "file_type": "module", "degree": 19}, {"id": "fusion_repairs", "label": "fusion_repairs", "color": {"background": "#E15759", "border": "#E15759", "highlight": {"background": "#ffffff", "border": "#E15759"}}, "size": 16.3, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_repairs", "community": 22, "community_name": "fusion_repairs", "source_file": "fusion_repairs", "file_type": "module", "degree": 4}, {"id": "fusion_clock", "label": "fusion_clock", "color": {"background": "#BAB0AC", "border": "#BAB0AC", "highlight": {"background": "#ffffff", "border": "#BAB0AC"}}, "size": 13.2, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_clock", "community": 9, "community_name": "fusion_clock", "source_file": "fusion_clock", "file_type": "module", "degree": 2}, {"id": "fusion_shipping", "label": "fusion_shipping", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_shipping", "community": 25, "community_name": "fusion_shipping", "source_file": "fusion_shipping", "file_type": "module", "degree": 1}, {"id": "fusion_templates", "label": "fusion_templates", "color": {"background": "#9C755F", "border": "#9C755F", "highlight": {"background": "#ffffff", "border": "#9C755F"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_templates", "community": 28, "community_name": "fusion_templates", "source_file": "fusion_templates", "file_type": "module", "degree": 1}, {"id": "fusion_odoo_fixes", "label": "fusion_odoo_fixes", "color": {"background": "#FF9DA7", "border": "#FF9DA7", "highlight": {"background": "#ffffff", "border": "#FF9DA7"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_odoo_fixes", "community": 17, "community_name": "fusion_odoo_fixes", "source_file": "fusion_odoo_fixes", "file_type": "module", "degree": 1}, {"id": "fusion_inventory", "label": "fusion_inventory", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 13.2, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_inventory", "community": 14, "community_name": "fusion_inventory", "source_file": "fusion_inventory", "file_type": "module", "degree": 2}, {"id": "fusion_faxes", "label": "fusion_faxes", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 13.2, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_faxes", "community": 13, "community_name": "fusion_faxes", "source_file": "fusion_faxes", "file_type": "module", "degree": 2}, {"id": "fusion_clock_ai", "label": "fusion_clock_ai", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 11.6, "font": {"size": 0, "color": "#ffffff"}, "title": "fusion_clock_ai", "community": 10, "community_name": "fusion_clock_ai", "source_file": "fusion_clock_ai", "file_type": "module", "degree": 1}, {"id": "fusion_portal", "label": "fusion_portal", "color": {"background": "#BAB0AC", "border": "#BAB0AC", "highlight": {"background": "#ffffff", "border": "#BAB0AC"}}, "size": 17.9, "font": {"size": 12, "color": "#ffffff"}, "title": "fusion_portal", "community": 19, "community_name": "fusion_portal", "source_file": "fusion_portal", "file_type": "module", "degree": 5}];
const RAW_EDGES = [{"from": "Work in Progress", "to": "docs", "label": "1 doc/code mentions", "title": "1 doc/code mentions [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "docs", "to": "tools", "label": "1 doc/code mentions", "title": "1 doc/code mentions [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "fusion_ltc_management", "to": "fusion_claims", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_ltc_management", "to": "fusion_tasks", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_schedule", "to": "fusion_portal", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_poynt", "to": "fusion_rental", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_poynt", "to": "fusion_repairs", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_poynt", "to": "fusion_claims", "label": "extends 2 models", "title": "extends 2 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_loaners_management", "to": "fusion_portal", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_loaners_management", "to": "fusion_claims", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_rental", "to": "fusion_ringcentral", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_rental", "to": "fusion_claims", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_centralize_billing", "to": "fusion_claims", "label": "extends 2 models", "title": "extends 2 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_planning", "to": "fusion_clock", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_ringcentral", "to": "fusion_claims", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_ringcentral", "to": "fusion_faxes", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_accounts", "to": "fusion_claims", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_clover", "to": "fusion_claims", "label": "extends 2 models", "title": "extends 2 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_digitize", "to": "fusion_claims", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_canada_post", "to": "fusion_claims", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_so_to_po", "to": "fusion_claims", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_tasks", "to": "fusion_claims", "label": "depends_on + extends 3 models", "title": "depends_on + extends 3 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_tasks", "to": "fusion_inventory", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_tasks", "to": "fusion_portal", "label": "depends_on + extends 2 models", "title": "depends_on + extends 2 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_tasks", "to": "fusion_repairs", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_portal", "label": "depends_on + extends 1 models", "title": "depends_on + extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_faxes", "label": "extends 2 models", "title": "extends 2 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_inventory", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_odoo_fixes", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_repairs", "label": "extends 3 models", "title": "extends 3 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_shipping", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_claims", "to": "fusion_templates", "label": "extends 1 models", "title": "extends 1 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_repairs", "to": "fusion_portal", "label": "depends_on", "title": "depends_on [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "fusion_clock", "to": "fusion_clock_ai", "label": "depends_on + extends 2 models", "title": "depends_on + extends 2 models [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}];
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "CLAUDE.md", "count": 1}, {"cid": 1, "color": "#F28E2B", "label": "Entech Plating", "count": 1}, {"cid": 2, "color": "#E15759", "label": "Obsolete Files", "count": 1}, {"cid": 3, "color": "#76B7B2", "label": "Work in Progress", "count": 1}, {"cid": 4, "color": "#59A14F", "label": "docs", "count": 1}, {"cid": 5, "color": "#EDC948", "label": "fusion_accounts", "count": 1}, {"cid": 6, "color": "#B07AA1", "label": "fusion_canada_post", "count": 1}, {"cid": 7, "color": "#FF9DA7", "label": "fusion_centralize_billing", "count": 1}, {"cid": 8, "color": "#9C755F", "label": "fusion_claims", "count": 1}, {"cid": 9, "color": "#BAB0AC", "label": "fusion_clock", "count": 1}, {"cid": 10, "color": "#4E79A7", "label": "fusion_clock_ai", "count": 1}, {"cid": 11, "color": "#F28E2B", "label": "fusion_clover", "count": 1}, {"cid": 12, "color": "#E15759", "label": "fusion_digitize", "count": 1}, {"cid": 13, "color": "#76B7B2", "label": "fusion_faxes", "count": 1}, {"cid": 14, "color": "#59A14F", "label": "fusion_inventory", "count": 1}, {"cid": 15, "color": "#EDC948", "label": "fusion_loaners_management", "count": 1}, {"cid": 16, "color": "#B07AA1", "label": "fusion_ltc_management", "count": 1}, {"cid": 17, "color": "#FF9DA7", "label": "fusion_odoo_fixes", "count": 1}, {"cid": 18, "color": "#9C755F", "label": "fusion_planning", "count": 1}, {"cid": 19, "color": "#BAB0AC", "label": "fusion_portal", "count": 1}, {"cid": 20, "color": "#4E79A7", "label": "fusion_poynt", "count": 1}, {"cid": 21, "color": "#F28E2B", "label": "fusion_rental", "count": 1}, {"cid": 22, "color": "#E15759", "label": "fusion_repairs", "count": 1}, {"cid": 23, "color": "#76B7B2", "label": "fusion_ringcentral", "count": 1}, {"cid": 24, "color": "#59A14F", "label": "fusion_schedule", "count": 1}, {"cid": 25, "color": "#EDC948", "label": "fusion_shipping", "count": 1}, {"cid": 26, "color": "#B07AA1", "label": "fusion_so_to_po", "count": 1}, {"cid": 27, "color": "#FF9DA7", "label": "fusion_tasks", "count": 1}, {"cid": 28, "color": "#9C755F", "label": "fusion_templates", "count": 1}, {"cid": 29, "color": "#BAB0AC", "label": "tools", "count": 1}];
// 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 selectAllCb = document.getElementById('select-all-cb');
function updateSelectAllState() {
const total = LEGEND.length;
const hidden = hiddenCommunities.size;
selectAllCb.checked = hidden === 0;
selectAllCb.indeterminate = hidden > 0 && hidden < total;
}
function toggleAllCommunities(hide) {
document.querySelectorAll('.legend-item').forEach(item => {
hide ? item.classList.add('dimmed') : item.classList.remove('dimmed');
});
document.querySelectorAll('.legend-cb').forEach(cb => {
cb.checked = !hide;
});
LEGEND.forEach(c => {
if (hide) hiddenCommunities.add(c.cid); else hiddenCommunities.delete(c.cid);
});
const updates = RAW_NODES.map(n => ({ id: n.id, hidden: hide }));
nodesDS.update(updates);
updateSelectAllState();
}
const legendEl = document.getElementById('legend');
LEGEND.forEach(c => {
const item = document.createElement('div');
item.className = 'legend-item';
const cb = document.createElement('input');
cb.type = 'checkbox';
cb.className = 'legend-cb';
cb.checked = true;
cb.addEventListener('change', (e) => {
e.stopPropagation();
if (cb.checked) {
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: !cb.checked }));
nodesDS.update(updates);
updateSelectAllState();
});
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.prepend(cb);
item.onclick = (e) => {
if (e.target === cb) return;
cb.checked = !cb.checked;
cb.dispatchEvent(new Event('change'));
};
legendEl.appendChild(item);
});
</script>
<script>
// Render hyperedges as shaded regions
const hyperedges = [];
// 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>