Repository navigation
Support Vietnamese IME and synthetic Unicode text forwarding in terminal - #6682
Conversation
Previously, the terminal IME workaround only forwarded punctuation for macOS CJK input methods. This generalizes the system into a native text forwarder that also handles: - Short text replacements for Vietnamese input methods (Telex, VNI). - Synthesized Unicode inputs with unreliable physical key metadata. This prevents xterm's kitty keyboard protocol from encoding and canceling these keydowns before the native glyphs can be committed.
…into bug-help-chinese-but-not-vietnamese
📝 WalkthroughWalkthroughThe Mac IME workaround in the terminal pane is replaced end-to-end. The 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 39ded567-dd89-472c-a8ac-9ba07410309e
📒 Files selected for processing (7)
src/renderer/src/components/terminal-pane/terminal-ime-input-source.test.tssrc/renderer/src/components/terminal-pane/terminal-ime-input-source.tssrc/renderer/src/components/terminal-pane/terminal-ime-native-text-forwarder.test.tssrc/renderer/src/components/terminal-pane/terminal-ime-native-text-forwarder.tssrc/renderer/src/components/terminal-pane/terminal-ime-punctuation-forwarder.test.tssrc/renderer/src/components/terminal-pane/terminal-ime-punctuation-forwarder.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
💤 Files with no reviewable changes (2)
- src/renderer/src/components/terminal-pane/terminal-ime-punctuation-forwarder.ts
- src/renderer/src/components/terminal-pane/terminal-ime-punctuation-forwarder.test.ts
…tablyai#6682) Previously, the terminal IME workaround only forwarded punctuation for macOS CJK input methods. This generalizes the system into a native text forwarder that also handles: - Short text replacements for Vietnamese input methods (Telex, VNI). - Synthesized Unicode inputs with unreliable physical key metadata. This prevents xterm's kitty keyboard protocol from encoding and canceling these keydowns before the native glyphs can be committed.
Summary
This PR supports Vietnamese IME input methods (e.g., Telex, VNI, UniKey) and synthetic Unicode character injection in the terminal pane. It replaces the CJK-specific
terminal-ime-punctuation-forwarderwith a generalizedterminal-ime-native-text-forwarderthat handles both punctuation and short text replacements (using feature flags matched from the active keyboard input source). It also introduces fallback forwarding for synthetic Unicode inputs that lack standard physical key identity.Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildDetailed testing notes: New unit tests added in
terminal-ime-native-text-forwarder.test.tsand updated interminal-ime-input-source.test.tscover Vietnamese input sources, CJK punctuation, and synthetic Unicode injection scenarios.AI Review Report
Security Audit
Notes
This workaround only targets macOS (
navigator.userAgent.includes('Mac')) to address xterm's Kitty keyboard protocol swallowing native input events.