Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

notepat-remote: dump first 15 events + probe bridge at boot

+21 -4
+21 -4
system/public/aesthetic.computer/disks/notepat-remote.mjs
··· 195 195 wipe(8, 10, 18); 196 196 cursor?.("native"); 197 197 connectWs(); 198 + // Quick bridge probe — reports whether jweb~ has injected window.max yet 199 + // by the time boot runs. 200 + const initialBridge = !!maxBridge(); 201 + console.log(`🎹 boot bridge=${initialBridge}`); 202 + // And again one tick later in case jweb~ injects window.max just after boot. 203 + setTimeout(() => { 204 + console.log(`🎹 boot+50ms bridge=${!!maxBridge()}`); 205 + }, 50); 206 + setTimeout(() => { 207 + console.log(`🎹 boot+500ms bridge=${!!maxBridge()}`); 208 + }, 500); 198 209 } 199 210 200 211 function sim() { 201 212 frame += 1; 202 213 if (wsState === "closed" && frame >= reconnectAt) connectWs(); 203 214 } 215 + 216 + let eventsSeen = 0; 204 217 205 218 function act({ event: e }) { 206 219 if (!e?.is) return; 220 + // Dump first ~15 events of any kind so we can see what actually propagates 221 + // into the piece from jweb~. `name` is the AC event type string. 222 + if (eventsSeen < 15) { 223 + eventsSeen += 1; 224 + const name = e.name || "?"; 225 + const bridge = !!maxBridge(); 226 + console.log(`🎹 evt#${eventsSeen} ${name} key=${e.key || ""} bridge=${bridge}`); 227 + } 207 228 // Click-to-test-note: tap anywhere on the device UI fires C4 so we can 208 229 // verify the Max bridge path without depending on keyboard focus. 209 230 if (e.is("touch")) { ··· 213 234 if (e.is("lift")) { 214 235 releaseLocalKey("c"); 215 236 return; 216 - } 217 - // Best-effort debug: log raw keyboard events to Max console. 218 - if (e.is("keyboard:down") || e.is("keyboard:up")) { 219 - console.log(`🎹 kbd ${e.key || e.name || "?"}`); 220 237 } 221 238 for (const key of Object.keys(KEY_TO_PITCH)) { 222 239 if (e.is(`keyboard:down:${key}`)) {