[object Object]

← back to Fabricwallpaper

rails: tag-aware facet filter (productInRail) so rail drill-down + pills return products (fix regression)

0af6eef898c2e2e9decd9b985f3ef2888db8c829 · 2026-05-26 10:45:59 -0700 · Steve Abrams

Files touched

Diff

commit 0af6eef898c2e2e9decd9b985f3ef2888db8c829
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 26 10:45:59 2026 -0700

    rails: tag-aware facet filter (productInRail) so rail drill-down + pills return products (fix regression)
---
 server.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server.js b/server.js
index 4ea8545..b7a572e 100644
--- a/server.js
+++ b/server.js
@@ -7,7 +7,7 @@ const express = require('express');
 const helmet = require('helmet');
 const path = require('path');
 const fs = require('fs');
-const { buildRails, railFacets } = require('../_shared/rail-match');
+const { buildRails, railFacets, productInRail } = require('../_shared/rail-match');
 
 const PORT = process.env.PORT || 9846;
 const DW_SHOPIFY = 'https://designerwallcoverings.com';
@@ -172,7 +172,7 @@ function applyFilters(list, { q, aesthetic }) {
     const needle = String(q).toLowerCase();
     out = out.filter(p => (p.title || '').toLowerCase().includes(needle) || (p.tags || []).some(t => t.toLowerCase().includes(needle)));
   }
-  if (aesthetic && aesthetic !== 'all') out = out.filter(p => p.aesthetic === aesthetic);
+  if (aesthetic && aesthetic !== 'all') out = out.filter(p => productInRail(p, aesthetic));
   return out;
 }
 

← 2f5dca2 chore: sync package-lock with declared dotenv dep  ·  back to Fabricwallpaper  ·  sku-redact: wire shared vendor-id display scrubber f853260 →