From f10ebb8ba685b88a5d43b9537cc28af34ef43119 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 15 Mar 2026 00:55:14 -0700 Subject: [PATCH] =?UTF-8?q?Debug=20platform=20image=20matching=20=E2=80=94?= =?UTF-8?q?=20log=20keys=20and=20item=20names=20for=20mismatch=20diagnosis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- portal/setup-wizard.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/portal/setup-wizard.html b/portal/setup-wizard.html index 04f9f56..f0822a3 100644 --- a/portal/setup-wizard.html +++ b/portal/setup-wizard.html @@ -1726,9 +1726,12 @@ body: JSON.stringify({ mode: 'platform_images', url: platformUrl, items: allItems.map(i => i.name) }) }); const imgResult = await imgResp.json(); + console.log('Platform images raw response:', imgResult); if (imgResult.OK && imgResult.imageMap) { platformImageMap = imgResult.imageMap; const matchCount = Object.keys(platformImageMap).length; + console.log('Image map keys (first 10):', Object.keys(platformImageMap).slice(0, 10)); + console.log('Item names (first 10):', allItems.slice(0, 10).map(i => i.name)); // Match images to items by name let matched = 0; allItems.forEach(item => { @@ -1738,6 +1741,12 @@ } }); console.log(`Platform images: ${matchCount} found, ${matched} matched to items`); + if (matchCount > 0 && matched === 0) { + console.log('MISMATCH DEBUG — first imageMap key:', JSON.stringify(Object.keys(platformImageMap)[0])); + console.log('MISMATCH DEBUG — first item name:', JSON.stringify(allItems[0]?.name)); + } + } else { + console.log('Platform images: no imageMap in response', imgResult); } } catch (err) { console.error('Platform image fetch error:', err);