[object Object]

← back to Quadrille Showroom

snapshot before carousel build: Slice-2 boot-guard (_qhBootSettled) + cladToken + verify-slice2 artifacts

0ae67ed56d0a5f715993207dc3cc99e10ea751ad · 2026-06-28 17:27:30 -0700 · Steve

Files touched

Diff

commit 0ae67ed56d0a5f715993207dc3cc99e10ea751ad
Author: Steve <steve@designerwallcoverings.com>
Date:   Sun Jun 28 17:27:30 2026 -0700

    snapshot before carousel build: Slice-2 boot-guard (_qhBootSettled) + cladToken + verify-slice2 artifacts
---
 public/js/showroom.js  | 8 ++++++++
 public/js/viewmodes.js | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/public/js/showroom.js b/public/js/showroom.js
index 480bcf4..c4209e9 100644
--- a/public/js/showroom.js
+++ b/public/js/showroom.js
@@ -118,6 +118,10 @@ let guidedReady = false; // set true once the middle board has been auto-focused
 // INIT
 // ============================================================
 function init() {
+  // Slice-2 boot guard: the view-mode engine's boot setMode('hero') must NOT auto-focus
+  // (clad + open panel) until the user actually interacts — keeps the Slice-1 boot pose
+  // (resting middle, no selection/panel, neutral walls) deterministic, race-free.
+  window._qhBootSettled = false;
   clock = new THREE.Clock();
   raycaster = new THREE.Raycaster();
   mouse = new THREE.Vector2(-99, -99);
@@ -1749,6 +1753,10 @@ function onCanvasClick(event) {
 function focusOnWing(pivot) {
   const product = pivot.userData.product;
 
+  // The user has interacted — boot settle is over; from here a Hero-mode re-entry may
+  // legitimately auto-focus. (Before this, the boot stays at the resting-open default.)
+  window._qhBootSettled = true;
+
   // A real selection supersedes the resting-open boot visual.
   if (restingOpenWing && restingOpenWing !== pivot) restingOpenWing.userData.panelClosed = true;
   restingOpenWing = null;
diff --git a/public/js/viewmodes.js b/public/js/viewmodes.js
index 0439f7c..49bd8b7 100644
--- a/public/js/viewmodes.js
+++ b/public/js/viewmodes.js
@@ -77,6 +77,12 @@ function boot() {
     hero: {
       label: 'Hero', hint: 'Flat, dead-on — the gallery hero panel.', guided: true,
       enter() {
+        // BOOT GUARD (Slice-2): on the very first load, do NOT auto-focus the middle
+        // board — that would clad the walls + open the detail panel + mark a selection,
+        // violating the Slice-1 boot invariant (resting-open middle, no selection, no
+        // panel, neutral walls). The showroom's enterGuidedDefault owns the boot pose;
+        // hero only focuses once the user has actually interacted (a real click/nav).
+        if (window._qhBootSettled === false) { setWingDeg(8); return; }
         ensureFocused();
         // focusOnWing already gives the PJ flat hero framing; just make sure the
         // open angle is near-flat for this mode.

← 966628f auto-save: 2026-06-28T17:15:46 (1 files) — public/js/showroo  ·  back to Quadrille Showroom  ·  Chunk I: dry-cleaner/tie-rack carousel — click any sliver co 396a02d →