@cryptiklemur/lattice 1.40.3 → 1.40.5

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.
@@ -770,7 +770,7 @@ export function ChatView({ sessionId: tabSessionId, projectSlug: tabProjectSlug
770
770
  ? "Type a message below to begin chatting with Claude."
771
771
  : activeProject
772
772
  ? "Click the + button in the sidebar to start a new session."
773
- : "Choose a project from the rail to get started."}
773
+ : "Choose a project from the sidebar to get started."}
774
774
  </p>
775
775
  </div>
776
776
  </div>
@@ -314,9 +314,16 @@ export function Sidebar({ onSessionSelect }: { onSessionSelect?: () => void }) {
314
314
  </button>
315
315
  </div>
316
316
  <SectionLabel label="Projects" />
317
- <div className="text-[12px] text-base-content/40 px-4">
318
- Select a project from the rail to view sessions.
319
- </div>
317
+ {projects.length === 0 && nodes.some(function (n) { return !n.isLocal && n.online; }) ? (
318
+ <div className="flex items-center gap-2 text-[12px] text-base-content/30 px-4">
319
+ <span className="w-2 h-2 rounded-full bg-primary animate-pulse flex-shrink-0" />
320
+ Loading remote projects...
321
+ </div>
322
+ ) : (
323
+ <div className="text-[12px] text-base-content/40 px-4">
324
+ Select a project from the rail to view sessions.
325
+ </div>
326
+ )}
320
327
  </div>
321
328
  </>
322
329
  ) : (
@@ -330,7 +337,7 @@ export function Sidebar({ onSessionSelect }: { onSessionSelect?: () => void }) {
330
337
  className="w-full px-4 h-11 border-b border-base-300 flex-shrink-0 flex items-center justify-between cursor-pointer hover:bg-base-300/30 transition-colors text-left"
331
338
  >
332
339
  <span className="text-[13px] font-mono font-bold text-base-content/90">
333
- {activeProject?.title ?? "No Project"}
340
+ {activeProject?.title ?? (projects.length === 0 ? "Loading..." : "No Project")}
334
341
  {activeProject?.isRemote && (
335
342
  <span className="ml-1.5 text-[10px] font-normal text-base-content/30">
336
343
  on {activeProject.nodeName}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptiklemur/lattice",
3
- "version": "1.40.3",
3
+ "version": "1.40.5",
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>",
@@ -224,7 +224,10 @@ export async function startDaemon(portOverride?: number | null): Promise<void> {
224
224
 
225
225
  var protocol = tlsOptions ? "https" : "http";
226
226
 
227
- Bun.serve<WsData>({
227
+ var maxRetries = 10;
228
+ for (var attempt = 0; attempt < maxRetries; attempt++) {
229
+ try {
230
+ Bun.serve<WsData>({
228
231
  port: config.port,
229
232
  hostname: "0.0.0.0",
230
233
  ...(tlsOptions ? { tls: tlsOptions } : {}),
@@ -356,6 +359,16 @@ export async function startDaemon(portOverride?: number | null): Promise<void> {
356
359
  },
357
360
  },
358
361
  });
362
+ break;
363
+ } catch (err: unknown) {
364
+ if (attempt < maxRetries - 1 && err instanceof Error && (err as any).code === "EADDRINUSE") {
365
+ log.server("Port %d in use, retrying in 1s (%d/%d)...", config.port, attempt + 1, maxRetries);
366
+ await new Promise(function (r) { setTimeout(r, 1000); });
367
+ continue;
368
+ }
369
+ throw err;
370
+ }
371
+ }
359
372
 
360
373
  log.server("Listening on %s://0.0.0.0:%d", protocol, config.port);
361
374