mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
#5071 fixed the composer only. In WebKit (the Mac and Linux apps, Safari) the commit keydown says key "Enter", so the app's other text fields still acted on it: the command palette ran the highlighted command; the font name, the model folder and a custom model ID were taken half-typed; the number fields were committed. In the web page of strata serve, Safari's commit Enter (isComposing false, keyCode 229) sent the message, and the commit Enter or the cancelling Escape ended a chat's rename or closed the answer editor. The app's fields use the composer's guard through useImeKeys() (lib/ime-keys.ts); the page gets the same rule in plain JavaScript (serve/web/ime.js, loaded before chats-ui.js and app.js). Tests: each engine's event order replayed through both copies, which must agree; a scan that fails when an input acts on Enter without the guard (fails on756242554); serve/test_web_ime.py (5 checks, all fail on756242554, pass here); a headless-Chrome replay in tools/webtest/browser_test.mjs. Not covered: a real IME in the packaged macOS / Linux app, and an Escape handled at window level by a dialog.