fix(web): find French in the voice language filter with decomposed accents #48294
main fromrefs/pull/48294/head·opened View on GitHubProblem#
In SpeechModelBrowser (apps/web/src/components/settings/VoiceSettingsPanel.tsx), the voice model language filter lowercases the search query and Intl.DisplayNames label without Unicode normalization. Pasting a canonically equivalent NFD string such as français (c + U+0327) fails to match the NFC label français (U+00E7), showing no matching languages even though the text looks identical.
Deterministic repro on origin/main (4b8199987cb63f82912b8f3dbe9de6a96cdb057b):
- Set Settings → General → Language to
Français(fr). - Open Settings → Voice (
/settings/voice), select a local environment under Transcrire avec with any speech model catalog entry containing"fr"(e.g.languages: ["en", "fr", "de"]). - Open Filtrer par langue and enter
"franc\u0327ais"(literalcfollowed byU+0327) into Rechercher une langue.
- Observed: Menu shows
Aucune langue ne correspond.(getByRole("menuitemcheckbox", { name: "français", exact: true })has count0), while NFC"fran\u00e7ais"showsfrançais. - Expected: The
françaischeckbox option appears for both NFC and NFD forms.
Change#
Normalize both languageSearch.trim() and languageLabel(code, locale) to NFC (.normalize("NFC")) before .toLocaleLowerCase() in SpeechModelBrowser (apps/web/src/components/settings/VoiceSettingsPanel.tsx), keeping language-code matching unchanged. This covers both web and desktop (Electron) Voice settings; mobile (VoiceModelSection.tsx) has no language search filter. Added a browser regression test in apps/web/src/components/settings/VoiceSettingsPanel.browser.test.tsx.
Scope#
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification#
- Focused browser regression test (
vp test run apps/web/src/components/settings/VoiceSettingsPanel.browser.test.tsx -t "finds French in the voice language filter with decomposed accents"):- Base (
4b8199987cb63f82912b8f3dbe9de6a96cdb057b): FAIL — NFC"fran\u00e7ais"matchedfrançaisin 12 ms; NFD"franc\u0327ais"timed out waiting formenuitemcheckboxfrançais. - Head (
6a728b6822257c9d7061fcc7be91f637461050d3): PASS (1445 ms) — NFC, NFD, and code ("fr") queries all matchfrançais.
- Base (
- Real-app scenario proof (
vp run scenarios:proveagainst base vs head):failsOnBase: true(expected: count 1,observed: count 0),passesOnHead: true. Full transcript: https://gist.github.com/saphid/97cd29164b81cbd3a17c721f47255414 vp run check:changed: exit0(format,lint,knip,typecheck,VoiceSettingsPanel.browser.test.tsx24/24 passed,reactCompilerCoverage).
Before (4b8199987cb6) | After (6a728b682225) |
|---|---|
![]() | ![]() |
Not shown: Full repo-wide test suite and packaged Electron desktop build (desktop renders the same apps/web VoiceSettingsPanel component).
Authored by Gemini 4 Neon (Antigravity); reviewed by GPT-6.2 Sol (Codex).
Not shown#
- apps/web/src/components/settings/VoiceSettingsPanel.browser.test.tsx:1058 — The
frassertion does not independently verify code matching becausefrançaisalso containsfr; usede→allemand, or stop describing that assertion as proof of the code-matching branch. - apps/mobile/src/features/settings/SettingsVoiceModelsRouteScreen.tsx:46 — The draft overstates the mobile distinction: mobile can search model language codes, but it has no picker that searches localized language labels. Clarify that distinction in Change; no mobile code change is needed.
- 1
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Approvability#
Verdict: Approved at
eb613b9Macroscope's review found this PR approvable — The language filter now matches canonically equivalent accented text, including decomposed French accents. The change only affects search-menu results and leaves language selection and product defaults unchanged.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review.
Walkthrough
-
Language filtering now normalizes the trimmed query and localized labels to NFC before lowercasing. A browser test checks French language matching with precomposed accents, decomposed accents, and the prefix
fr.Changes: Voice language search
Layer / File(s) Summary Normalize and test language filtering
apps/web/src/components/settings/VoiceSettingsPanel.tsx,apps/web/src/components/settings/VoiceSettingsPanel.browser.test.tsxSpeechModelBrowsernormalizes the query and localized labels to NFC before lowercasing. The browser test checks French matching with precomposed and decomposed accents, and withfr.Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Suggested reviewers:
juliusmarminge,tiliakoos
Merge Risk:
Minimal · up toeb613-
This change lets users find French in the voice language filter when the accent is typed in decomposed form. It affects only a small client-side filter and is easy to revert. There is no known merge-blocking risk.
Pre-merge checks:
4-
Check name Status Explanation Title check The title names the change: French matches in the voice language filter when the search uses decomposed (NFD) accents. The raw summary confirms the change normalizes the query and labels to NFC in Spe… Description check The description follows the template sections: Problem, Change, Scope, and Verification. It gives a clear repro, the exact code change, the reason no issue is needed, and focused test results with bas… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
-
Explanation
The title names the change: French matches in the voice language filter when the search uses decomposed (NFD) accents. The raw summary confirms the change normalizes the query and labels to NFC in SpeechModelBrowser, which is the main fix. It uses a conventional commit prefix, though the scope is a single component within web.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. It gives a clear repro, the exact code change, the reason no issue is needed, and focused test results with base and head revisions. It includes before/after screenshots, a scenario proof, and a list of unverified items. The Not shown section gives two review notes: the fr assertion does not prove code matching, and the mobile wording in Change should be clarified. These are non-critical gaps, so the description is mostly complete.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 43328e8
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e8f60633-9528-4c1d-ba44-116a8c85f69e
Commits-
Reviewing files that changed from the base of the PR and between 43328e8f0a680a491c84995b398f5c635ff37a90 and eb613b90c56713486230cae192ef5e8d1d20d91c.
Files selected for processing: 2-
apps/web/src/components/settings/VoiceSettingsPanel.browser.test.tsxapps/web/src/components/settings/VoiceSettingsPanel.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
-
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes