mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 00:03:45 +00:00
RepoSettingsDraftInput holds unconfirmed IME text in local draft state and only persists on compositionend (so the async store echo cannot cancel the composition). If the user types a Hangul syllable and immediately navigates back out of project settings while it is still composing, no compositionend fires — the last syllable stays in the draft and never reaches the store, so the project's display name loses its final character. Users have to click back into the field or press Enter (both force compositionend) to make it stick. Flush the visible draft on blur and on unmount, guarded by lastPersistedRef so it is a no-op when a keystroke or compositionend already persisted that value. The flush closure is published from an effect (post-commit) so a discarded concurrent render cannot leave the cleanup pointing at uncommitted draft state. Adds blur / unmount / no-double-persist / no-op regression tests to the component's existing suite. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>