Stop counting a gated-off critical rsync as an unreachable partner, and report the counter in the unit it is stored in
The guard tested Tier 1 only, so onboard Step 1d's posture — Tier 1 open, every Tier 2 closed — made a healthy partner climb toward auto-offboard every 30 minutes. The counter holds intervals, not days, and was rendered raw.
This commit is contained in:
@@ -687,9 +687,12 @@ function _renderOfflineWarn(cfg) {
|
||||
const days = cfg.offline_days;
|
||||
const thr = cfg.offline_threshold || 30;
|
||||
// Auto-offboard only runs for active partnerships — a stale counter while disabled is meaningless.
|
||||
// The 1-day floor is what keeps a single missed 30-minute check from raising a banner: the
|
||||
// counter ticks per interval, so one tick is half an hour, not a day.
|
||||
if (!cfg.enabled || !days || days < 1) { el.style.display = 'none'; el.innerHTML = ''; return; }
|
||||
const daysTxt = days < 10 ? days.toFixed(1) : Math.round(days);
|
||||
|
||||
const left = Math.max(0, thr - days);
|
||||
const left = Math.max(0, Math.round(thr - days));
|
||||
const crit = left <= 5;
|
||||
const col = crit ? '#f44336' : '#ff9800';
|
||||
const bg = crit ? '#2a1212' : '#1a1200';
|
||||
@@ -697,7 +700,7 @@ function _renderOfflineWarn(cfg) {
|
||||
el.style.display = '';
|
||||
el.innerHTML = `<div class="vv-card" style="background:${bg};border-color:${col};">
|
||||
<div style="display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;">
|
||||
<span style="font-size:12px;color:${col};font-weight:600;">⚠ Partner unreachable ${days} day${days===1?'':'s'}</span>
|
||||
<span style="font-size:12px;color:${col};font-weight:600;">⚠ Partner unreachable ${daysTxt} day${daysTxt==="1.0"||daysTxt===1?"":"s"}</span>
|
||||
<span style="font-size:11px;color:#888;">Auto-offboard in ${left} day${left===1?'':'s'} (threshold ${thr}d)</span>
|
||||
</div>
|
||||
<div style="margin-top:6px;height:5px;background:#000;border-radius:3px;overflow:hidden;">
|
||||
|
||||
Reference in New Issue
Block a user