()
| 678 | } |
| 679 | |
| 680 | async function openGraphView() { |
| 681 | const overlay = document.getElementById("graph-overlay"); |
| 682 | overlay.classList.add("visible"); |
| 683 | |
| 684 | // Show spinner while fetching |
| 685 | const svgEl = document.getElementById("graph-svg"); |
| 686 | const existing = document.getElementById("graph-loading"); |
| 687 | if (existing) existing.remove(); |
| 688 | |
| 689 | const loading = document.createElement("div"); |
| 690 | loading.id = "graph-loading"; |
| 691 | loading.innerHTML = `<div class="graph-spinner"></div><span>Charting the depths…</span>`; |
| 692 | overlay.appendChild(loading); |
| 693 | |
| 694 | const data = await buildGraphData(); |
| 695 | loading.remove(); |
| 696 | renderGraph(data); |
| 697 | |
| 698 | // Escape key closes |
| 699 | document.addEventListener("keydown", onGraphEscape); |
| 700 | } |
| 701 | |
| 702 | function closeGraphView() { |
| 703 | const overlay = document.getElementById("graph-overlay"); |
nothing calls this directly
no test coverage detected