[object Object]

← back to Rentv

consulting: skip daynight injection on /consulting (DTD verdict A — kill the dead toggle button on the dark-locked deliverable; scoped to /consulting, admin/versions/desk keep the toggle)

9cf5e94ea61a9c45acbb5301faf5af2fda560905 · 2026-08-06 11:54:27 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 9cf5e94ea61a9c45acbb5301faf5af2fda560905
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 6 11:54:27 2026 -0700

    consulting: skip daynight injection on /consulting (DTD verdict A — kill the dead toggle button on the dark-locked deliverable; scoped to /consulting, admin/versions/desk keep the toggle)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 server.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 1df1057e..9d300c94 100644
--- a/server.js
+++ b/server.js
@@ -203,7 +203,12 @@ function sendPage(res, absFile) {
     html = closeBody() ? html.replace('</body>', NAV_TAG + '</body>') : html + NAV_TAG;
   }
   // Day/night toggle for all visitors: FOUC pre-apply in <head>, button before </body>.
-  if (html.indexOf('/daynight.js') === -1) {
+  // SKIP the consulting deliverable — it's a permanently-dark luxury artifact (DTD verdict A,
+  // 2026-08-06, unanimous panel). Injecting daynight there only adds a toggle button that can't
+  // change anything (portal.html pins its own theme vars) and so lies to the viewer. Scoped to the
+  // /consulting area only — other internal shells (admin/versions/desk) keep the toggle.
+  const isConsultingPage = /(^|\/)consulting(\.html)?$|\/consulting\//i.test(absFile);
+  if (!isConsultingPage && html.indexOf('/daynight.js') === -1) {
     html = html.indexOf('</head>') !== -1 ? html.replace('</head>', DAYNIGHT_PREAPPLY + '</head>') : DAYNIGHT_PREAPPLY + html;
     html = closeBody() ? html.replace('</body>', DAYNIGHT_TAG + '</body>') : html + DAYNIGHT_TAG;
   }

← 3cc78886 deploy.sh: reload procs separately + retrying health check (  ·  back to Rentv  ·  harden(feeds): Cody sweep — xmlEsc the channel-level <link> b1faccd8 →