mnemosyne-core 2.1.9 → 2.1.11

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.
@@ -1534,14 +1534,23 @@
1534
1534
  border-left: 1px solid var(--border-subtle);
1535
1535
  display: flex;
1536
1536
  flex-direction: column;
1537
+ overflow: hidden;
1537
1538
  z-index: 100;
1538
1539
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1539
1540
  }
1540
1541
  #sidebar-content {
1541
1542
  flex: 1;
1542
1543
  overflow-y: auto;
1544
+ overflow-x: hidden;
1543
1545
  min-height: 0;
1544
- }
1546
+ max-height: 100%;
1547
+ scrollbar-width: thin;
1548
+ scrollbar-color: rgba(99,116,155,0.35) transparent;
1549
+ }
1550
+ #sidebar-content::-webkit-scrollbar { width: 8px; }
1551
+ #sidebar-content::-webkit-scrollbar-track { background: transparent; }
1552
+ #sidebar-content::-webkit-scrollbar-thumb { background: rgba(99,116,155,0.35); border-radius: 4px; }
1553
+ #sidebar-content::-webkit-scrollbar-thumb:hover { background: rgba(99,116,155,0.5); }
1545
1554
  #sidebar.collapsed {
1546
1555
  transform: translateX(100%);
1547
1556
  }
@@ -5724,23 +5733,24 @@ function updateGraph({ reheat = 0.3, newNodeIds = new Set() } = {}) {
5724
5733
  const viewCenterX = (width / 2 - transform.x) / transform.k;
5725
5734
  const viewCenterY = (height / 2 - transform.y) / transform.k;
5726
5735
 
5727
- simNodes = nodes.map(n => {
5736
+ // Respect display cap: only sync nodes that are currently rendered
5737
+ const displayNodeIds = new Set(simNodes.map(n => n.id));
5738
+ simNodes = nodes.filter(n => displayNodeIds.has(n.id)).map(n => {
5728
5739
  const old = oldNodeMap.get(n.id);
5729
5740
  if (old) {
5730
5741
  return { ...n, x: old.x, y: old.y, vx: old.vx, vy: old.vy, fx: old.fx, fy: old.fy };
5731
5742
  }
5732
5743
  const saved = savedLayout[n.id];
5733
5744
  if (saved) return { ...n, x: saved.x, y: saved.y, vx: 0, vy: 0 };
5734
- // NEW NODE — smart positioning near parent or viewport center
5735
- if (n.parent_id && oldNodeMap.has(n.parent_id)) {
5736
- const parent = oldNodeMap.get(n.parent_id);
5737
- return { ...n, x: parent.x + (Math.random() - 0.5) * 100, y: parent.y + (Math.random() - 0.5) * 100, vx: 0, vy: 0 };
5738
- }
5739
5745
  return { ...n, x: viewCenterX + (Math.random() - 0.5) * 60, y: viewCenterY + (Math.random() - 0.5) * 60, vx: 0, vy: 0 };
5740
5746
  });
5741
5747
 
5742
5748
  const nodeMap = new Map(simNodes.map(n => [n.id, n]));
5743
- simLinks = links.map(l => {
5749
+ simLinks = links.filter(l => {
5750
+ const s = typeof l.source === "object" ? l.source.id : l.source;
5751
+ const t = typeof l.target === "object" ? l.target.id : l.target;
5752
+ return displayNodeIds.has(s) && displayNodeIds.has(t);
5753
+ }).map(l => {
5744
5754
  const s = typeof l.source === "object" ? l.source.id : l.source;
5745
5755
  const t = typeof l.target === "object" ? l.target.id : l.target;
5746
5756
  const sourceNode = nodeMap.get(s);
@@ -5767,10 +5777,9 @@ function updateGraph({ reheat = 0.3, newNodeIds = new Set() } = {}) {
5767
5777
  .attr("class", d => `link-tree ${d.type === "root" ? "root-link" : "parent"}`)
5768
5778
  .attr("stroke", "#5eead4")
5769
5779
  .attr("stroke-opacity", 0)
5770
- .attr("stroke-width", d => d.type === "root" ? 1.5 : 2)
5771
- .attr("filter", "url(#tree-glow)");
5780
+ .attr("stroke-width", d => d.type === "root" ? 2 : 3);
5772
5781
  treeEnter.transition().duration(400)
5773
- .attr("stroke-opacity", d => d.type === "root" ? 0.5 : 0.85);
5782
+ .attr("stroke-opacity", d => d.type === "root" ? 0.7 : 1);
5774
5783
  linkTreeSel = treeEnter.merge(linkTreeSel);
5775
5784
 
5776
5785
  // Bond links (grouped with handles)
@@ -5991,7 +6000,7 @@ function select(d) {
5991
6000
  if (t === id && !visibleIds.has(s)) { visibleIds.add(s); queue.push(s); }
5992
6001
  });
5993
6002
  }
5994
- d3.selectAll(".atom-group").transition().duration(300).style("opacity", n => visibleIds.has(n.id) ? 1 : 0.08);
6003
+ d3.selectAll(".atom-group").transition().duration(300).style("opacity", n => visibleIds.has(n.id) ? 1 : 0.35);
5995
6004
  d3.selectAll(".link-tree, .link-bond").transition().duration(300).style("opacity", l => {
5996
6005
  const s = typeof l.source === "object" ? l.source.id : l.source;
5997
6006
  const t = typeof l.target === "object" ? l.target.id : l.target;
@@ -6005,7 +6014,7 @@ function select(d) {
6005
6014
  if (s === d.id) visibleIds.add(t);
6006
6015
  if (t === d.id) visibleIds.add(s);
6007
6016
  });
6008
- d3.selectAll(".atom-group").transition().duration(300).style("opacity", n => visibleIds.has(n.id) ? 1 : 0.15);
6017
+ d3.selectAll(".atom-group").transition().duration(300).style("opacity", n => visibleIds.has(n.id) ? 1 : 0.5);
6009
6018
  d3.selectAll(".link-tree, .link-bond").transition().duration(300).style("opacity", 1);
6010
6019
  }
6011
6020
  } else if (!currentSearchQuery) {
@@ -6107,6 +6116,7 @@ function bondLinkMouseOut(e, d) {
6107
6116
  return ls === s && lt === t;
6108
6117
  }).transition().duration(150).attr("opacity", 0);
6109
6118
  }
6119
+ }
6110
6120
  function bondLinkClick(e, d) {
6111
6121
  e.stopPropagation();
6112
6122
  showBondToolbar(e, d);
package/dist/index.js CHANGED
@@ -201,7 +201,7 @@ function getVersion() {
201
201
  const pkg = JSON.parse(readFileSync6(resolve9(process.cwd(), "package.json"), "utf-8"));
202
202
  return pkg.version;
203
203
  } catch {
204
- return "2.1.9";
204
+ return "2.1.11";
205
205
  }
206
206
  }
207
207
  }
@@ -5391,7 +5391,7 @@ function getVersion2() {
5391
5391
  const pkg = JSON.parse(readFileSync6(resolve9(process.cwd(), "package.json"), "utf-8"));
5392
5392
  return pkg.version;
5393
5393
  } catch {
5394
- return "2.1.9";
5394
+ return "2.1.11";
5395
5395
  }
5396
5396
  }
5397
5397
  }
@@ -5978,7 +5978,7 @@ function getVersion3() {
5978
5978
  const pkg = JSON.parse(readFileSync6(resolve9(process.cwd(), "package.json"), "utf-8"));
5979
5979
  return pkg.version;
5980
5980
  } catch {
5981
- return "2.1.9";
5981
+ return "2.1.11";
5982
5982
  }
5983
5983
  }
5984
5984
  }
@@ -7144,7 +7144,7 @@ var PKG_VERSION = (() => {
7144
7144
  const pkg = JSON.parse(require("fs").readFileSync(require("path").resolve(__dirname, "../../package.json"), "utf-8"));
7145
7145
  return pkg.version;
7146
7146
  } catch {
7147
- return "2.1.9";
7147
+ return "2.1.11";
7148
7148
  }
7149
7149
  })();
7150
7150
  function handleHealth(store, pathname, method, res) {
@@ -7509,7 +7509,7 @@ var MnemosyneServer = class {
7509
7509
  const wss = new import_websocket_server.default({ server: this.httpServer });
7510
7510
  this.wsHandler = new WebSocketHandler(wss, this.store);
7511
7511
  }
7512
- const version = cfg?.server?.version || "2.1.9";
7512
+ const version = cfg?.server?.version || "2.1.11";
7513
7513
  this.httpServer.listen(port, () => {
7514
7514
  console.log(`Mnemosyne v${version} \u2014 port ${port}`);
7515
7515
  console.log(`Dashboard: http://${host}:${port}/dashboard`);