From d52eb43a32df02e5d00505231566c9cecaa56de1 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Wed, 29 Apr 2026 18:00:19 +0200 Subject: [PATCH] Fix: auto-fill target translation with best match (not only single result) Co-Authored-By: Claude Opus 4.6 (1M context) --- studio-v2/app/vocabulary/components/UnitBuilder.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studio-v2/app/vocabulary/components/UnitBuilder.tsx b/studio-v2/app/vocabulary/components/UnitBuilder.tsx index cfaf581..c624c93 100644 --- a/studio-v2/app/vocabulary/components/UnitBuilder.tsx +++ b/studio-v2/app/vocabulary/components/UnitBuilder.tsx @@ -79,8 +79,8 @@ export default function UnitBuilder({ if (resp.ok) { const data = await resp.json() setSuggestions(data.results || []) - // Auto-fill target if exactly one match - if (data.results?.length === 1 && !manualTarget) { + // Auto-fill target with best match + if (data.results?.length > 0 && !manualTarget) { setManualTarget(data.results[0].target_text) } }