diff --git a/app.js b/app.js index 342cd3b..a814240 100644 --- a/app.js +++ b/app.js @@ -625,8 +625,7 @@ function selectAgent(uuid) { hide("wizard-card"); loadKeys(uuid); - loadBackups(uuid); - loadAgentInfo(uuid); + loadAgentInfo(uuid).then(() => loadBackups(uuid)); loadContract(uuid); } @@ -745,16 +744,9 @@ function renderAgentInfo(info) { const port = stripQuotes(info.ssh_port); const sshCmd = `ssh root@${activeUUID}.derez.ai -p ${port}`; - // Check SSH flag from agents list - const agent = agents.find((a) => (a.UUID || a.uuid) === activeUUID); - const hasSSH = - agent && - !( - agent.SSH === null || - agent.SSH === undefined || - agent.SSH === "null" || - agent.SSH === false - ); + // Check SSH flag from agent info response + const sshRaw = stripQuotes(info.ssh); + const hasSSH = sshRaw !== "—" && sshRaw !== "0" && sshRaw !== "false"; const rows = [ `