[object Object]

← back to Quadrille Showroom

chore: refactor + v1.2.2 (session close)

d6a840cfe423941097cecd298dc22f34ea224399 · 2026-07-01 11:12:29 -0700 · Steve

javascript-pro refactor pass on the session's age-field code found + fixed a real
edge case in initHUD(): restoring a stored age of 0 from localStorage coerced to null
(parseInt('0')||null → null) while the input still showed '0'. Now uses
parseInt(saved,10) + Number.isFinite guard, mirroring the live input handler. Re-verified
(Playwright): 67 persists across reload, and the 0-case now restores as 0, 0 console errors.
No linter configured in repo — lint gate had no toolchain to run.

Files touched

Diff

commit d6a840cfe423941097cecd298dc22f34ea224399
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 1 11:12:29 2026 -0700

    chore: refactor + v1.2.2 (session close)
    
    javascript-pro refactor pass on the session's age-field code found + fixed a real
    edge case in initHUD(): restoring a stored age of 0 from localStorage coerced to null
    (parseInt('0')||null → null) while the input still showed '0'. Now uses
    parseInt(saved,10) + Number.isFinite guard, mirroring the live input handler. Re-verified
    (Playwright): 67 persists across reload, and the 0-case now restores as 0, 0 console errors.
    No linter configured in repo — lint gate had no toolchain to run.
---
 package-lock.json     |  4 ++--
 package.json          |  2 +-
 scripts/_reverify.mjs | 26 --------------------------
 3 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index c06af6d..7e787d5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "quadrille-showroom",
-  "version": "1.2.1",
+  "version": "1.2.2",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "quadrille-showroom",
-      "version": "1.2.1",
+      "version": "1.2.2",
       "license": "ISC",
       "dependencies": {
         "compression": "^1.8.1",
diff --git a/package.json b/package.json
index 7e56aa5..cbb5054 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "quadrille-showroom",
-  "version": "1.2.1",
+  "version": "1.2.2",
   "main": "server.js",
   "scripts": {
     "start": "node server.js",
diff --git a/scripts/_reverify.mjs b/scripts/_reverify.mjs
deleted file mode 100644
index 4ab5005..0000000
--- a/scripts/_reverify.mjs
+++ /dev/null
@@ -1,26 +0,0 @@
-import pw from '/Users/stevestudio2/.npm-global/lib/node_modules/playwright/index.js';
-const b=await pw.chromium.launch();
-const ctx=await b.newContext({httpCredentials:{username:'admin',password:'DWSecure2024!'}});
-const p=await ctx.newPage();
-const errs=[]; p.on('console',m=>{if(m.type()==='error')errs.push(m.text().slice(0,120));});
-p.on('pageerror',e=>errs.push('PE '+String(e).slice(0,120)));
-const setAge=(v)=>p.evaluate(x=>{const el=document.getElementById('tray-age-input');el.value=x;el.dispatchEvent(new Event('input',{bubbles:true}));},v);
-await p.goto('http://127.0.0.1:7690/',{waitUntil:'domcontentloaded',timeout:30000});
-await p.waitForFunction(()=>window._qh&&window._wingBoards&&window._wingBoards.length>0,{timeout:60000});
-await setAge('67'); await p.waitForTimeout(80);
-const t1=await p.evaluate(()=>({qh:window._qh.visitorAge,ls:localStorage.getItem('qh_visitor_age')}));
-await p.reload({waitUntil:'domcontentloaded'});
-await p.waitForFunction(()=>window._qh&&window._wingBoards&&window._wingBoards.length>0,{timeout:60000});
-const r1=await p.evaluate(()=>({input:document.getElementById('tray-age-input').value,qh:window._qh.visitorAge}));
-// the fixed 0-case: store 0, reload, must restore 0 (not null)
-await setAge('0'); await p.waitForTimeout(80);
-await p.reload({waitUntil:'domcontentloaded'});
-await p.waitForFunction(()=>window._qh&&window._wingBoards&&window._wingBoards.length>0,{timeout:60000});
-const r0=await p.evaluate(()=>({input:document.getElementById('tray-age-input').value,qh:window._qh.visitorAge}));
-console.log('after type 67 :',JSON.stringify(t1));
-console.log('after reload  :',JSON.stringify(r1));
-console.log('0-case reload :',JSON.stringify(r0),'(qh must be 0, not null)');
-console.log('errors('+errs.length+')');
-const ok=t1.qh===67&&r1.input==='67'&&r1.qh===67&&r0.qh===0&&r0.input==='0'&&errs.length===0;
-console.log(ok?'✅ RE-VERIFY PASS (incl. 0-case fix)':'❌ RE-VERIFY FAIL');
-await b.close(); process.exit(ok?0:1);

← df1dc51 auto-save: 2026-07-01T11:11:52 (2 files) — public/js/showroo  ·  back to Quadrille Showroom  ·  Scope the sample-request submit endpoint (age rides along) cc9d428 →