NEW SKU Viewer
repo: ~/Projects/NEW-SKU-Viewer · 7 commits · 0 in last 24h, 0 in last 7d ·
Skills used
- /vendors3
- /yolo-mode2
- /import1
- /auto-scraper1
- /refactor1
Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
d99c7a1 · 2026-05-19 · fix(server): gate auto-YOLO-mode behind YOLO_MODE_AUTOSTART env var
Previously every pm2 restart unconditionally fired startYoloMode() 60s
after boot — a 10-cycle 30-min-interval scan loop hammering
http://45.61.58.125:9830/api/import/auto-scraper with zero operator
consent. Combined with the unauthed POST /api/yolo-mode bound to
0.0.0.0:3030, this meant every restart silently launched a multi-hour
scrape against prod.
Now gated behind YOLO_MODE_AUTOSTART=1 env var. POST /api/yolo-mode still
works for manual on-demand triggering. Default is OFF.
Surfaced by tick 177 session #102 Teal mechanical refactor pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
098e8b6 · 2026-05-19 · public: wire sort <select> + density slider with localStorage persistence
Standing rule — every grid page (admin tools included) must have a sort
select + density range slider, both persisted to localStorage, both
hydrated BEFORE the first API call.
- Sort options: Newest (default) / Most Products / Vendor (SKU prefix)
A→Z / Series A→Z / SKU A→Z / Title A→Z / Status (working first).
- Density slider: 220-520px card-min, driving --card-min CSS var on
.vendor-grid's auto-fill minmax.
- hydrateGridControls() runs before loadVendorData(), and the first
fetch is /api/vendors?sort=<saved> so the server returns the
pre-sorted list.
- Removed the hardcoded client-side .sort by products in renderVendors
so the server-side sort actually wins.
Keys: newSkuViewer.grid.sort, newSkuViewer.grid.density.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b85fbce · 2026-05-19 · server: 404-guard snapshot paths + server-side sort on /api/vendors
- Middleware before express.static returns 404 for any request whose
path matches *.bak / *.bak.* / *.pre-* / *.orig / *.rej / *.swp / ~,
so stray editor snapshots never serve from public/.
- /api/vendors now honors a ?sort= query param (products|newest|vendor|
series|sku|title|status) so the grid can be sorted server-side per
the standing "every grid gets sort + density" rule. Frontend wiring
in a follow-up commit.
node -c server.js passes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
de911b9 · 2026-05-19 · public: add rel=noopener noreferrer to product-modal external link
The only target=_blank anchor in the page (product modal "View Product"
link) was missing rel=noopener noreferrer. Closes window.opener and
strips Referer for the popup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6c6b864 · 2026-05-19 · gitignore: broaden snapshot patterns (*.bak.*, *.pre-*, *.orig, *.rej, *.swp, *~)
Existing rule only covered `*.bak`. Broaden so common editor/refactor
snapshot files never get committed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
File tree
10 files tracked. Click any to browse the source at HEAD.
rendered in 1ms