Repository navigation
fix(dashboard-popout): forward macOS IME native-text commits in the preview terminal - #9771
Merged
brennanb2025 merged 8 commits intoJul 21, 2026
Conversation
…review terminal The preview terminal enables xterm's kitty keyboard protocol (via buildDefaultTerminalOptions), whose encoder can encode and cancel a printable keydown before Chromium commits the real IME/native text — silently dropping macOS input-source commits and synthetic Unicode injection. Main-window panes guard this with the IME native-text forwarder; the pop-out preview never installed it. Install the composition tracker + forwarder (macOS-only, mirroring TerminalPane) and claim native-text key events at the top of the preview's custom key handler so the committed glyph reaches the PTY via terminal.input() and the existing user-input routing.
…y-paste' into brennanb2025/popout-ime-input # Conflicts: # src/renderer/src/components/dashboard-popout/AgentTerminalPreview.test.tsx
…y-paste' into brennanb2025/popout-ime-input
Co-authored-by: OrcaWin <[email protected]>
brennanb2025
merged commit Jul 21, 2026
0b53275
into
brennanb2025/popout-terminal-copy-paste
14 checks passed
brennanb2025
added a commit
that referenced
this pull request
Jul 21, 2026
…dow (#9765) * fix(dashboard-popout): wire terminal copy/paste in the popped-out window The Edit menu's Paste is a custom item that routes Cmd/Ctrl+V to the focused window as ui:appMenuPaste, and only the main window's React root listens for it — the popout dropped it, so paste silently did nothing. The copy chord similarly resolves in the main window's before-input-event handler, which the popout window never registers; the menu's role:'copy' no-ops on xterm's empty hidden textarea. AgentTerminalPreview now subscribes to onAppMenuPaste (guarded on focus inside the preview) and pastes via terminal.paste(), which xterm flags as user input so the existing preview->PTY routing and main-process input limits apply. A custom key handler honors the terminal.copySelection and terminal.paste keybindings, skipping plain Mod+V since the menu accelerator owns that chord (handling it twice would paste double). The popout bootstrap fetches keybinding overrides so custom bindings apply. * fix(dashboard-popout): harden terminal clipboard routing * fix(dashboard-popout): authorize terminal clipboard text * test(dashboard-popout): harden terminal paste coverage * fix(terminal): normalize streamed paste newlines * fix(dashboard-popout): forward macOS IME native-text commits in the preview terminal (#9771) * fix(dashboard-popout): forward macOS IME native-text commits in the preview terminal The preview terminal enables xterm's kitty keyboard protocol (via buildDefaultTerminalOptions), whose encoder can encode and cancel a printable keydown before Chromium commits the real IME/native text — silently dropping macOS input-source commits and synthetic Unicode injection. Main-window panes guard this with the IME native-text forwarder; the pop-out preview never installed it. Install the composition tracker + forwarder (macOS-only, mirroring TerminalPane) and claim native-text key events at the top of the preview's custom key handler so the committed glyph reaches the PTY via terminal.input() and the existing user-input routing. * fix(dashboard-popout): prewarm IME input source * fix(skills): preserve released history across new tags (#9778) Co-authored-by: OrcaWin <[email protected]> * fix(skills): record latest Linear release history (#9777) --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: OrcaWin <[email protected]> --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: OrcaWin <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…dow (stablyai#9765) * fix(dashboard-popout): wire terminal copy/paste in the popped-out window The Edit menu's Paste is a custom item that routes Cmd/Ctrl+V to the focused window as ui:appMenuPaste, and only the main window's React root listens for it — the popout dropped it, so paste silently did nothing. The copy chord similarly resolves in the main window's before-input-event handler, which the popout window never registers; the menu's role:'copy' no-ops on xterm's empty hidden textarea. AgentTerminalPreview now subscribes to onAppMenuPaste (guarded on focus inside the preview) and pastes via terminal.paste(), which xterm flags as user input so the existing preview->PTY routing and main-process input limits apply. A custom key handler honors the terminal.copySelection and terminal.paste keybindings, skipping plain Mod+V since the menu accelerator owns that chord (handling it twice would paste double). The popout bootstrap fetches keybinding overrides so custom bindings apply. * fix(dashboard-popout): harden terminal clipboard routing * fix(dashboard-popout): authorize terminal clipboard text * test(dashboard-popout): harden terminal paste coverage * fix(terminal): normalize streamed paste newlines * fix(dashboard-popout): forward macOS IME native-text commits in the preview terminal (stablyai#9771) * fix(dashboard-popout): forward macOS IME native-text commits in the preview terminal The preview terminal enables xterm's kitty keyboard protocol (via buildDefaultTerminalOptions), whose encoder can encode and cancel a printable keydown before Chromium commits the real IME/native text — silently dropping macOS input-source commits and synthetic Unicode injection. Main-window panes guard this with the IME native-text forwarder; the pop-out preview never installed it. Install the composition tracker + forwarder (macOS-only, mirroring TerminalPane) and claim native-text key events at the top of the preview's custom key handler so the committed glyph reaches the PTY via terminal.input() and the existing user-input routing. * fix(dashboard-popout): prewarm IME input source * fix(skills): preserve released history across new tags (stablyai#9778) Co-authored-by: OrcaWin <[email protected]> * fix(skills): record latest Linear release history (stablyai#9777) --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: OrcaWin <[email protected]> --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: OrcaWin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CJK/IME input can be silently dropped in the popped-out dashboard's terminal dialog (found in a popout functionality audit). The preview terminal enables xterm's kitty keyboard protocol via
buildDefaultTerminalOptions, and when the agent TUI has kitty mode active, xterm's encoder can encode + cancel a printable keydown before Chromium commits the real IME/native text — dropping certain macOS input-source commits and synthetic Unicode injection. Main-window panes guard this withterminal-ime-native-text-forwarder; the pop-out preview never installed it.Fix
Mirror the TerminalPane install (macOS-only, like the pane's):
installTerminalImeCompositionTracker+installTerminalImeNativeTextForwarderon the preview terminal's element once it opens.attachCustomKeyEventHandler, so the claim composes with the copy/paste chords from fix(dashboard-popout): wire terminal copy/paste in the popped-out window #9765 rather than replacing them). Claimed keydowns bypass the kitty encoder; the committed glyph is forwarded from theinputevent viaterminal.input(), which flows through the preview's existing user-input routing to the PTY.Ordinary composition-based IME typing was already fine; this covers the kitty-mode native-commit path (e.g. agents like Claude Code that enable kitty keyboard mode).
Stacking
Based on
brennanb2025/popout-terminal-copy-paste(#9765) because both PRs modify the same custom key handler inAgentTerminalPreview.tsx— merge #9765 first. The latest #9765 head is merged into this branch.Reliability and performance
terminal-input.ime-and-synthetic-forwarding— native-text commits must reach the intended PTY exactly once, without xterm sending the swallowed key first.ptyIdexactly once, claimed-event bypass without breaking clipboard chords, and single cleanup on both unmount and PTY loss.terminalPreview.input(ptyId, data)route.Tests
localStorageis unavailable there, plus two environment-sensitive relay assertions); the project/CI runtime is Node 24.