@phren/cli 0.0.53 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mcp/dist/ui/data.js
CHANGED
|
@@ -443,6 +443,14 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
443
443
|
.map((ref) => ref.scoreKey)
|
|
444
444
|
.filter((key) => Boolean(key))
|
|
445
445
|
.sort();
|
|
446
|
+
// Only include entities that link to at least one visible project
|
|
447
|
+
const linkedProjects = new Set();
|
|
448
|
+
for (const ref of refs) {
|
|
449
|
+
if (ref.project && projectSet.has(ref.project))
|
|
450
|
+
linkedProjects.add(ref.project);
|
|
451
|
+
}
|
|
452
|
+
if (linkedProjects.size === 0)
|
|
453
|
+
continue; // skip orphan entities from other profiles/stores
|
|
446
454
|
const nodeId = `entity:${stableId("entity", type, name)}`;
|
|
447
455
|
nodes.push({
|
|
448
456
|
id: nodeId,
|
|
@@ -457,12 +465,6 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
457
465
|
entityType: type,
|
|
458
466
|
refDocs: refs,
|
|
459
467
|
});
|
|
460
|
-
// Link fragment to each project it appears in
|
|
461
|
-
const linkedProjects = new Set();
|
|
462
|
-
for (const ref of refs) {
|
|
463
|
-
if (ref.project && projectSet.has(ref.project))
|
|
464
|
-
linkedProjects.add(ref.project);
|
|
465
|
-
}
|
|
466
468
|
for (const proj of linkedProjects) {
|
|
467
469
|
links.push({ source: nodeId, target: proj });
|
|
468
470
|
}
|
package/mcp/dist/ui/page.js
CHANGED
|
@@ -203,6 +203,7 @@ ${REVIEW_UI_STYLES}
|
|
|
203
203
|
<button id="graph-zoom-in" title="Zoom in">+</button>
|
|
204
204
|
<button id="graph-zoom-out" title="Zoom out">-</button>
|
|
205
205
|
<button id="graph-reset" title="Reset view">R</button>
|
|
206
|
+
<button id="graph-reset-layout" title="Re-run layout">L</button>
|
|
206
207
|
</div>
|
|
207
208
|
<div class="graph-filters">
|
|
208
209
|
<div class="graph-filter" id="graph-filter"></div>
|
package/mcp/dist/ui/scripts.js
CHANGED
|
@@ -1466,6 +1466,8 @@ export function renderEventWiringScript() {
|
|
|
1466
1466
|
if (graphZoomOut) graphZoomOut.addEventListener('click', function() { graphZoom(0.8); });
|
|
1467
1467
|
var graphResetBtn = document.getElementById('graph-reset');
|
|
1468
1468
|
if (graphResetBtn) graphResetBtn.addEventListener('click', function() { graphReset(); });
|
|
1469
|
+
var graphResetLayoutBtn = document.getElementById('graph-reset-layout');
|
|
1470
|
+
if (graphResetLayoutBtn) graphResetLayoutBtn.addEventListener('click', function() { if (typeof graphResetLayout === 'function') graphResetLayout(); });
|
|
1469
1471
|
|
|
1470
1472
|
// --- Tasks filters ---
|
|
1471
1473
|
var tasksFilterProject = document.getElementById('tasks-filter-project');
|