Skip to content

Controller feature parity: fuzzy script search and variant warning (BL-14903, BL-14904) - #150

Merged
andrew-polk merged 1 commit into
nextfrom
controllerFeatureParity
Jul 23, 2026
Merged

Controller feature parity: fuzzy script search and variant warning (BL-14903, BL-14904)#150
andrew-polk merged 1 commit into
nextfrom
controllerFeatureParity

Conversation

@andrew-polk

@andrew-polk andrew-polk commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Brings the framework-agnostic language-chooser controller to feature parity with the react-mui UI, ahead of switching react over to the common controller.

Changes

  • Fuzzy script search (BL-14903)searchScriptOptions(query) on the view-model returns all scripts for an empty query, otherwise fuzzy-matches on script name and code (best matches first), mirroring the react-mui customization dialog.
  • Invalid-variant warning (BL-14904) — a new warnInvalidVariant callback field fires when a submitted variant/dialect (or an unlisted language name) is not a valid BCP 47 variant subtag. Submission still proceeds — the resulting tag stays valid because dialects become private-use (-x-) subtags — matching the react-mui warn-and-submit behavior. Wired into both submitUnlistedLanguageModal and submitCustomizeLanguageModal.

Tests

Adds 9 view-model specs covering empty-query/name/code script search and the variant-warning fire/no-fire cases (valid, empty, ai- prefixed, unlisted name). Full controller suite: 103 passing.

Ref: BL-14903, BL-14904

🤖 Generated with Claude Code


This change is Reviewable

…t format warning

Brings the controller to feature parity with the react-mui UI ahead of
switching react to use the common controller:

- searchScriptOptions() returns all scripts for an empty query, otherwise
  fuzzy matches on script name and code (BL-14903)
- warnInvalidVariant callback field fires when a submitted variant (or
  unlisted language name) is not a valid BCP 47 variant subtag; submission
  still proceeds, matching the react-mui warn-and-submit behavior (BL-14904)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andrew-polk

Copy link
Copy Markdown
Contributor Author

Posted by Claude Opus 4.8 (1M context) (preflight)

Consulted Devin on 2026-07-23 17:32 UTC up to commit 1b9c99a.

Result: clean. No Bugs and no Investigate flags. Devin raised 2 Informational items (not mirrored as threads, low signal):

  • getAllScripts() is recomputed on each search call — Devin notes this is a minor inefficiency, not a correctness bug, and matches the existing react-mui path (which also recomputes options).
  • Confirmed the new variant-warning behavior is at parity with the react-mui dialog (fires on the raw name/dialect before formatting; ai- prefix exempt). No discrepancy found.

CI run-tests and the full local suite (7 packages, 327 tests) are green at this commit.

@andrew-polk
andrew-polk marked this pull request as ready for review July 23, 2026 19:09
@andrew-polk
andrew-polk merged commit 21d2a4d into next Jul 23, 2026
1 check passed
@andrew-polk
andrew-polk deleted the controllerFeatureParity branch July 23, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant