[object Object]

← back to Wallco Ai

Add addToIndex(): surface curator-published designs on the storefront immediately (mirror of dropFromIndex) — overrides stale snapshot user_removed/is_published + aesthetic gate; PDP now 200. Grid-listing filter gap remains (structure-matrix)

7e0d6678273be89aa9634f78c31a1cb16593891a · 2026-05-29 13:07:04 -0700 · Steve

Files touched

Diff

commit 7e0d6678273be89aa9634f78c31a1cb16593891a
Author: Steve <steve@designerwallcoverings.com>
Date:   Fri May 29 13:07:04 2026 -0700

    Add addToIndex(): surface curator-published designs on the storefront immediately (mirror of dropFromIndex) — overrides stale snapshot user_removed/is_published + aesthetic gate; PDP now 200. Grid-listing filter gap remains (structure-matrix)
---
 server.js | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/server.js b/server.js
index b76870f..4000b01 100644
--- a/server.js
+++ b/server.js
@@ -2034,12 +2034,14 @@ function addToIndex(ids) {
   for (const id of set) {
     if (have.has(id)) { const d = DESIGNS.find(x => x.id === id); if (d) d.is_published = true; continue; }
     const src = map.get(id);
-    if (!src || src.user_removed) continue;
-    // A curator publish is an explicit human override of the load-time aesthetic
-    // gate (passesAestheticGate drops e.g. ≥4-bucket drunk-animals). Tag it
-    // 'curator-force-publish' so the gate exempts it, and DON'T re-gate here —
-    // otherwise the design would publish in PG but never surface in DESIGNS.
-    const entry = Object.assign({}, src, { is_published: true });
+    if (!src) continue;
+    // A curator publish is an explicit human override of the load-time gates.
+    // designs.json (the snapshot) often carries STALE user_removed=true /
+    // is_published=false from when the design was last unpublished — publishing
+    // it now means neither holds. Override both + tag 'curator-force-publish' so
+    // passesAestheticGate exempts it. Don't re-gate (drunk-animals are ≥4-bucket
+    // and would otherwise be dropped from DESIGNS).
+    const entry = Object.assign({}, src, { is_published: true, user_removed: false });
     entry.tags = (Array.isArray(entry.tags) ? entry.tags.filter(t => t !== 'curator-force-publish') : []).concat('curator-force-publish');
     DESIGNS.push(entry); have.add(id); n++;
   }

← 49dcd87 feat(designs grid): admin-only theme1/theme2 toggle on /desi  ·  back to Wallco Ai  ·  addToIndex: derive filename from image_url so designHasImage c090fe6 →