[object Object]

← back to Wallco Ai

chat: kill-switch on mobile (≤768px) — bail before DOM injection

cd80337d1ff491064e9767d958105e6c0f2f7bc8 · 2026-05-21 12:24:22 -0700 · Steve Abrams

FAB + panel were eating the bottom of the catalog on phones. Desktop
behavior unchanged. matchMedia check matches the existing 768px
breakpoint used elsewhere in the stylesheet.

Files touched

Diff

commit cd80337d1ff491064e9767d958105e6c0f2f7bc8
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu May 21 12:24:22 2026 -0700

    chat: kill-switch on mobile (≤768px) — bail before DOM injection
    
    FAB + panel were eating the bottom of the catalog on phones. Desktop
    behavior unchanged. matchMedia check matches the existing 768px
    breakpoint used elsewhere in the stylesheet.
---
 public/js/chat.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/public/js/chat.js b/public/js/chat.js
index 774d1be..adca155 100644
--- a/public/js/chat.js
+++ b/public/js/chat.js
@@ -10,6 +10,16 @@
  */
 (function () {
   if (window.__WALLCO_CHAT_LOADED__) return; window.__WALLCO_CHAT_LOADED__ = true;
+
+  // Mobile kill-switch — Steve 2026-05-21. Chat is desktop-only; on phones
+  // the FAB and panel were eating the bottom of the catalog. Bail before
+  // any DOM injection so we save the bytes + the layout.
+  // Threshold matches the existing 768px mobile breakpoint used elsewhere
+  // in wallco.ai's stylesheet (and matches the standard tablet/phone cut).
+  if (window.matchMedia && window.matchMedia('(max-width: 768px)').matches) {
+    return;
+  }
+
   const tag = document.currentScript || document.querySelector('script[src*="/js/chat.js"]');
   // Auto-detect /design/:id URLs; otherwise catalog
   let CTX_KEY = (tag && tag.dataset.context) || 'catalog';

← f7a54b8 ui(designs): move chat pop-out to upper-right; strip ALL sli  ·  back to Wallco Ai  ·  chat: design-AI pill back to bottom-right corner + Big Red s 4e4fe74 →