hex/tests/golden/rune-onboarding-dark.png
Dax 8d6ef0f016
onboarding: only offer a language switch when the system has one (#1550)
* onboarding: only offer a language switch when the system has one

The language capsule on the download page drew a dropdown chevron, but one
press swapped the selection and started another download. It also fell back
to French whenever the system language was English or unsupported, so
English installs offered French for no reason and a Japanese install lost
its own recommendation when toggling back.

The alternate is now the model recommended for the system's preferred
language, reusing recommended_selection. When that recommendation is
English there is no alternate: the capsule is a plain label with no
chevron, focus, or press handler. When there is one, a single press toggles
between English and that model, and the button's label says so.

* onboarding: decide the language switch by language, not model

A Cohere, Whisper, or Parakeet v3 English selection was treated as a
non-English choice, so the capsule read English, looked pressable, and
"switched" English to English while downloading another model. Decide by
the selection language instead, so every English choice on an English
system has no alternate.

The other-language label was a OnceLock, so a later setup kept the first
run's language on screen. Replace it on every run that shows a non-English
language.

Japanese is recommended Whisper large-v3-turbo, not Qwen3-ASR. Keep the
button's accessible label as Language, with the switch explained in its
description, and cover the no-op and toggle cases in onboarding tests.

* onboarding: replace or clear the other-language label on every open

An English-only run has no other language, so clear the label instead of
keeping the previous run's language; every open now writes the label
exactly once.

* tests: move the language capsule test with the onboarding checks

tests.rs is already over the repository's cap, so move its UI test under
src/rune_ui/tests/onboarding_check.rs; tests.rs returns to origin/dev's
length. Every newly touched file stays under 1,500 lines.

Ui carries a test-only preferred system language so the English cases do
not depend on the host locale, and the other-language label is thread-local
in tests so parallel golden renders cannot clear it. The test passes under
both the normal locale and fr_FR.
2026-11-08 12:49:16 -05:00

34 KiB
1960x1520px