← back to Wallco Ai
fix(wallco-ai/404): drop is_published filter so recovery row populates
a8488e591c49e07b67ae7c9629c02f1175382346 · 2026-05-11 22:16:02 -0700 · SteveStudio2
In prod every entry in DESIGNS currently has is_published: false (matches
the public /designs page which shows them all anyway), so the
is_published !== false guard zeroed out pickups → empty recovery grid +
og:image falling back to the generic og-default.png on every social
share. Matching /designs filter (just image_url) fixes both at once.
Files touched
Diff
commit a8488e591c49e07b67ae7c9629c02f1175382346
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Mon May 11 22:16:02 2026 -0700
fix(wallco-ai/404): drop is_published filter so recovery row populates
In prod every entry in DESIGNS currently has is_published: false (matches
the public /designs page which shows them all anyway), so the
is_published !== false guard zeroed out pickups → empty recovery grid +
og:image falling back to the generic og-default.png on every social
share. Matching /designs filter (just image_url) fixes both at once.
---
server.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index 0466d8d..2f80e6d 100644
--- a/server.js
+++ b/server.js
@@ -1424,11 +1424,14 @@ ${HAMBURGER_JS}
// ── DESIGN DETAIL not-found page (shared between bad-id and missing-id branches)
function renderDesignNotFound(req, idForCanonical) {
- // Hydrate 4 trending designs at request time, so the recovery row is real.
+ // Hydrate 4 designs for the recovery row. Match /designs filter exactly —
+ // it surfaces every design with an image_url, regardless of is_published.
+ // Earlier filter on is_published !== false zeroed out the row in prod because
+ // every loaded design currently ships with is_published: false.
let pickups = [];
try {
pickups = DESIGNS
- .filter(d => d.is_published !== false && d.image_url)
+ .filter(d => d && d.image_url)
.slice(0, 200)
.sort(() => Math.random() - 0.5)
.slice(0, 4);
← ba0b062 gamify: user votes + head-to-head polls + Elo + 5-variation
·
back to Wallco Ai
·
tick 14: cool/pale palette batch + snapshot refresh — catalo 4541eb0 →