← back to Dw Fleet Registry
viewer: 'Hide redirect dupes' toggle (default on) — folds 6 near-dup redirect domains into their canonical card with a +N alias badge
6392f46080145e6f8a84c933a64ffe25b0dd5fc0 · 2026-06-01 13:40:36 -0700 · SteveStudio2
Files touched
Diff
commit 6392f46080145e6f8a84c933a64ffe25b0dd5fc0
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Mon Jun 1 13:40:36 2026 -0700
viewer: 'Hide redirect dupes' toggle (default on) — folds 6 near-dup redirect domains into their canonical card with a +N alias badge
---
viewer/index.html | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/viewer/index.html b/viewer/index.html
index a8a121c..7bfd4fa 100644
--- a/viewer/index.html
+++ b/viewer/index.html
@@ -55,6 +55,7 @@
</div>
<div class="ctl">Density <input type="range" id="density" min="3" max="8" value="5"></div>
<div class="ctl"><input type="search" id="q" placeholder="filter domains…"></div>
+ <label class="ctl" style="cursor:pointer"><input type="checkbox" id="dedupe" checked> Hide redirect dupes</label>
<button id="reprobe">↻ Re-probe live</button>
</div>
</header>
@@ -69,7 +70,12 @@ const accentOf = s => (s.local&&s.local.port?null:null) || (s.manifest&&s.manife
function render(){
const q = $('#q').value.trim().toLowerCase();
const sort = $('#sort').value;
+ const dedupe = $('#dedupe').checked;
+ // Map each canonical domain -> list of redirect aliases that fold into it.
+ const aliasOf = {}; for(const s of SITES){ if(s.shouldRedirectTo){ (aliasOf[s.shouldRedirectTo]=aliasOf[s.shouldRedirectTo]||[]).push(s.domain); } }
let rows = SITES.filter(s => !q || s.domain.includes(q) || (s.siteName||'').toLowerCase().includes(q));
+ // When deduping, drop the non-canonical redirect siblings; they fold into their canonical card.
+ if(dedupe) rows = rows.filter(s => !s.shouldRedirectTo);
const cmp = {
domain:(a,b)=>a.domain.localeCompare(b.domain),
status:(a,b)=>(a.live?.state||'z').localeCompare(b.live?.state||'z')||a.domain.localeCompare(b.domain),
@@ -87,7 +93,8 @@ function render(){
const stClass = st==='live'?'live':st==='parked'?'parked':(st==='unreachable'||st==='timeout'||st==='error')?'down':'';
const serving = (s.servingModes||[]).map(m=>m==='standalone-node'?'local':'manifest');
const redir = s.shouldRedirectTo ? '<span class="b redir">→ '+s.shouldRedirectTo.replace(/\\.com$/,'')+'</span>' : '';
- const canon = (s.isCanonical) ? '<span class="b canon">canonical</span>' : '';
+ const aliases = aliasOf[s.domain] || [];
+ const canon = (s.isCanonical) ? '<span class="b canon">canonical</span>'+(dedupe&&aliases.length?'<span class="b redir" title="'+aliases.join(', ')+'">+'+aliases.length+' alias</span>':'') : '';
a.innerHTML =
'<div class="accentbar" style="background:'+s._accent+'"></div>'+
'<div class="thumb" data-domain="'+s.domain+'" style="background-color:'+s._accent+'22"><div class="ph">'+(s.siteName||s.domain).slice(0,18)+'</div></div>'+
@@ -126,7 +133,8 @@ async function load(){
$('#summary').textContent = (sm.totalDomains||SITES.length)+' domains · '+(sm.localMicrosites||0)+' local + '+(sm.manifestDomains||0)+' manifest · '+(tally.live||0)+' live'+(reg.probeSummary?' · probed '+new Date(reg.probeSummary.probedAt).toLocaleString():'');
render();
}
-$('#sort').onchange=render; $('#q').oninput=render;
+$('#sort').onchange=render; $('#q').oninput=render; $('#dedupe').onchange=()=>{localStorage['dwfleet-dedupe']=$('#dedupe').checked?'1':'0';render();};
+if(localStorage['dwfleet-dedupe']==='0') $('#dedupe').checked=false;
$('#density').oninput=e=>document.documentElement.style.setProperty('--cols', e.target.value);
// persist controls
for(const id of ['sort','density']){ const el=$('#'+id); const k='dwfleet-'+id; if(localStorage[k]){ el.value=localStorage[k]; if(id==='density')document.documentElement.style.setProperty('--cols',el.value);} el.addEventListener('change',()=>localStorage[k]=el.value); el.addEventListener('input',()=>localStorage[k]=el.value); }
← 80203d0 fleet fan-out engine + hero ledger: 4 sites rebuilt (jute+me
·
back to Dw Fleet Registry
·
viewer: pre-resolve+validate hero images into registry, rend 4204905 →