← back to Wallco Ai
wallco.ai · context toggle on /design/:id (residential/commercial/hospitality)
d92efeafb3b64271d85d22063ce9bc70d2e3ecbd · 2026-05-11 23:23:04 -0700 · SteveStudio2
User-facing change per Steve's direction — instead of stacking all 4 room
images, show ONE image at a time with a 3-pill toggle (Residential /
Commercial / Hospitality). Saves vertical space and lets the visitor
self-select the use case they care about.
Each context maps to a canonical room from the design's available
mockups:
residential → living_room (fallback: bedroom, dining_room)
commercial → office (fallback: boardroom, retail)
hospitality → hotel_lobby (fallback: restaurant, hotel_corridor)
Added 10 new mockups for top-5 designs (office + hotel_lobby each,
$0.14, ~110s). All 5 saturated designs now show all 3 contexts.
ROOM_CONTEXTS computed server-side once per request; pills wired via
inline IIFE so no extra JS file needed.
Files touched
M data/designs.jsonM server.js
Diff
commit d92efeafb3b64271d85d22063ce9bc70d2e3ecbd
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Mon May 11 23:23:04 2026 -0700
wallco.ai · context toggle on /design/:id (residential/commercial/hospitality)
User-facing change per Steve's direction — instead of stacking all 4 room
images, show ONE image at a time with a 3-pill toggle (Residential /
Commercial / Hospitality). Saves vertical space and lets the visitor
self-select the use case they care about.
Each context maps to a canonical room from the design's available
mockups:
residential → living_room (fallback: bedroom, dining_room)
commercial → office (fallback: boardroom, retail)
hospitality → hotel_lobby (fallback: restaurant, hotel_corridor)
Added 10 new mockups for top-5 designs (office + hotel_lobby each,
$0.14, ~110s). All 5 saturated designs now show all 3 contexts.
ROOM_CONTEXTS computed server-side once per request; pills wired via
inline IIFE so no extra JS file needed.
---
data/designs.json | 1057 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
server.js | 64 +++-
2 files changed, 1108 insertions(+), 13 deletions(-)
diff --git a/data/designs.json b/data/designs.json
index 9c72324..200780c 100644
--- a/data/designs.json
+++ b/data/designs.json
@@ -91,7 +91,9 @@
],
"room_mockups": [
"bedroom",
- "living_room"
+ "hotel_lobby",
+ "living_room",
+ "office"
]
},
{
@@ -324,7 +326,9 @@
],
"room_mockups": [
"bedroom",
- "living_room"
+ "hotel_lobby",
+ "living_room",
+ "office"
]
},
{
@@ -442,7 +446,9 @@
],
"room_mockups": [
"bedroom",
- "living_room"
+ "hotel_lobby",
+ "living_room",
+ "office"
]
},
{
@@ -1437,7 +1443,9 @@
],
"room_mockups": [
"bedroom",
- "living_room"
+ "hotel_lobby",
+ "living_room",
+ "office"
]
},
{
@@ -1718,7 +1726,9 @@
],
"room_mockups": [
"bedroom",
- "living_room"
+ "hotel_lobby",
+ "living_room",
+ "office"
]
},
{
@@ -3541,5 +3551,1042 @@
"created_at": "2026-05-12T05:44:13.342672+00:00",
"motifs": [],
"room_mockups": []
+ },
+ {
+ "id": 238,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#12100f",
+ "saturation": 0.091,
+ "title": "Amber Atelier No.238",
+ "handle": "wallco-0238",
+ "image_url": "/designs/img/1778564822207_2127988434.png",
+ "filename": "1778564822207_2127988434.png",
+ "generator": "wallco.ai",
+ "seed": 2127988434,
+ "is_published": false,
+ "created_at": "2026-05-12T05:47:10.65106+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 239,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#12100f",
+ "saturation": 0.091,
+ "title": "Amber Salon No.239",
+ "handle": "wallco-0239",
+ "image_url": "/designs/img/var_238_hue+60_1778564830770.png",
+ "filename": "var_238_hue+60_1778564830770.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:47:13.03819+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 240,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#12100f",
+ "saturation": 0.091,
+ "title": "Amber Baroque No.240",
+ "handle": "wallco-0240",
+ "image_url": "/designs/img/var_238_hue+120_1778564833042.png",
+ "filename": "var_238_hue+120_1778564833042.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:47:15.282487+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 241,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#12100f",
+ "saturation": 0.091,
+ "title": "Amber Damask No.241",
+ "handle": "wallco-0241",
+ "image_url": "/designs/img/var_238_hue+180_1778564835286.png",
+ "filename": "var_238_hue+180_1778564835286.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:47:17.522905+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 242,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#12100f",
+ "saturation": 0.091,
+ "title": "Amber Heirloom No.242",
+ "handle": "wallco-0242",
+ "image_url": "/designs/img/var_238_hue-60_1778564837526.png",
+ "filename": "var_238_hue-60_1778564837526.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:47:19.800862+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 243,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#12100f",
+ "saturation": 0.091,
+ "title": "Amber Atelier No.243",
+ "handle": "wallco-0243",
+ "image_url": "/designs/img/var_238_mono_1778564839804.png",
+ "filename": "var_238_mono_1778564839804.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:47:22.030192+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 244,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7b6049",
+ "saturation": 0.255,
+ "title": "Amber Salon No.244",
+ "handle": "wallco-0244",
+ "image_url": "/designs/img/1778565010896_409523897.png",
+ "filename": "1778565010896_409523897.png",
+ "generator": "wallco.ai",
+ "seed": 409523897,
+ "is_published": false,
+ "created_at": "2026-05-12T05:50:19.493598+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 245,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7b6049",
+ "saturation": 0.255,
+ "title": "Amber Baroque No.245",
+ "handle": "wallco-0245",
+ "image_url": "/designs/img/var_244_hue+60_1778565019617.png",
+ "filename": "var_244_hue+60_1778565019617.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:50:21.761169+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 246,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7b6049",
+ "saturation": 0.255,
+ "title": "Amber Damask No.246",
+ "handle": "wallco-0246",
+ "image_url": "/designs/img/var_244_hue+120_1778565021766.png",
+ "filename": "var_244_hue+120_1778565021766.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:50:23.925643+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 247,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7b6049",
+ "saturation": 0.255,
+ "title": "Amber Heirloom No.247",
+ "handle": "wallco-0247",
+ "image_url": "/designs/img/var_244_hue+180_1778565023930.png",
+ "filename": "var_244_hue+180_1778565023930.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:50:26.137945+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 248,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7b6049",
+ "saturation": 0.255,
+ "title": "Amber Atelier No.248",
+ "handle": "wallco-0248",
+ "image_url": "/designs/img/var_244_hue-60_1778565026143.png",
+ "filename": "var_244_hue-60_1778565026143.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:50:28.330916+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 249,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7b6049",
+ "saturation": 0.255,
+ "title": "Amber Salon No.249",
+ "handle": "wallco-0249",
+ "image_url": "/designs/img/var_244_mono_1778565028337.png",
+ "filename": "var_244_mono_1778565028337.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:50:30.559503+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 250,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#213b32",
+ "saturation": 0.283,
+ "title": "Marine Baroque No.250",
+ "handle": "wallco-0250",
+ "image_url": "/designs/img/1778565199752_1741920569.png",
+ "filename": "1778565199752_1741920569.png",
+ "generator": "wallco.ai",
+ "seed": 1741920569,
+ "is_published": false,
+ "created_at": "2026-05-12T05:53:28.084737+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 251,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#213b32",
+ "saturation": 0.283,
+ "title": "Marine Damask No.251",
+ "handle": "wallco-0251",
+ "image_url": "/designs/img/var_250_hue+60_1778565208212.png",
+ "filename": "var_250_hue+60_1778565208212.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:53:30.46858+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 252,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#213b32",
+ "saturation": 0.283,
+ "title": "Marine Heirloom No.252",
+ "handle": "wallco-0252",
+ "image_url": "/designs/img/var_250_hue+120_1778565210472.png",
+ "filename": "var_250_hue+120_1778565210472.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:53:32.763508+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 253,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#213b32",
+ "saturation": 0.283,
+ "title": "Marine Atelier No.253",
+ "handle": "wallco-0253",
+ "image_url": "/designs/img/var_250_hue+180_1778565212768.png",
+ "filename": "var_250_hue+180_1778565212768.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:53:35.082768+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 254,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#213b32",
+ "saturation": 0.283,
+ "title": "Marine Salon No.254",
+ "handle": "wallco-0254",
+ "image_url": "/designs/img/var_250_hue-60_1778565215087.png",
+ "filename": "var_250_hue-60_1778565215087.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:53:37.355181+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 255,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#213b32",
+ "saturation": 0.283,
+ "title": "Marine Baroque No.255",
+ "handle": "wallco-0255",
+ "image_url": "/designs/img/var_250_mono_1778565217359.png",
+ "filename": "var_250_mono_1778565217359.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:53:39.723101+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 256,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#e2a749",
+ "saturation": 0.725,
+ "title": "Honey Damask No.256",
+ "handle": "wallco-0256",
+ "image_url": "/designs/img/1778565388337_299191350.png",
+ "filename": "1778565388337_299191350.png",
+ "generator": "wallco.ai",
+ "seed": 299191350,
+ "is_published": false,
+ "created_at": "2026-05-12T05:56:36.783331+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 257,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#e2a749",
+ "saturation": 0.725,
+ "title": "Honey Heirloom No.257",
+ "handle": "wallco-0257",
+ "image_url": "/designs/img/var_256_hue+60_1778565396917.png",
+ "filename": "var_256_hue+60_1778565396917.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:56:39.131608+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 258,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#e2a749",
+ "saturation": 0.725,
+ "title": "Honey Atelier No.258",
+ "handle": "wallco-0258",
+ "image_url": "/designs/img/var_256_hue+120_1778565399135.png",
+ "filename": "var_256_hue+120_1778565399135.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:56:41.454653+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 259,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#e2a749",
+ "saturation": 0.725,
+ "title": "Honey Salon No.259",
+ "handle": "wallco-0259",
+ "image_url": "/designs/img/var_256_hue+180_1778565401458.png",
+ "filename": "var_256_hue+180_1778565401458.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:56:43.70417+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 260,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#e2a749",
+ "saturation": 0.725,
+ "title": "Honey Baroque No.260",
+ "handle": "wallco-0260",
+ "image_url": "/designs/img/var_256_hue-60_1778565403707.png",
+ "filename": "var_256_hue-60_1778565403707.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:56:45.940796+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 261,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#e2a749",
+ "saturation": 0.725,
+ "title": "Honey Damask No.261",
+ "handle": "wallco-0261",
+ "image_url": "/designs/img/var_256_mono_1778565405944.png",
+ "filename": "var_256_mono_1778565405944.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:56:48.327386+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 262,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#d1c497",
+ "saturation": 0.387,
+ "title": "Honey Heirloom No.262",
+ "handle": "wallco-0262",
+ "image_url": "/designs/img/1778565577035_2027890839.png",
+ "filename": "1778565577035_2027890839.png",
+ "generator": "wallco.ai",
+ "seed": 2027890839,
+ "is_published": false,
+ "created_at": "2026-05-12T05:59:51.949808+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 263,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#d1c497",
+ "saturation": 0.387,
+ "title": "Honey Atelier No.263",
+ "handle": "wallco-0263",
+ "image_url": "/designs/img/var_262_hue+60_1778565592066.png",
+ "filename": "var_262_hue+60_1778565592066.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:59:54.363914+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 264,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#d1c497",
+ "saturation": 0.387,
+ "title": "Honey Salon No.264",
+ "handle": "wallco-0264",
+ "image_url": "/designs/img/var_262_hue+120_1778565594367.png",
+ "filename": "var_262_hue+120_1778565594367.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:59:56.645613+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 265,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#d1c497",
+ "saturation": 0.387,
+ "title": "Honey Baroque No.265",
+ "handle": "wallco-0265",
+ "image_url": "/designs/img/var_262_hue+180_1778565596649.png",
+ "filename": "var_262_hue+180_1778565596649.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T05:59:58.909147+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 266,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#d1c497",
+ "saturation": 0.387,
+ "title": "Honey Damask No.266",
+ "handle": "wallco-0266",
+ "image_url": "/designs/img/var_262_hue-60_1778565598914.png",
+ "filename": "var_262_hue-60_1778565598914.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:00:01.167737+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 267,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#d1c497",
+ "saturation": 0.387,
+ "title": "Honey Heirloom No.267",
+ "handle": "wallco-0267",
+ "image_url": "/designs/img/var_262_mono_1778565601172.png",
+ "filename": "var_262_mono_1778565601172.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:00:03.459944+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 268,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#281e15",
+ "saturation": 0.311,
+ "title": "Amber Atelier No.268",
+ "handle": "wallco-0268",
+ "image_url": "/designs/img/1778565794257_702086767.png",
+ "filename": "1778565794257_702086767.png",
+ "generator": "wallco.ai",
+ "seed": 702086767,
+ "is_published": false,
+ "created_at": "2026-05-12T06:04:18.496195+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 269,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#281e15",
+ "saturation": 0.311,
+ "title": "Amber Salon No.269",
+ "handle": "wallco-0269",
+ "image_url": "/designs/img/var_268_hue+60_1778565862276.png",
+ "filename": "var_268_hue+60_1778565862276.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:04:55.730097+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 270,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#281e15",
+ "saturation": 0.311,
+ "title": "Amber Baroque No.270",
+ "handle": "wallco-0270",
+ "image_url": "/designs/img/var_268_hue+120_1778565895751.png",
+ "filename": "var_268_hue+120_1778565895751.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:05:28.172765+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 271,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#281e15",
+ "saturation": 0.311,
+ "title": "Amber Damask No.271",
+ "handle": "wallco-0271",
+ "image_url": "/designs/img/var_268_hue+180_1778565928198.png",
+ "filename": "var_268_hue+180_1778565928198.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:06:02.857389+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 272,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#281e15",
+ "saturation": 0.311,
+ "title": "Amber Heirloom No.272",
+ "handle": "wallco-0272",
+ "image_url": "/designs/img/var_268_hue-60_1778565962863.png",
+ "filename": "var_268_hue-60_1778565962863.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:06:05.692271+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 273,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#281e15",
+ "saturation": 0.311,
+ "title": "Amber Atelier No.273",
+ "handle": "wallco-0273",
+ "image_url": "/designs/img/var_268_mono_1778565965699.png",
+ "filename": "var_268_mono_1778565965699.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:06:08.351686+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 274,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#1c2c3e",
+ "saturation": 0.378,
+ "title": "Sapphire Salon No.274",
+ "handle": "wallco-0274",
+ "image_url": "/designs/img/1778566041532_1686942250.png",
+ "filename": "1778566041532_1686942250.png",
+ "generator": "wallco.ai",
+ "seed": 1686942250,
+ "is_published": false,
+ "created_at": "2026-05-12T06:07:30.218636+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 275,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#1c2c3e",
+ "saturation": 0.378,
+ "title": "Sapphire Baroque No.275",
+ "handle": "wallco-0275",
+ "image_url": "/designs/img/var_274_hue+60_1778566050348.png",
+ "filename": "var_274_hue+60_1778566050348.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:07:32.975778+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 276,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#1c2c3e",
+ "saturation": 0.378,
+ "title": "Sapphire Damask No.276",
+ "handle": "wallco-0276",
+ "image_url": "/designs/img/var_274_hue+120_1778566052981.png",
+ "filename": "var_274_hue+120_1778566052981.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:07:35.776459+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 277,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#1c2c3e",
+ "saturation": 0.378,
+ "title": "Sapphire Heirloom No.277",
+ "handle": "wallco-0277",
+ "image_url": "/designs/img/var_274_hue+180_1778566055780.png",
+ "filename": "var_274_hue+180_1778566055780.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:07:38.460067+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 278,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#1c2c3e",
+ "saturation": 0.378,
+ "title": "Sapphire Atelier No.278",
+ "handle": "wallco-0278",
+ "image_url": "/designs/img/var_274_hue-60_1778566058464.png",
+ "filename": "var_274_hue-60_1778566058464.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:07:41.278854+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 279,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#1c2c3e",
+ "saturation": 0.378,
+ "title": "Sapphire Salon No.279",
+ "handle": "wallco-0279",
+ "image_url": "/designs/img/var_274_mono_1778566061282.png",
+ "filename": "var_274_mono_1778566061282.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:07:44.031921+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 280,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#83653e",
+ "saturation": 0.358,
+ "title": "Amber Baroque No.280",
+ "handle": "wallco-0280",
+ "image_url": "/designs/img/1778566230468_1140811885.png",
+ "filename": "1778566230468_1140811885.png",
+ "generator": "wallco.ai",
+ "seed": 1140811885,
+ "is_published": false,
+ "created_at": "2026-05-12T06:10:38.325892+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 281,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#83653e",
+ "saturation": 0.358,
+ "title": "Amber Damask No.281",
+ "handle": "wallco-0281",
+ "image_url": "/designs/img/var_280_hue+60_1778566238439.png",
+ "filename": "var_280_hue+60_1778566238439.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:10:40.63807+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 282,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#83653e",
+ "saturation": 0.358,
+ "title": "Amber Heirloom No.282",
+ "handle": "wallco-0282",
+ "image_url": "/designs/img/var_280_hue+120_1778566240642.png",
+ "filename": "var_280_hue+120_1778566240642.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:10:42.745245+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 283,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#83653e",
+ "saturation": 0.358,
+ "title": "Amber Atelier No.283",
+ "handle": "wallco-0283",
+ "image_url": "/designs/img/var_280_hue+180_1778566242749.png",
+ "filename": "var_280_hue+180_1778566242749.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:10:44.919957+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 284,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#83653e",
+ "saturation": 0.358,
+ "title": "Amber Salon No.284",
+ "handle": "wallco-0284",
+ "image_url": "/designs/img/var_280_hue-60_1778566244924.png",
+ "filename": "var_280_hue-60_1778566244924.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:10:47.037547+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 285,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#83653e",
+ "saturation": 0.358,
+ "title": "Amber Baroque No.285",
+ "handle": "wallco-0285",
+ "image_url": "/designs/img/var_280_mono_1778566247041.png",
+ "filename": "var_280_mono_1778566247041.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:10:49.190541+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 286,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#dfbe8b",
+ "saturation": 0.568,
+ "title": "Honey Damask No.286",
+ "handle": "wallco-0286",
+ "image_url": "/designs/img/1778566418564_1079598490.png",
+ "filename": "1778566418564_1079598490.png",
+ "generator": "wallco.ai",
+ "seed": 1079598490,
+ "is_published": false,
+ "created_at": "2026-05-12T06:13:47.211895+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 287,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#dfbe8b",
+ "saturation": 0.568,
+ "title": "Honey Heirloom No.287",
+ "handle": "wallco-0287",
+ "image_url": "/designs/img/var_286_hue+60_1778566427333.png",
+ "filename": "var_286_hue+60_1778566427333.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:13:49.677857+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 288,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#dfbe8b",
+ "saturation": 0.568,
+ "title": "Honey Atelier No.288",
+ "handle": "wallco-0288",
+ "image_url": "/designs/img/var_286_hue+120_1778566429683.png",
+ "filename": "var_286_hue+120_1778566429683.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:13:52.064137+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 289,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#dfbe8b",
+ "saturation": 0.568,
+ "title": "Honey Salon No.289",
+ "handle": "wallco-0289",
+ "image_url": "/designs/img/var_286_hue+180_1778566432067.png",
+ "filename": "var_286_hue+180_1778566432067.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:13:54.513003+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 290,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#dfbe8b",
+ "saturation": 0.568,
+ "title": "Honey Baroque No.290",
+ "handle": "wallco-0290",
+ "image_url": "/designs/img/var_286_hue-60_1778566434516.png",
+ "filename": "var_286_hue-60_1778566434516.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:13:56.826864+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 291,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#dfbe8b",
+ "saturation": 0.568,
+ "title": "Honey Damask No.291",
+ "handle": "wallco-0291",
+ "image_url": "/designs/img/var_286_mono_1778566436832.png",
+ "filename": "var_286_mono_1778566436832.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:13:59.238092+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 292,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#111c25",
+ "saturation": 0.37,
+ "title": "Sapphire Heirloom No.292",
+ "handle": "wallco-0292",
+ "image_url": "/designs/img/1778566607485_1110650245.png",
+ "filename": "1778566607485_1110650245.png",
+ "generator": "wallco.ai",
+ "seed": 1110650245,
+ "is_published": false,
+ "created_at": "2026-05-12T06:16:55.805078+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 293,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#111c25",
+ "saturation": 0.37,
+ "title": "Sapphire Atelier No.293",
+ "handle": "wallco-0293",
+ "image_url": "/designs/img/var_292_hue+60_1778566615942.png",
+ "filename": "var_292_hue+60_1778566615942.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:16:58.207428+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 294,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#111c25",
+ "saturation": 0.37,
+ "title": "Sapphire Salon No.294",
+ "handle": "wallco-0294",
+ "image_url": "/designs/img/var_292_hue+120_1778566618213.png",
+ "filename": "var_292_hue+120_1778566618213.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:17:00.81506+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 295,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#111c25",
+ "saturation": 0.37,
+ "title": "Sapphire Baroque No.295",
+ "handle": "wallco-0295",
+ "image_url": "/designs/img/var_292_hue+180_1778566620819.png",
+ "filename": "var_292_hue+180_1778566620819.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:17:14.878395+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 296,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#111c25",
+ "saturation": 0.37,
+ "title": "Sapphire Damask No.296",
+ "handle": "wallco-0296",
+ "image_url": "/designs/img/var_292_hue-60_1778566634891.png",
+ "filename": "var_292_hue-60_1778566634891.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:17:18.314833+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 297,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#111c25",
+ "saturation": 0.37,
+ "title": "Sapphire Heirloom No.297",
+ "handle": "wallco-0297",
+ "image_url": "/designs/img/var_292_mono_1778566638325.png",
+ "filename": "var_292_mono_1778566638325.png",
+ "generator": "wallco.ai",
+ "seed": 0,
+ "is_published": false,
+ "created_at": "2026-05-12T06:17:21.963708+00:00",
+ "motifs": [],
+ "room_mockups": []
+ },
+ {
+ "id": 298,
+ "kind": "seamless_tile",
+ "category": "damask",
+ "dominant_hex": "#7d7f57",
+ "saturation": 0.187,
+ "title": "Olive Atelier No.298",
+ "handle": "wallco-0298",
+ "image_url": "/designs/img/1778566798101_1852775597.png",
+ "filename": "1778566798101_1852775597.png",
+ "generator": "wallco.ai",
+ "seed": 1852775597,
+ "is_published": false,
+ "created_at": "2026-05-12T06:20:24.580568+00:00",
+ "motifs": [],
+ "room_mockups": []
}
]
\ No newline at end of file
diff --git a/server.js b/server.js
index 009401c..d78d87a 100644
--- a/server.js
+++ b/server.js
@@ -2193,6 +2193,19 @@ app.get('/design/:id', (req, res) => {
const prev = relIdx > 0 ? DESIGNS[relIdx-1] : null;
const next = relIdx < DESIGNS.length-1 ? DESIGNS[relIdx+1] : null;
+ // Resolve room-mockup contexts (residential / commercial / hospitality).
+ // Each context maps to ONE canonical room from the design's available
+ // mockups so the toggle shows up to 3 pills, never duplicates.
+ const ROOM_CONTEXTS = [
+ { id: 'residential', label: 'Residential', candidates: ['living_room','bedroom','dining_room'] },
+ { id: 'commercial', label: 'Commercial', candidates: ['office','boardroom','retail'] },
+ { id: 'hospitality', label: 'Hospitality', candidates: ['hotel_lobby','restaurant','hotel_corridor'] }
+ ];
+ const haveRooms = new Set(design.room_mockups || []);
+ const roomCtx = ROOM_CONTEXTS
+ .map(c => { const room = c.candidates.find(r => haveRooms.has(r)); return room ? { id: c.id, label: c.label, room } : null; })
+ .filter(Boolean);
+
const schema = JSON.stringify({
"@context": "https://schema.org",
"@type": "Product",
@@ -2904,18 +2917,53 @@ ${htmlHeader('/designs')}
</script>
` : ''}
- ${(Array.isArray(design.room_mockups) && design.room_mockups.length) ? `
- <!-- Pre-generated room mockups (auto-rendered for top-saturation designs) -->
- <div class="room-precanned-grid" style="margin:22px 0 4px;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px">
- ${design.room_mockups.map(room => `
+ ${roomCtx.length ? `
+ <!-- Room mockup with context toggle (residential / commercial / hospitality) -->
+ <div class="room-toggle" style="margin:22px 0 4px">
+ <div class="room-pills" role="tablist" style="display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap">
+ ${roomCtx.map((c, i) => `
+ <button type="button" role="tab"
+ class="room-pill${i===0?' active':''}"
+ data-room="${c.room}"
+ aria-selected="${i===0?'true':'false'}"
+ style="padding:7px 14px;border-radius:18px;border:1px solid rgba(0,0,0,.15);background:${i===0?'#1a1816':'transparent'};color:${i===0?'#fff':'inherit'};font:inherit;font-size:12.5px;letter-spacing:.3px;cursor:pointer;transition:all .18s">${c.label}</button>
+ `).join('')}
+ </div>
<figure style="margin:0;border-radius:10px;overflow:hidden;background:rgba(0,0,0,.04)">
- <img src="/designs/room/design_${design.id}_${room}.png"
- alt="${design.title} — ${room.replace(/_/g,' ')}"
+ <img id="room-toggle-img"
+ src="/designs/room/design_${design.id}_${roomCtx[0].room}.png"
+ alt="${design.title} — ${roomCtx[0].label.toLowerCase()}"
loading="lazy"
style="display:block;width:100%;height:auto;border-radius:10px 10px 0 0">
- <figcaption style="font-size:12px;color:var(--ink-faint);padding:8px 12px;text-transform:capitalize">${room.replace(/_/g,' ')} — AI rendering</figcaption>
+ <figcaption id="room-toggle-cap" style="font-size:12px;color:var(--ink-faint);padding:8px 12px">${roomCtx[0].label} · ${roomCtx[0].room.replace(/_/g,' ')} — AI rendering</figcaption>
</figure>
- `).join('')}
+ <script>
+ (function(){
+ var pills = document.querySelectorAll('.room-pill');
+ var img = document.getElementById('room-toggle-img');
+ var cap = document.getElementById('room-toggle-cap');
+ var did = ${design.id};
+ var labels = ${JSON.stringify(Object.fromEntries(roomCtx.map(c => [c.room, c.label])))};
+ pills.forEach(function(p){
+ p.addEventListener('click', function(){
+ pills.forEach(function(x){
+ x.classList.remove('active');
+ x.setAttribute('aria-selected','false');
+ x.style.background = 'transparent';
+ x.style.color = 'inherit';
+ });
+ p.classList.add('active');
+ p.setAttribute('aria-selected','true');
+ p.style.background = '#1a1816';
+ p.style.color = '#fff';
+ var room = p.dataset.room;
+ img.src = '/designs/room/design_' + did + '_' + room + '.png';
+ img.alt = ${JSON.stringify(design.title)} + ' — ' + (labels[room] || '').toLowerCase();
+ cap.textContent = (labels[room]||'') + ' · ' + room.replace(/_/g,' ') + ' — AI rendering';
+ });
+ });
+ })();
+ </script>
</div>
` : ''}
← bc44f28 fix(chat.js): SyntaxError on line 145 — 'Here\\'s' broke str
·
back to Wallco Ai
·
/hot-or-not: fix window.history shadow + backtick-in-comment 48475ee →