Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

silo/dashboard: hoist feedLoaded/telemetryLoaded past setTab call

setTab(activeTab) runs synchronously during tab wiring, before the
`let feedLoaded` / `let telemetryLoaded` declarations further down
in the script. If activeTab was 6 (feed) or 7 (telemetry) from a
cached silo-tab localStorage value, the short-circuit check
`!feedLoaded` hit the temporal-dead-zone and threw:

Uncaught ReferenceError: Cannot access 'feedLoaded'
before initialization

Moved both declarations up to sit above setTab, leaving comment
stubs at the old sites.

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

+10 -2
+10 -2
silo/dashboard.html
··· 1700 1700 const tabBtns = document.querySelectorAll('.tab-btn'); 1701 1701 const panels = document.querySelectorAll('[data-panel]'); 1702 1702 1703 + // Hoisted ahead of setTab() call below — these are set when their 1704 + // respective tabs first load. Declared here (rather than further down) 1705 + // to avoid let/const temporal-dead-zone errors when setTab(activeTab) 1706 + // runs synchronously at end of tab setup and activeTab happens to 1707 + // point at a lazy-loaded tab (feed=6, telemetry=7). 1708 + let feedLoaded = false; 1709 + let telemetryLoaded = false; 1710 + 1703 1711 function setTab(idx) { 1704 1712 activeTab = idx; 1705 1713 localStorage.setItem('silo-tab', idx); ··· 1757 1765 1758 1766 // --- feed tab --- 1759 1767 // --- telemetry tab --- 1760 - let telemetryLoaded = false; 1768 + // telemetryLoaded hoisted near top of script (before setTab call). 1761 1769 async function loadTelemetry() { 1762 1770 telemetryLoaded = true; 1763 1771 try { ··· 1808 1816 } 1809 1817 } 1810 1818 1811 - let feedLoaded = false; 1819 + // feedLoaded hoisted near top of script (before setTab call). 1812 1820 async function loadFeed() { 1813 1821 feedLoaded = true; 1814 1822 try {