[object Object]

← back to Wallco Ai

curator A5: per-card 'Bake adjustment' button on grid cards (reuses bake path, neutral-guarded, decide binding scoped to [data-a])

cabd7d169120c29c9acf22c2a7d8afcf227f170a · 2026-05-31 21:39:07 -0700 · Steve Abrams

Files touched

Diff

commit cabd7d169120c29c9acf22c2a7d8afcf227f170a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun May 31 21:39:07 2026 -0700

    curator A5: per-card 'Bake adjustment' button on grid cards (reuses bake path, neutral-guarded, decide binding scoped to [data-a])
---
 YOLO_BACKLOG_2026-05-31.md       |  3 ++-
 public/admin/cactus-curator.html | 16 ++++++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/YOLO_BACKLOG_2026-05-31.md b/YOLO_BACKLOG_2026-05-31.md
index b779434..1ed01c4 100644
--- a/YOLO_BACKLOG_2026-05-31.md
+++ b/YOLO_BACKLOG_2026-05-31.md
@@ -19,7 +19,7 @@ Self-contained in `public/admin/cactus-curator.html` — zero `server.js` risk,
 - [x] **A2 · Percent readouts** — browser-verified (Vivid sat 178·140%, Warm hue 110·-24°, Neutral ·100%) — — show the real filter math next to each slider (e.g. `Sat 158 · 124%`, `Hue +18°`, `Con 100%`) so the value is legible, not just the raw 0–255.
 - [x] **A3 · Live before/after chip** — browser-verified (sample #53856; before=none, after=live filter) — — a small sample swatch in the panel showing the current design (or a representative card) with vs without the filter, updating live as sliders move.
 - [x] **A4 · Apply filter to family-stack images** — `--img-adjust` now covers #bbstack img — — the `--img-adjust` filter currently hits `#grid img` + `#modal img`; extend to `#bbstack img` so the by-base colorway stack previews the adjustment too.
-- [ ] **A5 · Per-card Bake from grid** — a hover "⤓ Bake" affordance on each card that bakes the current adjustment for that design without opening the modal (reuses `bakeAdjustment`).
+- [x] **A5 · Per-card Bake from grid** — browser-verified (card #53856 bake btn; decide btns still data-a-only; neutral guard fires no-POST) — — a hover "⤓ Bake" affordance on each card that bakes the current adjustment for that design without opening the modal (reuses `bakeAdjustment`).
 - [ ] **A6 · Copy-filter-CSS dev aid** — a tiny "copy CSS" button that copies the current `filter:` string to clipboard (useful for porting the look elsewhere).
 - [ ] **A7 · Bake confirmation guard** — when baking, if the adjustment is extreme (e.g. saturate >2× or brightness <0.5×), show a one-line "looks extreme — bake anyway?" inline confirm before POSTing, to avoid accidental wild bakes.
 - [ ] **A8 · Reset-all + keyboard** — `0` key (when panel open) resets to neutral; `[`/`]` nudge the focused slider; document in the panel's note line.
@@ -39,3 +39,4 @@ TICK · TIMESTAMP · ITEM · STATUS · COMMIT
 - T2 · 2026-05-31 21:11 · A2 percent readouts · done · (commit below)
 - T3 · 2026-05-31 21:14 · A3 before/after chip · done · (commit below)
 - T4 · 2026-05-31 21:15 · A4 family-stack filter · done · (commit below)
+- T5 · 2026-05-31 21:37 · A5 per-card bake · done · (commit below)
diff --git a/public/admin/cactus-curator.html b/public/admin/cactus-curator.html
index d01e745..09bd962 100644
--- a/public/admin/cactus-curator.html
+++ b/public/admin/cactus-curator.html
@@ -107,6 +107,8 @@
   .acts .live  { border-color:#1f4d2a; color:#9ff0a6; }
   .acts .etsy  { border-color:#5a3f17; color:#ffb86b; }
   .acts .unpub { border-color:#3a3f44; color:#a8b3bc; }
+  .acts .bakebtn { border-color:#1f4a5a; color:#7fe3ff; background:#13262d; }
+  .acts .bakebtn:disabled { opacity:.6; }
 
   /* Haiku-vision verdict chip — appears on cards where the haiku-weekend pass flagged a defect */
   .b.haiku { background:#4a1f5a; color:#f2c8ff; font-weight:700; }
@@ -519,6 +521,7 @@ function card(d, idx){
       <button class="live"  data-a="live"      title="Publish — go live in the web viewer (4)">✓ Publish <kbd>4</kbd></button>
       <button class="etsy"  data-a="etsy"      title="Send to Etsy bucket (5) — removes from new-design pool, queues for digital download listing">🛒 Etsy <kbd>5</kbd></button>
       <button class="unpub" data-a="unpublish" title="Take down from live catalog (6) — sets is_published=FALSE, reversible via Publish">📴 Unpublish <kbd>6</kbd></button>
+      <button class="bakebtn" data-bake="${d.id}" style="grid-column:1/-1" title="Bake the current 🎨 Adjust settings onto this image as a NEW unpublished design (original untouched). Set the Adjust sliders off neutral first.">⤓ Bake adjustment</button>
     </div>`;
 
   el.querySelector('.sel-box').addEventListener('click', e => { e.stopPropagation(); toggleSel(d.id, el); });
@@ -542,8 +545,13 @@ function card(d, idx){
     e.preventDefault();
     window.open('/design/' + d.id, '_blank', 'noopener');   // PDP — customer product page, no admin token
   });
-  el.querySelectorAll('.acts button').forEach(b =>
+  el.querySelectorAll('.acts button[data-a]').forEach(b =>
     b.addEventListener('click', () => decide(d.id, b.dataset.a, el)));
+  // A5 — per-card bake (no modal): reuse the same canvas→/api/design/:id/bake path
+  el.querySelector('.acts [data-bake]')?.addEventListener('click', e => {
+    e.stopPropagation();
+    bakeAdjustment(d.id, e.currentTarget);
+  });
   // SHIFT+drag on the image → draw a dotted "bad area" box (id BAD elements for fixing)
   const thumb = el.querySelector('.thumb');
   thumb.addEventListener('mousedown', e => {
@@ -1073,7 +1081,11 @@ async function openDetail(id){
 async function bakeAdjustment(id, btn){
   const msg = document.getElementById('bakeMsg');
   const filter = (window.ccAdjust && window.ccAdjust.filterString());
-  if (!filter){ if(msg){ msg.style.color='var(--mut)'; msg.textContent='Move the 🎨 Adjust sliders off neutral first — nothing to bake.'; } return; }
+  if (!filter){
+    if(msg){ msg.style.color='var(--mut)'; msg.textContent='Move the 🎨 Adjust sliders off neutral first — nothing to bake.'; }
+    else { const o=btn.textContent; btn.textContent='set 🎨 Adjust first'; setTimeout(()=>{btn.textContent=o;},1600); }
+    return;
+  }
   const orig = btn.textContent; btn.disabled = true; btn.textContent = 'Baking…';
   if (msg){ msg.style.color='var(--mut)'; msg.textContent=''; }
   try{

← fea3eea Add read-only room-mockup coverage audit (2026-06-01): over-  ·  back to Wallco Ai  ·  curator A6: 'Copy CSS' button — copies current filter string ab93f20 →