@cryptiklemur/lattice 1.42.2 → 1.42.4

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.
@@ -215,7 +215,9 @@ export function ProjectRail(props: ProjectRailProps) {
215
215
  var ws = useWebSocket();
216
216
  var sidebar = useSidebar();
217
217
  var groups = groupProjectsBySlug(props.projects, props.nodes);
218
+ var localNode = props.nodes.find(function (n) { return n.isLocal; });
218
219
  var remoteNodes = props.nodes.filter(function (n) { return !n.isLocal; });
220
+ var allMeshNodes = localNode ? [localNode].concat(remoteNodes) : remoteNodes;
219
221
  var [contextMenu, setContextMenu] = useState<ContextMenuState>({
220
222
  visible: false,
221
223
  x: 0,
@@ -320,11 +322,11 @@ export function ProjectRail(props: ProjectRailProps) {
320
322
  })}
321
323
 
322
324
 
323
- {groups.length > 0 && remoteNodes.length > 0 && (
325
+ {groups.length > 0 && allMeshNodes.length > 0 && (
324
326
  <div className="w-6 h-px bg-base-300 my-0.5 flex-shrink-0" />
325
327
  )}
326
328
 
327
- {remoteNodes.map(function (node) {
329
+ {allMeshNodes.map(function (node) {
328
330
  return (
329
331
  <NodeIndicator key={node.id} node={node} />
330
332
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptiklemur/lattice",
3
- "version": "1.42.2",
3
+ "version": "1.42.4",
4
4
  "description": "Multi-machine agentic dashboard for Claude Code. Monitor sessions, manage MCP servers and skills, orchestrate across mesh-networked nodes.",
5
5
  "license": "MIT",
6
6
  "author": "Aaron Scherer <me@aaronscherer.me>",
@@ -27,7 +27,15 @@ export function addPeer(peer: PeerInfo): void {
27
27
  if (idx >= 0) {
28
28
  peers[idx] = peer;
29
29
  } else {
30
- peers.push(peer);
30
+ var addrSet = new Set(peer.addresses);
31
+ var dupeIdx = peers.findIndex(function (p) {
32
+ return p.addresses.some(function (a) { return addrSet.has(a); });
33
+ });
34
+ if (dupeIdx >= 0) {
35
+ peers[dupeIdx] = peer;
36
+ } else {
37
+ peers.push(peer);
38
+ }
31
39
  }
32
40
  savePeers(peers);
33
41
  }