[object Object]

← back to Wallco Ai

admin-card: add created/flagged date+time chip to ghost-review + pass ts through flagged API (cactus-curator convention)

f35bb2b8d76189353e6c36e11d56c93706d680dd · 2026-05-27 14:57:28 -0700 · Steve

Files touched

Diff

commit f35bb2b8d76189353e6c36e11d56c93706d680dd
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed May 27 14:57:28 2026 -0700

    admin-card: add created/flagged date+time chip to ghost-review + pass ts through flagged API (cactus-curator convention)
---
 public/admin/ghost-review.html | 14 ++++++++++++++
 server.js                      |  1 +
 2 files changed, 15 insertions(+)

diff --git a/public/admin/ghost-review.html b/public/admin/ghost-review.html
index 8a75dfd..d48204f 100644
--- a/public/admin/ghost-review.html
+++ b/public/admin/ghost-review.html
@@ -72,6 +72,14 @@
     font:600 10px ui-monospace,Menlo,monospace;
     padding:2px 5px; border-radius:3px;
   }
+  .tile .when {
+    position:absolute; left:6px; bottom:6px;
+    background:rgba(31,24,8,.78); color:#fff;
+    font:600 9.5px var(--sans); letter-spacing:.02em;
+    font-variant-numeric:tabular-nums;
+    padding:2px 5px; border-radius:3px; max-width:62%;
+    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
+  }
   .tile.lbl-fp       { outline:3px solid var(--green);  outline-offset:-3px; }
   .tile.lbl-tp_ghost { outline:3px solid var(--red);    outline-offset:-3px; }
   .tile.lbl-tp_seam  { outline:3px solid var(--orange); outline-offset:-3px; }
@@ -623,6 +631,11 @@
 <script>
 (() => {
   const $ = (id) => document.getElementById(id);
+  function fmtDate(iso){
+    if(!iso) return '—';
+    const d = new Date(iso); if(isNaN(d)) return '—';
+    return d.toLocaleString(undefined, { year:'numeric', month:'short', day:'numeric', hour:'numeric', minute:'2-digit' });
+  }
   const STAT = { fp:0, ghost:0, seam:0, other:0, skip:0, total:0 };
 
   // State
@@ -848,6 +861,7 @@
         <img loading="lazy" src="${item.image_url}" alt="${item.id}">
         <div class="badge">${item.category || ''}</div>
         <div class="conf">${(item.confidence || 0).toFixed(2)}</div>
+        <div class="when" title="flagged ${item.created_at || ''}">🕓 ${fmtDate(item.created_at)}</div>
         ${pillText ? `<div class="verdict-pill">${pillText}</div>` : ''}
       `;
       tile.onclick = (e) => {
diff --git a/server.js b/server.js
index 42d2e08..504a540 100644
--- a/server.js
+++ b/server.js
@@ -1868,6 +1868,7 @@ app.get('/api/ghost-review/flagged', (req, res) => {
         confidence: r.confidence,
         reason: r.reason,
         image_url: r.image_url || ('/designs/img/by-id/' + r.id),
+        created_at: r.created_at || r.ts || null,   // flagged-at time = when this row entered the review queue
       });
     } catch {}
   }

← 08a8775 admin-card: add created date+time chip to dogs-curator + ret  ·  back to Wallco Ai  ·  admin-card: add created date+time chip to status-browser (ca cdb9f1c →