fix(dashboard): umlauts/dead-key input in xterm (#76233) - #76337
fix(dashboard): umlauts/dead-key input in xterm (#76233)#76337webtecnica wants to merge 1 commit into
Conversation
Related: #76257 targets the same dead-key report (#76233), but the live diffs use different fallback predicates: this patch counts only onData during composition, while #76257 defers a pending commit and cancels it when matching terminal data arrives. Please choose the intended xterm composition contract; these are not duplicates. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for addressing a verified gap in the dashboard input path: current main records compositionend only for mobile replacement handling (web/src/pages/ChatPage.tsx:766-771), while PTY input is forwarded from term.onData (web/src/pages/ChatPage.tsx:1182-1212).
Problems
web/src/pages/ChatPage.tsx:1256treats any printableonDataevent during composition as proof that xterm delivered the composition, and:822then suppresses the fallback. Unrelated printable input can therefore drop the pending composed text. The related #76257 implementation explicitly keeps pending text unless terminal data matches it.- The diff changes only
web/src/pages/ChatPage.tsx; it adds no regression coverage for the asynchronous fallback and duplicate-suppression contract.
Suggested changes
- Keep a pending composition value and cancel only on terminal data correlated to that value, rather than a count of arbitrary printable data.
- Extract and test that helper for dropped, matching, unrelated, rapid, empty, and disposed compositions.
This is an automated hermes-sweeper review.
| // bytes (e.g. DEL from an IME backspace) don't count as delivered | ||
| // composition text. | ||
| // eslint-disable-next-line no-control-regex -- intentional control-byte test | ||
| if (composing && !/[\x00-\x1f\x7f]/.test(data)) { |
There was a problem hiding this comment.
This predicate counts every printable onData payload during composition, not just the committed value from this composition. Unrelated input can make the counter nonzero and suppress the fallback at line 822, dropping ev.data; retain a pending commit and clear it only when terminal data is correlated to that pending value.
Closes #76233