Skip to content

fix: Implement react-state-management and shared controller#145

Draft
andrew-polk wants to merge 2 commits intomainfrom
use-state-management-react
Draft

fix: Implement react-state-management and shared controller#145
andrew-polk wants to merge 2 commits intomainfrom
use-state-management-react

Conversation

@andrew-polk
Copy link
Contributor

@andrew-polk andrew-polk commented Mar 17, 2026

This change is Reviewable


Open with Devin

Move language chooser behavior into the shared controller and make the React hook a thin state-management-react adapter.

Svelte/common behavior changes:
- align shared search, selection, script, and customization flows with the pre-existing React semantics
- preserve custom display name while clearing region and dialect when the selected script changes
- restore manually entered tags through resetTo in the shared controller
- keep each in-flight search bound to the searchResultModifier that was active when the search started
- tighten unlisted-language validation so submit only becomes ready when the dialect has alphanumeric content and the region name is non-whitespace

React behavior changes:
- preserve the existing public hook API while sourcing behavior from the shared controller
- keep existing chooser behavior for normal flows, including immediate search reset semantics and selection callbacks
- fix the same unlisted-language validation bug for whitespace and punctuation-only values
- keep searchResultModifier behavior stable across async search batches

Validation:
- full workspace test suite passes after rebase onto state-management-react
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@andrew-polk andrew-polk force-pushed the use-state-management-react branch from 2c82dfe to 722e642 Compare March 17, 2026 23:30
@andrew-polk andrew-polk force-pushed the use-state-management-react branch from 722e642 to e78e551 Compare March 17, 2026 23:47
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