With the example inputs, the results header shows Results (11 out of 10 mapped).
Cause: frontend/src/pages/Home.tsx:33 computes mappedCount by counting result rows with mappingConfidence >= 0.9:
const mappedCount = useMemo(() => resultsRef.current.filter(r => parseFloat(r.mappingConfidence) >= 0.9).length, [resultsVersion])
but resultsRef.current holds one row per annotation, and a single input property can yield several rows (multiple candidate terms). The denominator at line 556 is lastSearchParams.properties.length — the number of distinct inputs — so any input with two or more high-confidence annotations pushes the numerator past the denominator.
Fix: count distinct mapped inputs instead of rows, e.g.
const mappedCount = useMemo(
() => new Set(
resultsRef.current
.filter(r => parseFloat(r.mappingConfidence) >= 0.9)
.map(r => r.textToMap)
).size,
[resultsVersion])
(textToMap is the input-property column used for the TSV export at line 291; if inputs can repeat with different propertyType, key the set on textToMap + '\t' + r.propertyType instead.)
🤖 Generated with Claude Code
With the example inputs, the results header shows Results (11 out of 10 mapped).
Cause:
frontend/src/pages/Home.tsx:33computesmappedCountby counting result rows withmappingConfidence >= 0.9:but
resultsRef.currentholds one row per annotation, and a single input property can yield several rows (multiple candidate terms). The denominator at line 556 islastSearchParams.properties.length— the number of distinct inputs — so any input with two or more high-confidence annotations pushes the numerator past the denominator.Fix: count distinct mapped inputs instead of rows, e.g.
(
textToMapis the input-property column used for the TSV export at line 291; if inputs can repeat with differentpropertyType, key the set ontextToMap + '\t' + r.propertyTypeinstead.)🤖 Generated with Claude Code