← back to Gated Queue Runner
fix categorization balance + title cleanup
638e70cc2851c7bf66556a3a48c4d430095ee2de · 2026-08-18 13:14:51 -0700 · steve
Files touched
Diff
commit 638e70cc2851c7bf66556a3a48c4d430095ee2de
Author: steve <steve@designerwallcoverings.com>
Date: Tue Aug 18 13:14:51 2026 -0700
fix categorization balance + title cleanup
---
server.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/server.js b/server.js
index 2a930d9..daf4c1c 100644
--- a/server.js
+++ b/server.js
@@ -19,9 +19,9 @@ const CATS = [
yes: 'If you say YES, it sends a real email or message to real people.' },
{ key: 'dns', emoji: '🌐', label: 'Website address', rx: /\bdns\b|a-?record|cloudflare zone|nameserver|repoint|subdomain|expose.*\.com/i,
yes: 'If you say YES, it changes where a website address sends people.' },
- { key: 'catalog', emoji: '📦', label: 'Product list', rx: /catalog stage|_catalog\b|dw_unified.*write|stage → |price (list|refresh|change)|reprice|sku|metafield|variant/i,
+ { key: 'catalog', emoji: '📦', label: 'Product list', rx: /catalog stage|_catalog\b|dw_unified.*(write|stage)|price (list|refresh|change)|repric|pricing|MAP\b/i,
yes: 'If you say YES, it changes our big list of products (like prices or names).' },
- { key: 'shopify', emoji: '🛍️', label: 'Store change', rx: /shopify (write|publish|product)|customer-facing shopify|activate|draft-down|storefront|online store|collection/i,
+ { key: 'shopify', emoji: '🛍️', label: 'Store change', rx: /shopify|storefront|online store|collection|activate|draft-down|\bsku\b|variant|metafield|product (write|create|publish)/i,
yes: 'If you say YES, it changes what shoppers see in the store.' },
{ key: 'ga4', emoji: '📊', label: 'Visitor counter', rx: /\bga4\b|analytics|gtag|pixel|\bgtm\b/i,
yes: 'If you say YES, it turns on the little counter that shows how many people visit.' },
@@ -37,14 +37,14 @@ function categorize(body) {
return OTHER;
}
function cleanTitle(firstLine, fname) {
- let t = (firstLine || fname).replace(/^#+\s*/, '').trim();
- // if the first line is not a real sentence/heading (looks like the filename), use filename cleanly
- const looksLikeFname = /\.md$|\.csv$|^\d{4}[- ]\d\d[- ]\d\d/.test(t) || /GATED$|-GATED|_/.test(t);
- if (looksLikeFname) t = fname.replace(/\.(md|csv)$/,'').replace(/[-_]/g,' ');
- t = t.replace(/^(GATED|PENDING APPROVAL|APPROVAL|ESCALATION|FIX|DONE|READY|DRAFT|✅|🚨|🚦)\b[:\s—-]*/i, '');
- t = t.replace(/\b20\d\d[ -]\d\d[ -]\d\d\b/g, '').replace(/\bTK[ -]?\d+\b/gi, '');
- t = t.replace(/\b(GATED|READY|DRAFT|memo|publish held|verified)\b/gi, '');
- t = t.replace(/[—:|].*$/, '').replace(/\(.*?\)/g, '').replace(/[_*`#>]/g, ' ').replace(/\s{2,}/g, ' ').trim();
+ // filename-based is the most predictable source; normalize then strip noise tokens.
+ let t = fname.replace(/\.(md|csv)$/, '').replace(/[-_]/g, ' ');
+ t = t.replace(/\b20\d\d\s+\d\d\s+\d\d\b/g, '') // 2026 08 18
+ .replace(/\b20\d\d-\d\d-\d\d\b/g, '')
+ .replace(/\b\d{6}\b/g, '') // stray 070926-style stamps
+ .replace(/\bTK\s*-?\s*\d+\b/gi, '')
+ .replace(/\b(GATED|READY|DRAFT|DONE|PENDING|APPROVAL|VERIFIED|GO ?LIVE|GATE|memo|publish held|held)\b/gi, '')
+ .replace(/\s{2,}/g, ' ').trim();
if (!t) t = fname.replace(/\.(md|csv)$/, '').replace(/[-_]/g, ' ');
// simplify a few jargon words
const swap = { 'reconcile':'match up', 'remediation':'cleanup', 'canary':'watcher', 'metafield':'label',
← e75c3c1 gated-queue kid-notes viewer (categorized, sort+density, cre
·
back to Gated Queue Runner
·
strip 8-digit date stamps from titles 8fe25e6 →