From 34f0387c880897d437e5df504d4d44322e134e00 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 31 Mar 2026 10:00:16 -0700 Subject: [PATCH] fix(rmaps): bump JS cache version + add demo debug logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump folk-map-viewer.js?v=6 → v=7 to bust Cloudflare cache. Add console logs to trace demo marker creation flow. Co-Authored-By: Claude Opus 4.6 --- modules/rmaps/components/folk-map-viewer.ts | 6 +++++- modules/rmaps/mod.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/rmaps/components/folk-map-viewer.ts b/modules/rmaps/components/folk-map-viewer.ts index bb9b6d6..7956446 100644 --- a/modules/rmaps/components/folk-map-viewer.ts +++ b/modules/rmaps/components/folk-map-viewer.ts @@ -985,9 +985,13 @@ class FolkMapViewer extends HTMLElement { // Persist to IndexedDB for offline pinging this.persistRoomState(state); - if (!this.map || !(window as any).maplibregl) return; + if (!this.map || !(window as any).maplibregl) { + console.warn("[rMaps] onRoomStateChange: map not ready", { map: !!this.map, maplibregl: !!(window as any).maplibregl }); + return; + } const currentIds = new Set(); + if (this.space === "demo") console.log("[rMaps demo] onRoomStateChange:", Object.keys(state.participants).length, "participants,", state.waypoints.length, "waypoints"); // Update participant markers for (const [id, p] of Object.entries(state.participants)) { diff --git a/modules/rmaps/mod.ts b/modules/rmaps/mod.ts index 200d433..ffcb3c8 100644 --- a/modules/rmaps/mod.ts +++ b/modules/rmaps/mod.ts @@ -276,7 +276,7 @@ routes.get("/", (c) => { body: ``, scripts: ` - `, + `, styles: ``, })); }); @@ -295,7 +295,7 @@ routes.get("/:room", (c) => { body: ``, scripts: ` - `, + `, })); });