From 23f4cc0bbd8ef903c5f0c1a0b084128555c3af2d Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Thu, 12 Mar 2026 15:44:43 +0300 Subject: [PATCH] fix(web-test): fillTableRow fuzzy match for CamelCase cell names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cell IDs in 1C tables are CamelCase without spaces (e.g. "ВариантыАрхитектурыВариантАрхитектуры"), but users pass keys with spaces ("Вариант архитектуры"). Added space-stripped fallback to fuzzy match so fillTableRow correctly maps user keys to grid cells. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/web-test/scripts/browser.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.claude/skills/web-test/scripts/browser.mjs b/.claude/skills/web-test/scripts/browser.mjs index 76557f58..0df07237 100644 --- a/.claude/skills/web-test/scripts/browser.mjs +++ b/.claude/skills/web-test/scripts/browser.mjs @@ -2055,7 +2055,7 @@ export async function fillTableRow(fields, { tab, add, row } = {}) { } prevCellId = cell.id; - // Fuzzy match cell name to user field: exact → suffix → includes + // Fuzzy match cell name to user field: exact → suffix → includes → no-space includes const cellLower = cell.fullName.toLowerCase(); let matchedKey = null; for (const [key, info] of pending) { @@ -2065,6 +2065,12 @@ export async function fillTableRow(fields, { tab, add, row } = {}) { matchedKey = key; break; } + // CamelCase cell names have no spaces — try matching without spaces + const klNoSpace = kl.replace(/\s+/g, ''); + if (klNoSpace && (cellLower.endsWith(klNoSpace) || cellLower.includes(klNoSpace))) { + matchedKey = key; + break; + } } if (!matchedKey) {