Show the mirror it is onboarded, and stop offering it owner-side actions
The phase-2 branch of the mirror panel returned the same Join partnership / Onboard block as the not-started state, so a finished onboard read as one that never ran.
This commit is contained in:
@@ -327,14 +327,16 @@ function vvRenderMirrorOnboard(opts) {
|
||||
// stopped being needed. Until then showing them costs nothing — a step already done reads as a
|
||||
// reminder, a step still needed and hidden is a dead end.
|
||||
if ((opts.phase ?? 0) >= 2) {
|
||||
return `<div style="padding:10px 12px;background:#0d0d0d;border:1px solid #1e1e1e;border-radius:4px;">
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;gap:10px;">
|
||||
<div>
|
||||
<div style="font-size:11px;color:#888;margin-bottom:2px;">Join partnership</div>
|
||||
<div style="font-size:9px;color:#333;">SSH key ready · notifies ${owner} to run Phase 2</div>
|
||||
</div>
|
||||
<button class="vv-pt-action-btn run" onclick="vvPtOnboard(this)" ${dis}
|
||||
style="font-size:11px;white-space:nowrap;">▶ Onboard</button>
|
||||
// Done state. This used to return the same "Join partnership · ▶ Onboard" panel as the
|
||||
// not-started state, under a comment saying it collapsed — so a fully onboarded mirror
|
||||
// rendered as one that had never run, and the only honest reading of the screen was that
|
||||
// nothing had happened. The button is gone rather than disabled: there is nothing left for
|
||||
// the mirror to initiate, and Phase 2 is re-run from the owner.
|
||||
return `<div style="padding:10px 12px;background:#0a0f0a;border:1px solid #1a3a1a;border-radius:4px;">
|
||||
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;">
|
||||
<span style="font-size:10px;font-weight:600;color:#4caf50;background:#0a1a0a;
|
||||
padding:2px 9px;border-radius:10px;border:1px solid #1a4a1a;">Partnership active</span>
|
||||
<span style="font-size:9px;color:#444;">onboarded by ${owner} · nothing further to do here</span>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
@@ -1163,8 +1163,8 @@ function _renderActions(nodes, cfg) {
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:flex;flex-direction:column;gap:5px;align-items:flex-end;">
|
||||
<button class="vv-pt-action-btn info" onclick="vvPtPhase2(this,'${remote.id}')"
|
||||
style="font-size:10px;" title="Re-run Phase 2">↻ Re-run</button>
|
||||
${isOwner ? `<button class="vv-pt-action-btn info" onclick="vvPtPhase2(this,'${remote.id}')"
|
||||
style="font-size:10px;" title="Re-run Phase 2">↻ Re-run</button>` : ''}
|
||||
<button class="vv-pt-action-btn warn" onclick="vvPtShowDeleteKeys('${remote.id}')"
|
||||
style="opacity:.4;font-size:10px;">🗑 Keys</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user