diff --git a/scripts/src/hwlab-node-web-observe-runner-source.ts b/scripts/src/hwlab-node-web-observe-runner-source.ts index 273cf8a5..5a82eabf 100644 --- a/scripts/src/hwlab-node-web-observe-runner-source.ts +++ b/scripts/src/hwlab-node-web-observe-runner-source.ts @@ -937,9 +937,9 @@ async function collectProviderCandidates() { const push = (kind, element, value, text) => { const normalizedValue = String(value || "").trim().slice(0, 160); const normalizedText = String(text || "").replace(/\s+/gu, " ").trim().slice(0, 220); - const label = `${normalizedValue} ${normalizedText}`.trim(); + const label = (normalizedValue + " " + normalizedText).trim(); if (!label) return; - const key = `${kind}:${label}`.toLowerCase(); + const key = (kind + ":" + label).toLowerCase(); if (seen.has(key)) return; seen.add(key); rows.push({ kind, value: normalizedValue, text: normalizedText, testId: String(element?.getAttribute?.("data-testid") || "").slice(0, 120), ariaLabel: String(element?.getAttribute?.("aria-label") || "").slice(0, 160) }); @@ -965,7 +965,7 @@ async function collectProviderCandidates() { const text = String(element.textContent || "").replace(/\s+/gu, " ").trim(); const ariaLabel = String(element.getAttribute("aria-label") || ""); const testId = String(element.getAttribute("data-testid") || ""); - const haystack = `${text} ${ariaLabel} ${testId}`; + const haystack = text + " " + ariaLabel + " " + testId; if (!/provider|profile|model|模型|提供|codex|openai|deepseek|gpt|api|flash|spark|claude|gemini|moon/iu.test(haystack)) continue; push("visible-control", element, element.getAttribute("value") || "", text || ariaLabel || testId); } @@ -3731,8 +3731,8 @@ function finalFlickerScope(sample) { const pathname = samplePathname(sample); const sessionId = sample?.routeSessionId || sample?.activeSessionId || workbenchSessionIdFromPath(pathname); if (!sessionId) return null; - if (!pathname.startsWith(`/workbench/sessions/${sessionId}`)) return null; - return `${sample?.pageRole || "control"}:${sessionId}`; + if (!pathname.startsWith("/workbench/sessions/" + sessionId)) return null; + return (sample?.pageRole || "control") + ":" + sessionId; } function samplePathname(sample) {