Stop the host card claiming it is waiting for a partner after the onboard was cancelled

This commit is contained in:
Gmer4Lfe
2026-08-17 07:23:48 -04:00
parent bc9692f521
commit 9d2610a911
+12 -3
View File
@@ -848,10 +848,19 @@ function _nodeCard(node) {
// Onboard phase badge (remote nodes) or local-done badge (self)
const phase = node.onboard_phase;
// The self badge keys off partnership state, not off local_done alone.
//
// local_done means this host ran its own local partnership setup, and stays true after a
// cancel or an offboard — correctly, because that setup was not undone. But the badge read
// "waiting for partner" from that flag alone, so cancelling an onboard left the card claiming
// a handshake was still in flight when the keys had just been deleted and there was nothing
// to wait for.
//
// ACTIVE needs no badge at all: the card's own partnership row already says so, and repeating
// it as a "setup complete" note reads like something still pending.
const phaseHtml = node.is_me
? (node.local_done
? `<div style="font-size:10px;color:#4caf50;margin-bottom:6px;padding:2px 6px;background:#0a1a0a;border:1px solid #2a5a2a;border-radius:3px;">✓ Local setup complete · waiting for partner</div>`
: '')
? (!node.local_done || ptState === 'ACTIVE' ? ''
: `<div style="font-size:10px;color:#4caf50;margin-bottom:6px;padding:2px 6px;background:#0a1a0a;border:1px solid #2a5a2a;border-radius:3px;">✓ Local setup complete · no partner onboarded</div>`)
: (phase === 2 ? '' :
phase === 1 ? `<div style="font-size:10px;color:#ff9800;margin-bottom:6px;padding:2px 6px;background:#1a1200;border:1px solid #3a2800;border-radius:3px;">⏳ SSH ready · awaiting onboard</div>` :
node.key_ready ? `<div style="font-size:10px;color:#ff9800;margin-bottom:6px;padding:2px 6px;background:#1a1200;border:1px solid #3a2800;border-radius:3px;">🔑 Key generated · install on HOST2 then Push Conf</div>` :