[object Object]

← back to Designerwallcoverings

rotators: exclude showroom-tagged products from New Arrivals + Trending (TK-11307)

740956f0306a675a7d6b82c4e4acb0bac7ead23f · 2026-09-08 15:38:45 -0700 · steve

Both tag-syncs now key on isShowroomProduct (vendor-on-list OR 'Showroom' tag)
and select tags in the products query, so a shared-vendor showroom line (MDC)
can never enter the discovery flow even if it ranks into newest. Defense-in-depth
(current MDC leak into these rotators is 0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JDeaFL4eeREBZX79tc4cnr

Files touched

Diff

commit 740956f0306a675a7d6b82c4e4acb0bac7ead23f
Author: steve <steve@designerwallcoverings.com>
Date:   Tue Sep 8 15:38:45 2026 -0700

    rotators: exclude showroom-tagged products from New Arrivals + Trending (TK-11307)
    
    Both tag-syncs now key on isShowroomProduct (vendor-on-list OR 'Showroom' tag)
    and select tags in the products query, so a shared-vendor showroom line (MDC)
    can never enter the discovery flow even if it ranks into newest. Defense-in-depth
    (current MDC leak into these rotators is 0).
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01JDeaFL4eeREBZX79tc4cnr
---
 scripts/new-arrivals-daily/new-arrival-tag-sync.cjs | 8 ++++----
 scripts/trending-2026/trending-tag-sync.cjs         | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/new-arrivals-daily/new-arrival-tag-sync.cjs b/scripts/new-arrivals-daily/new-arrival-tag-sync.cjs
index 2ec9ce4..200c30e 100644
--- a/scripts/new-arrivals-daily/new-arrival-tag-sync.cjs
+++ b/scripts/new-arrivals-daily/new-arrival-tag-sync.cjs
@@ -23,7 +23,7 @@ const path = require('path');
 // Canonical showroom-vendor primitive (list + logic live in fix-live-board/config).
 // Showroom-only vendors are addressable-not-discoverable: they must NEVER be added to
 // the New Arrivals discoverability flow. Never hardcode a vendor — edit showroom-vendors.json. TK-11186.
-const { isShowroomVendor } = require(path.join(process.env.HOME, 'Projects/fix-live-board/config/showroom-vendor.cjs'));
+const { isShowroomProduct } = require(path.join(process.env.HOME, 'Projects/fix-live-board/config/showroom-vendor.cjs'));
 
 const TAG = 'New Arrival';
 const HOST = 'designer-laboratory-sandbox.myshopify.com';
@@ -65,7 +65,7 @@ async function fetchAll(searchQuery, { sortKey, reverse, cap } = {}) {
     const sort = sortKey ? `, sortKey:${sortKey}, reverse:${!!reverse}` : '';
     const q = `{ products(first:100, query:${JSON.stringify(searchQuery)}${sort}${after}){
       pageInfo{ hasNextPage endCursor }
-      nodes{ id vendor createdAt } } }`;
+      nodes{ id vendor createdAt tags } } }`;
     let r;
     try { r = await gql(q); } catch (e) { await sleep(2500); continue; }
     if (r.errors) {
@@ -115,8 +115,8 @@ async function runPool(ids, kind) {
   // Showroom-only vendors never enter the target (never get the tag added), and are
   // excluded from this reconciler's remove path — the dedicated, ledgered TK-11186
   // build-remove-tags.mjs owns the one-time showroom cleanup (restore-map + 90s gaps).
-  const showroomTaggedIds = new Set(tagged.filter(n => isShowroomVendor(n.vendor)).map(n => n.id));
-  const target = new Set(newest.filter(n => !isShowroomVendor(n.vendor)).map(n => n.id));
+  const showroomTaggedIds = new Set(tagged.filter(n => isShowroomProduct(n)).map(n => n.id));
+  const target = new Set(newest.filter(n => !isShowroomProduct(n)).map(n => n.id));
   const have = new Set(tagged.map(n => n.id));
   const toAdd = [...target].filter(id => !have.has(id));
   const toRemove = [...have].filter(id => !target.has(id) && !showroomTaggedIds.has(id));
diff --git a/scripts/trending-2026/trending-tag-sync.cjs b/scripts/trending-2026/trending-tag-sync.cjs
index 1a7995a..49c2fdf 100644
--- a/scripts/trending-2026/trending-tag-sync.cjs
+++ b/scripts/trending-2026/trending-tag-sync.cjs
@@ -20,7 +20,7 @@ const path = require('path');
 // Canonical showroom-vendor primitive (list + logic live in fix-live-board/config).
 // Showroom-only vendors are addressable-not-discoverable: they must NEVER be added to
 // the Trending discoverability flow. Never hardcode a vendor — edit showroom-vendors.json. TK-11186.
-const { isShowroomVendor } = require(path.join(process.env.HOME, 'Projects/fix-live-board/config/showroom-vendor.cjs'));
+const { isShowroomProduct } = require(path.join(process.env.HOME, 'Projects/fix-live-board/config/showroom-vendor.cjs'));
 
 const TAG = 'Trending Wallcovering Collection 2026';
 const HOST = 'designer-laboratory-sandbox.myshopify.com';
@@ -65,7 +65,7 @@ async function fetchAll(searchQuery, { sortKey, reverse, cap } = {}) {
     const sort = sortKey ? `, sortKey:${sortKey}, reverse:${!!reverse}` : '';
     const q = `{ products(first:100, query:${JSON.stringify(searchQuery)}${sort}${after}){
       pageInfo{ hasNextPage endCursor }
-      nodes{ id vendor createdAt } } }`;
+      nodes{ id vendor createdAt tags } } }`;
     let r;
     try { r = await gql(q); } catch (e) { await sleep(2500); continue; }
     if (r.errors) {
@@ -127,8 +127,8 @@ async function runPool(ids, kind) {
   // Showroom-only vendors never enter the target (never get the tag added), and are
   // excluded from this reconciler's remove path — the dedicated, ledgered TK-11186
   // build-remove-tags.mjs owns the one-time showroom cleanup (restore-map + 90s gaps).
-  const showroomTaggedIds = new Set(tagged.filter(n => isShowroomVendor(n.vendor)).map(n => n.id));
-  const target = new Set(newest.filter(n => !isShowroomVendor(n.vendor)).map(n => n.id));
+  const showroomTaggedIds = new Set(tagged.filter(n => isShowroomProduct(n)).map(n => n.id));
+  const target = new Set(newest.filter(n => !isShowroomProduct(n)).map(n => n.id));
   const have = new Set(tagged.map(n => n.id));
 
   const toAdd = [...target].filter(id => !have.has(id));

← bddd4d7 google-feed: exclude showroom-tagged products via isShowroom  ·  back to Designerwallcoverings  ·  theme (source): hide showroom-TAGGED products from browse/se da49390 →