Fix: auto-fill target translation with best match (not only single result)
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 30s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m18s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 22s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-29 18:00:19 +02:00
parent bde0d57b5a
commit d52eb43a32
@@ -79,8 +79,8 @@ export default function UnitBuilder({
if (resp.ok) { if (resp.ok) {
const data = await resp.json() const data = await resp.json()
setSuggestions(data.results || []) setSuggestions(data.results || [])
// Auto-fill target if exactly one match // Auto-fill target with best match
if (data.results?.length === 1 && !manualTarget) { if (data.results?.length > 0 && !manualTarget) {
setManualTarget(data.results[0].target_text) setManualTarget(data.results[0].target_text)
} }
} }