MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / syncGithubNotes

Function syncGithubNotes

deployments/desktop/static/desktop.js:4127–4155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4125 const b = byId[String(edge.dst_id)];
4126 if (!a || !b) return "";
4127 const weightClass = graphWeight(edge) >= 0.78 || a.id === layout.centerId || b.id === layout.centerId
4128 ? "strong"
4129 : graphWeight(edge) >= 0.35 ? "medium" : "light";
4130 const curve = (index % 2 === 0 ? 4 : -4) * Math.max(0.8, Math.min(spread, 1.8));
4131 const midX = (a.x + b.x) / 2 + curve;
4132 const midY = (a.y + b.y) / 2 - curve;
4133 return `<path class="graph-svg-link ${weightClass}" d="M ${a.x} ${a.y} Q ${midX} ${midY} ${b.x} ${b.y}"></path>`;
4134 }).join("");
4135 const activeNodeId = state.currentWikiNodeId || layout.centerId;
4136 const nodeZoom = Math.max(0.82, Math.min(1.18, 0.9 + spread * 0.1));
4137 const labelZoom = Math.max(0.9, Math.min(1.22, 0.94 + spread * 0.08));
4138 const nodeHtml = visualNodes.map((node) => `
4139 <button
4140 class="graph-node ${node.type} ${node.size || "medium"} ${node.id === activeNodeId ? "active" : ""}"
4141 data-node-id="${escapeHtml(graphId(node))}"
4142 data-real-node-id="${escapeHtml(node.real_node_id || "")}"
4143 data-node-title="${escapeHtml(rawGraphTitle(node))}"
4144 data-node-body="${escapeHtml(rawGraphBody(node))}"
4145 title="${escapeHtml(graphTitle(node))}"
4146 style="left:${node.x}%;top:${node.y}%;--node-zoom:${nodeZoom};--label-zoom:${labelZoom}"
4147 type="button"
4148 >
4149 <span class="node-dot"></span>
4150 <span class="node-label">${escapeHtml(graphTitle(node))}</span>
4151 </button>
4152 `).join("");
4153 target.classList.toggle("real", hasBackendGraph);
4154 const totalNodes = Number(state.wikiStats?.nodes || layout.sourceCount || 0);
4155 const graphNote = hasBackendGraph
4156 ? ui().wiki.graphRealNote(layout.nodes.length, totalNodes, layout.sourceEdgeCount)
4157 : state.wikiNodes.length
4158 ? ui().wiki.graphSearchNote(layout.sourceCount, layout.nodes.length)

Callers

nothing calls this directly

Calls 10

currentUserFunction · 0.85
responseLanguageFunction · 0.85
loadSettingsFunction · 0.85
loadWikiFunction · 0.85
githubSyncSummaryFunction · 0.85
uiFunction · 0.85
setWikiEntryFunction · 0.85
showFeedbackToastFunction · 0.85
apiFunction · 0.70
$Function · 0.70

Tested by

no test coverage detected