Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

chat: auto-reload on new deploy (same pattern as dumduel.mjs)

Polls /api/version at boot, then long-polls with the current
deployed id; triggers window:reload when the server reports a
change so open chat tabs pick up new builds without a refresh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+18
+18
system/public/aesthetic.computer/disks/chat.mjs
··· 399 399 // Clear handle colors cache on each boot so edits are picked up. 400 400 handleColorsCache.clear(); 401 401 402 + // Version polling — auto-reload on new deploy (same pattern as dumduel.mjs) 403 + (async () => { 404 + try { 405 + const res = await fetch("/api/version"); 406 + if (!res.ok) return; 407 + const info = await res.json(); 408 + const current = info.deployed; 409 + while (true) { 410 + try { 411 + const r = await fetch(`/api/version?current=${current}`); 412 + if (!r.ok) break; 413 + const data = await r.json(); 414 + if (data.changed !== false) { send?.({ type: "window:reload" }); break; } 415 + } catch { break; } 416 + } 417 + } catch {} 418 + })(); 419 + 402 420 // Store dom API reference for YouTube modal 403 421 domApi = dom; 404 422