fix(voice): resolve area names to the place they name

Three resolver fixes from checking the review focus:
- A natural region named like a country or state no longer hides it.
  "India" was the peninsula, "Japan" an island group, "Florida" the
  peninsula and "Punjab" a desert, so bare "Punjab" never asked which one.
  The region still answers when asked for by level, and when no unit truly
  has the name ("Great Britain" finds the United Kingdom only by alias).
- Same-named units get their own candidate: "Washington" offered WA and DC
  with one id, so either choice was DC and a DC lookup overwrote a stored
  Washington State. Ids now carry the region code, and choices show it.
- A bundled unit that only shares the name ("Azad Kashmir" for "Kashmir")
  no longer ends the search; the outline ladder still looks, and the
  mismatch is kept if it finds nothing. Retired zones stay refused.
This commit is contained in:
Manjunath committed 2026-11-03 17:55:33 +05:30
1 parent d18fdfa47f
commit 552f3de3ff
4 files changed
+143 -14

No files matched your search

+3 -1
View File
@@ -80,7 +80,9 @@ function candidateLines(candidates) {
? t(LEVEL_WORDS[candidate.level])
: candidate.level
: null;
const detail = [level, candidate?.country].filter(Boolean).join(', ');
const detail = [level, candidate?.region, candidate?.country]
.filter(Boolean)
.join(', ');
return `${i + 1} · ${spokenLabel(candidate?.name || 'Unnamed', 40)}${detail ? ` — ${detail}` : ''}`;
});
}