From 54b57638715b0a36c1dcef507469449a7ebac7cb Mon Sep 17 00:00:00 2001 From: naps62-yolo Date: Tue, 26 May 2026 21:02:57 +0000 Subject: [PATCH] fix(maestro): seed catalog from REST so the UI renders without /api/events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CatalogStore.start() previously connected the events WS only — fine when loaded from the registry, broken when loaded from maestro-web (the daemon has no /api/events endpoint yet, so the WS handshake 404s and the catalog stays empty). Issue an initial resync() before connect(); the WS, when it succeeds, takes over with live deltas. Daemon-side WS is filed as NAP-248. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/events.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/events.ts b/web/src/events.ts index 5aed7e5..644175d 100644 --- a/web/src/events.ts +++ b/web/src/events.ts @@ -16,6 +16,11 @@ export class CatalogStore { private backoffMs = 500; start(): void { + // Seed the catalog from REST so the UI renders even when the events WS + // hasn't connected yet (or isn't available — e.g. talking to a daemon's + // local /api surface, which has no /api/events). The WS, when it + // succeeds, takes over with live deltas. + void this.resync(); this.connect(); }