← back to Wallco Ai
cactus-curator: add ★ top-N rank pill + ✨ fresh chip (24h) to card badges — ported from drunk-curator ID-cue pattern
82cafd8ffb54dbb4eda763179e2ee20d4aab199f · 2026-05-28 10:00:54 -0700 · Steve Abrams
Files touched
M public/admin/cactus-curator.html
Diff
commit 82cafd8ffb54dbb4eda763179e2ee20d4aab199f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu May 28 10:00:54 2026 -0700
cactus-curator: add ★ top-N rank pill + ✨ fresh chip (24h) to card badges — ported from drunk-curator ID-cue pattern
---
public/admin/cactus-curator.html | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/public/admin/cactus-curator.html b/public/admin/cactus-curator.html
index 18778fb..f90d8b3 100644
--- a/public/admin/cactus-curator.html
+++ b/public/admin/cactus-curator.html
@@ -40,6 +40,9 @@
.b.tif { background:#2a6b35; color:#dff5e0; } .b.notif { background:#5a4030; color:#ffd0a8; opacity:.75; }
.b.pass { background:#2e7d32; } .b.warn { background:#b07a00; } .b.fail { background:#a13030; } .b.none{background:#555;}
.b.reason { background:#e11d2a; color:#fff; font-weight:800; letter-spacing:.02em; box-shadow:0 1px 4px rgba(0,0,0,.4); }
+ /* Drunk-curator wins ported here — extra ID cues at the top of the queue */
+ .b.fresh { background:#0b6d3a; } /* ✨ created in last 24h */
+ .b.toprank { background:#b5891a; color:#1a1a1a; font-weight:800; } /* ★ top-N by composite rank */
.state { position:absolute; bottom:0; left:0; right:0; padding:18px 6px 5px; font-size:11px; font-weight:700; text-align:center;
color:#fff; background:linear-gradient(transparent,rgba(0,0,0,.8)); z-index:2; display:none; }
/* Seam-mismatch callout — the common repeat-break error */
@@ -294,7 +297,12 @@ function failReason(d){
return [...new Set(reasons)];
}
-function card(d){
+// Top-N rank chip threshold + fresh-window — at-a-glance "this is the strongest
+// few" and "this just came out of the gen pipeline" cues, ported from drunk-curator.
+const TOP_RANK_N = 10;
+const FRESH_MS = 24 * 3600 * 1000;
+function isFreshIso(iso){ if(!iso) return false; try{ return (Date.now() - new Date(iso).getTime()) < FRESH_MS; }catch{return false;} }
+function card(d, idx){
const el = document.createElement('div');
el.className = 'card';
el.dataset.id = d.id;
@@ -322,6 +330,8 @@ function card(d){
<div class="thumb">
<div class="sel-box" title="select (x)"></div>
<div class="badges">
+ ${(idx != null && idx < TOP_RANK_N) ? `<span class="b toprank" title="top ${TOP_RANK_N} by current sort">★ top ${idx+1}</span>` : ''}
+ ${isFreshIso(d.created_at) ? `<span class="b fresh" title="created in the last 24h">✨ fresh</span>` : ''}
<span class="b rank">${rank!=null? '#'+Math.round(rank) : '—'}</span>
<span class="b ${d.is_published?'pub':'unpub'}">${d.is_published?'PUB':'unpub'}</span>
${d.web_viewer?'<span class="b web">WEB</span>':''}
@@ -480,7 +490,8 @@ function render(){
grid.innerHTML = '';
$('empty').style.display = list.length ? 'none' : 'block';
const frag = document.createDocumentFragment();
- for(const d of list) frag.appendChild(card(d));
+ // Pass position-in-sorted-list so card() can render the ★ top-N rank pill on the front of the queue.
+ list.forEach((d, i) => frag.appendChild(card(d, i)));
grid.appendChild(frag);
updateStat();
}
← 1097a55 cactus-curator: fix regex typo in TIF-path basename extracto
·
back to Wallco Ai
·
unpublish endpoint: read+write the catalog snapshot (in-memo a04f46c →