[object Object]

← back to Wallco Ai

remove debug-kb spec scaffolding files (left from investigation)

880142e14b91405516442d7e6c973c5d0309aa3b · 2026-05-11 21:23:29 -0700 · SteveStudio2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files touched

Diff

commit 880142e14b91405516442d7e6c973c5d0309aa3b
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Mon May 11 21:23:29 2026 -0700

    remove debug-kb spec scaffolding files (left from investigation)
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---
 tests/debug-kb.spec.js  | 51 --------------------------------------
 tests/debug-kb2.spec.js | 66 -------------------------------------------------
 tests/debug-kb3.spec.js | 47 -----------------------------------
 3 files changed, 164 deletions(-)

diff --git a/tests/debug-kb.spec.js b/tests/debug-kb.spec.js
deleted file mode 100644
index 2eb454b..0000000
--- a/tests/debug-kb.spec.js
+++ /dev/null
@@ -1,51 +0,0 @@
-const { test, expect } = require('@playwright/test');
-
-test('debug - hover and key behavior', async ({ page }) => {
-  await page.addInitScript(() => {
-    try { localStorage.setItem('wallco-age-skipped', '1'); } catch {}
-  });
-  
-  await page.goto('/designs?review=1', { waitUntil: 'domcontentloaded' });
-  await expect(page.locator('.design-card.review-card').first()).toBeVisible({ timeout: 15_000 });
-  
-  const cards = page.locator('.design-card.review-card');
-  const count = await cards.count();
-  console.log('Card count:', count);
-  
-  const card4 = cards.nth(4);
-  const id4 = await card4.getAttribute('data-id');
-  console.log('Card 4 data-id:', id4);
-  
-  // Check btn-pair exists
-  const hasPairBtn = await card4.locator('.btn-pair').count();
-  console.log('Has btn-pair:', hasPairBtn);
-  
-  // Check what btn-pair actually clicks
-  const btnPairVisible = await card4.locator('.btn-pair').isVisible();
-  console.log('btn-pair visible:', btnPairVisible);
-  
-  // Try hover
-  await card4.hover();
-  await page.waitForTimeout(300);
-  
-  // Check if kbd-focus was set
-  const hasFocus = await card4.evaluate(el => el.classList.contains('kbd-focus'));
-  console.log('Has kbd-focus after hover:', hasFocus);
-  
-  // Check FOCUSED_CARD in window
-  const focusedId = await page.evaluate(() => {
-    return window.FOCUSED_CARD ? window.FOCUSED_CARD.dataset.id : 'null';
-  });
-  console.log('FOCUSED_CARD id:', focusedId);
-  
-  // Check the mouseover event listener is on document
-  const hasListener = await page.evaluate(() => {
-    // try dispatching mouseover on the card
-    const card = document.querySelectorAll('.design-card.review-card')[4];
-    if (!card) return 'no card at index 4';
-    const event = new MouseEvent('mouseover', { bubbles: true });
-    card.dispatchEvent(event);
-    return window.FOCUSED_CARD ? window.FOCUSED_CARD.dataset.id : 'still null';
-  });
-  console.log('After manual mouseover dispatch, FOCUSED_CARD:', hasListener);
-});
diff --git a/tests/debug-kb2.spec.js b/tests/debug-kb2.spec.js
deleted file mode 100644
index 098c85a..0000000
--- a/tests/debug-kb2.spec.js
+++ /dev/null
@@ -1,66 +0,0 @@
-const { test, expect } = require('@playwright/test');
-
-test('debug2 - check review mode JS running + FOCUSED_CARD via closure', async ({ page }) => {
-  await page.addInitScript(() => {
-    try { localStorage.setItem('wallco-age-skipped', '1'); } catch {}
-  });
-  
-  await page.goto('/designs?review=1', { waitUntil: 'domcontentloaded' });
-  await expect(page.locator('.design-card.review-card').first()).toBeVisible({ timeout: 15_000 });
-  
-  // Check if review mode JS markers exist
-  const hasKbdStyle = await page.evaluate(() => {
-    const styles = Array.from(document.querySelectorAll('style'));
-    return styles.some(s => s.textContent.includes('kbd-focus'));
-  });
-  console.log('kbd-focus style injected:', hasKbdStyle);
-  
-  const hasToast = await page.evaluate(() => {
-    // try show toast to see if fn exists
-    return typeof document.querySelectorAll('.design-card.review-card').length;
-  });
-  console.log('cards type:', hasToast);
-  
-  // Check btn-pair is visible (not covered)
-  const card4 = page.locator('.design-card.review-card').nth(4);
-  await card4.scrollIntoViewIfNeeded();
-  await page.waitForTimeout(300);
-  
-  const rect = await card4.evaluate(el => {
-    const r = el.getBoundingClientRect();
-    return { top: r.top, left: r.left, width: r.width, height: r.height };
-  });
-  console.log('Card 4 rect:', JSON.stringify(rect));
-  
-  // Directly set FOCUSED_CARD by injecting into page
-  const setResult = await page.evaluate(() => {
-    // Get the IIFE-scoped FOCUSED_CARD by patching mouseover event
-    // Try dispatching from a card and checking if setFocused was called
-    const card = document.querySelectorAll('.design-card.review-card')[4];
-    if (!card) return 'no card';
-    // Real mouseover from element
-    const e = new MouseEvent('mouseover', { bubbles: true, cancelable: true });
-    document.dispatchEvent(Object.assign(e, { target: card }));
-    return 'dispatched on document';
-  });
-  console.log('Direct dispatch result:', setResult);
-  
-  // After hover, check kbd-focus
-  await card4.hover({ force: true });
-  await page.waitForTimeout(500);
-  const focusAfterForceHover = await card4.evaluate(el => el.classList.contains('kbd-focus'));
-  console.log('kbd-focus after force hover:', focusAfterForceHover);
-  
-  // Try clicking btn-keep to see if it responds
-  const decisionBefore = await card4.getAttribute('data-decision');
-  console.log('decision before btn click:', decisionBefore);
-  await card4.locator('.btn-keep').click();
-  await page.waitForTimeout(500);
-  const decisionAfter = await card4.getAttribute('data-decision');
-  console.log('decision after btn-keep click:', decisionAfter);
-  
-  // Close to avoid Ollama wait
-  await page.evaluate(() => {
-    // try to cancel Ollama call somehow - just set the state back
-  });
-});
diff --git a/tests/debug-kb3.spec.js b/tests/debug-kb3.spec.js
deleted file mode 100644
index 36eabc4..0000000
--- a/tests/debug-kb3.spec.js
+++ /dev/null
@@ -1,47 +0,0 @@
-const { test, expect } = require('@playwright/test');
-
-test('debug3 - check what hostname sees and review mode rendering', async ({ page }) => {
-  await page.addInitScript(() => {
-    try { localStorage.setItem('wallco-age-skipped', '1'); } catch {}
-  });
-  
-  await page.goto('/designs?review=1', { waitUntil: 'networkidle' });
-  
-  // Check if review-card class exists at all
-  const reviewCardCount = await page.locator('.design-card.review-card').count();
-  console.log('review-card count:', reviewCardCount);
-  
-  // Check for the admin block elements
-  const hasAdminBanner = await page.locator('.admin-banner').count();
-  console.log('admin-banner count:', hasAdminBanner);
-  
-  const hasChatModal = await page.locator('#chat-modal').count();
-  console.log('#chat-modal count:', hasChatModal);
-  
-  const hasPairModal = await page.locator('#pair-modal').count();
-  console.log('#pair-modal count:', hasPairModal);
-  
-  // Check styles for kbd-focus
-  const hasKbdStyle = await page.evaluate(() => {
-    return Array.from(document.querySelectorAll('style'))
-      .some(s => s.textContent.includes('kbd-focus'));
-  });
-  console.log('kbd-focus style exists (post-networkidle):', hasKbdStyle);
-  
-  // Check btn-keep on first card
-  const hasBtnKeep = await page.locator('.design-card.review-card').first().locator('.btn-keep').count();
-  console.log('btn-keep on first card:', hasBtnKeep);
-  
-  // Try hover and wait longer
-  const card4 = page.locator('.design-card.review-card').nth(4);
-  await card4.hover();
-  await page.waitForTimeout(1000);
-  const hasFocusAfterHover = await card4.evaluate(el => el.classList.contains('kbd-focus'));
-  console.log('kbd-focus after 1s hover wait:', hasFocusAfterHover);
-  
-  // Try pressing K and watch what happens to data-decision
-  await page.keyboard.press('k');
-  await page.waitForTimeout(500);
-  const decision = await card4.getAttribute('data-decision');
-  console.log('data-decision after K press:', JSON.stringify(decision));
-});

← 0afc54c fix review-mode IIFE syntax error + add keyboard-shortcut e2  ·  back to Wallco Ai  ·  fix(wallco-ai): 404 on non-numeric /design/:id to avoid WHER d8df29d →