interactive intro to open social at-me.zzstoatzz.io

chore: remove debug console.log statements for production

cleaned up all debug logging from app.js while preserving essential error logging with console.error. removed verbose firehose event logs, guestbook state logs, and app circle management logs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+6 -62
+6 -62
static/app.js
··· 1223 1223 } 1224 1224 1225 1225 function createFirehoseParticle(event) { 1226 - console.log('[createFirehoseParticle] called with:', event); 1227 - 1228 1226 // Get target identity/PDS position (where data is written) 1229 1227 const identity = document.querySelector('.identity'); 1230 - if (!identity) { 1231 - console.log('[createFirehoseParticle] no identity element found'); 1232 - return; 1233 - } 1228 + if (!identity) return; 1234 1229 1235 1230 const identityRect = identity.getBoundingClientRect(); 1236 1231 const endX = identityRect.left + identityRect.width / 2; ··· 1238 1233 1239 1234 // Get source app circle position (where the action happened) 1240 1235 let appCircle = document.querySelector(`[data-namespace="${event.namespace}"]`); 1241 - console.log('[createFirehoseParticle] appCircle exists?', !!appCircle, 'for namespace:', event.namespace); 1242 1236 1243 1237 // If app circle doesn't exist and this is a create event, add it dynamically 1244 1238 if (!appCircle && event.action === 'create') { 1245 - console.log('[createFirehoseParticle] creating new app circle for', event.namespace); 1246 - 1247 1239 // Reverse namespace for URL (app.at-me -> at-me.app) 1248 1240 const displayName = event.namespace.split('.').reverse().join('.'); 1249 1241 const url = `https://${displayName}`; 1250 - console.log('[createFirehoseParticle] displayName:', displayName, 'url:', url); 1251 1242 1252 1243 // Add the app circle with the collection from the event 1253 1244 if (globalApps && !globalApps[event.namespace]) { 1254 - console.log('[createFirehoseParticle] adding to globalApps with collection:', event.collection); 1255 1245 globalApps[event.namespace] = [event.collection]; 1256 - 1257 - // Trigger visual update by calling addAppCircle 1258 - console.log('[createFirehoseParticle] calling addAppCircle'); 1259 1246 addAppCircle(event.namespace, url); 1260 - 1261 - // Get the newly created circle 1262 1247 appCircle = document.querySelector(`[data-namespace="${event.namespace}"]`); 1263 - console.log('[createFirehoseParticle] circle created?', !!appCircle); 1264 - } else { 1265 - console.log('[createFirehoseParticle] skipping - globalApps exists?', !!globalApps, 'already has namespace?', globalApps && globalApps[event.namespace]); 1266 1248 } 1267 1249 } 1268 1250 ··· 1296 1278 } 1297 1279 1298 1280 function connectFirehose() { 1299 - console.log('[Firehose] connectFirehose called, did =', did, 'existing connection?', !!firehoseEventSource); 1300 - if (!did || firehoseEventSource) { 1301 - console.warn('[Firehose] Exiting early - did:', did, 'firehoseEventSource:', firehoseEventSource); 1302 - return; 1303 - } 1281 + if (!did || firehoseEventSource) return; 1304 1282 1305 1283 const url = `/api/firehose/watch?did=${encodeURIComponent(did)}`; 1306 - console.log('[Firehose] Connecting to:', url); 1307 - 1308 1284 firehoseEventSource = new EventSource(url); 1309 1285 1310 1286 const watchBtn = document.getElementById('watchLiveBtn'); 1311 1287 const watchLabel = watchBtn.querySelector('.watch-label'); 1312 1288 1313 1289 firehoseEventSource.onopen = () => { 1314 - console.log('Firehose connected'); 1315 1290 watchLabel.textContent = 'watching...'; 1316 1291 watchBtn.classList.add('active'); 1317 1292 }; 1318 1293 1319 1294 firehoseEventSource.onmessage = (e) => { 1320 - console.log('[Firehose] RAW message received:', e.data); 1321 1295 try { 1322 1296 const data = JSON.parse(e.data); 1323 - console.log('[Firehose] Parsed message:', data); 1324 1297 1325 1298 // Skip connection message 1326 - if (data.type === 'connected') { 1327 - console.log('Firehose connection established'); 1328 - return; 1329 - } 1330 - 1331 - console.log('[Firehose] Processing event:', data); 1299 + if (data.type === 'connected') return; 1332 1300 1333 1301 // Create particle animation 1334 1302 createFirehoseParticle(data); ··· 1379 1347 1380 1348 // Toggle watch live 1381 1349 document.addEventListener('DOMContentLoaded', () => { 1382 - console.log('[Firehose] DOMContentLoaded fired, setting up watch button'); 1383 1350 const watchBtn = document.getElementById('watchLiveBtn'); 1384 - if (!watchBtn) { 1385 - console.error('[Firehose] Watch button not found!'); 1386 - return; 1387 - } 1351 + if (!watchBtn) return; 1388 1352 1389 - console.log('[Firehose] Watch button found, attaching click handler'); 1390 1353 const watchLabel = watchBtn.querySelector('.watch-label'); 1391 1354 1392 1355 function startWatching() { 1393 - if (isWatchingLive) return; // already watching 1356 + if (isWatchingLive) return; 1394 1357 1395 - console.log('[Firehose] Starting watch mode'); 1396 1358 isWatchingLive = true; 1397 1359 watchLabel.textContent = 'connecting...'; 1398 1360 initFirehoseCanvas(); ··· 1406 1368 } 1407 1369 1408 1370 function stopWatching() { 1409 - if (!isWatchingLive) return; // not watching 1371 + if (!isWatchingLive) return; 1410 1372 1411 - console.log('[Firehose] Stopping watch mode'); 1412 1373 isWatchingLive = false; 1413 1374 watchLabel.textContent = 'watch live'; 1414 1375 watchBtn.classList.remove('active'); ··· 1428 1389 } 1429 1390 1430 1391 watchBtn.addEventListener('click', () => { 1431 - console.log('[Firehose] Watch button clicked! isWatchingLive was:', isWatchingLive); 1432 - 1433 1392 if (isWatchingLive) { 1434 1393 stopWatching(); 1435 1394 } else { ··· 1440 1399 // Check for watching parameter on load 1441 1400 const urlParams = new URLSearchParams(window.location.search); 1442 1401 if (urlParams.get('watching') === 'true') { 1443 - console.log('[Firehose] Auto-starting watch mode from URL parameter'); 1444 1402 startWatching(); 1445 1403 } 1446 1404 }); ··· 1686 1644 1687 1645 // Function to remove an app circle from the UI 1688 1646 function removeAppCircle(namespace) { 1689 - console.log('[removeAppCircle] removing circle for namespace:', namespace); 1690 - 1691 1647 // Find and remove the DOM element 1692 1648 const appElement = document.querySelector(`.app-view [data-namespace="${namespace}"]`)?.closest('.app-view'); 1693 1649 if (appElement) { 1694 1650 appElement.remove(); 1695 - console.log('[removeAppCircle] removed DOM element'); 1696 1651 } 1697 1652 1698 1653 // Remove from globalApps 1699 1654 if (globalApps && globalApps[namespace]) { 1700 1655 delete globalApps[namespace]; 1701 - console.log('[removeAppCircle] removed from globalApps'); 1702 1656 } 1703 1657 1704 1658 // Reposition remaining circles 1705 1659 repositionAppCircles(); 1706 - console.log('[removeAppCircle] repositioned remaining circles'); 1707 1660 } 1708 1661 1709 1662 // Check auth status on page load ··· 1762 1715 1763 1716 const signatures = await response.json(); 1764 1717 pageOwnerHasSigned = signatures.some(sig => sig.did === did || sig.did === `at://${did}`); 1765 - console.log('[Guestbook] Page owner signed?', pageOwnerHasSigned); 1766 1718 updateGuestbookSign(); 1767 1719 return pageOwnerHasSigned; 1768 1720 } catch (error) { ··· 1799 1751 signGuestbookBtn.style.cursor = ''; 1800 1752 1801 1753 const viewingOwnPage = isAuthenticated && authenticatedDid === did; 1802 - 1803 - console.log('[Guestbook] Button update:', { 1804 - isAuthenticated, 1805 - authenticatedDid, 1806 - pageDid: did, 1807 - viewingOwnPage, 1808 - pageOwnerHasSigned 1809 - }); 1810 1754 1811 1755 // If page owner has already signed, show "signed" state (regardless of who's viewing) 1812 1756 if (pageOwnerHasSigned) {