Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

boot: recover cached handle on auth timeout, auto-setup session SSH

+37 -1
+24
.devcontainer/entry.fish
··· 139 139 log_warn "Vault env not found at $vault_env" 140 140 end 141 141 142 + # --- Setup session-server SSH key from vault --- 143 + set -l ss_key_src ~/aesthetic-computer-vault/session-server/session_server 144 + set -l ss_key_dst ~/.ssh/session_server 145 + if test -f $ss_key_src; and not test -f $ss_key_dst 146 + mkdir -p ~/.ssh 147 + cp $ss_key_src $ss_key_dst 148 + cp "$ss_key_src.pub" "$ss_key_dst.pub" 149 + chmod 600 $ss_key_dst 150 + chmod 644 "$ss_key_dst.pub" 151 + # Add SSH config entry if missing 152 + if not grep -q "Host session-server" ~/.ssh/config 2>/dev/null 153 + echo "" >> ~/.ssh/config 154 + echo "Host session-server" >> ~/.ssh/config 155 + echo " HostName 157.245.134.225" >> ~/.ssh/config 156 + echo " User root" >> ~/.ssh/config 157 + echo " IdentityFile ~/.ssh/session_server" >> ~/.ssh/config 158 + echo " IdentitiesOnly yes" >> ~/.ssh/config 159 + echo " StrictHostKeyChecking accept-new" >> ~/.ssh/config 160 + end 161 + log_ok "Session-server SSH key installed" 162 + else if not test -f $ss_key_src 163 + log_warn "Session-server SSH key not found in vault" 164 + end 165 + 142 166 log_step "PHASE 2: Checking for fast reload path" 143 167 144 168 # Fast path for VS Code "Reload Window" - if .waiter exists and key processes running, skip setup
+13 -1
system/public/aesthetic.computer/lib/disk.mjs
··· 14969 14969 ) { 14970 14970 console.warn("⚠️ session:started not received after 120 frames — proceeding without auth"); 14971 14971 sessionStarted = true; 14972 + // Try to recover handle from localStorage even without full auth 14973 + const cachedHandle = store["handle"]; 14974 + if (cachedHandle && !HANDLE) { 14975 + HANDLE = "@" + cachedHandle; 14976 + window.acHANDLE = HANDLE; 14977 + if (window.acBootCanvas?.setHandle) window.acBootCanvas.setHandle(HANDLE); 14978 + send({ type: "handle", content: HANDLE }); 14979 + console.log(`🔐 Recovered cached handle: ${HANDLE}`); 14980 + } 14972 14981 loadAfterPreamble?.(); 14973 14982 } 14974 14983 ··· 15002 15011 const RETRY_DELAYS = [500, 1000, 2000]; // Exponential backoff 15003 15012 15004 15013 if (USER) { 15014 + // Fast path: use handle already fetched by boot.mjs (via /user?withHandle=true) 15015 + const bootHandle = USER.handle; 15005 15016 // TODO: Check to see if this is in localStorage or not... 15006 - const storedHandle = store["handle"]; // || (await store.retrieve("handle")); 15017 + const storedHandle = bootHandle || store["handle"]; // || (await store.retrieve("handle")); 15007 15018 15008 15019 // console.log("Stored handle...", storedHandle); 15009 15020 ··· 15015 15026 if (window.acBootCanvas?.setHandle) window.acBootCanvas.setHandle(HANDLE); 15016 15027 send({ type: "handle", content: HANDLE }); 15017 15028 store["handle:received"] = true; 15029 + if (bootHandle) store["handle"] = bootHandle; // Cache boot-fetched handle 15018 15030 // console.log("Retrieved handle from store:", storedHandle); 15019 15031 return; // Leave early if a stored handle was found. 15020 15032 }