fix(dashboard): paste macOS Cmd+V in the agent dashboard pop-out (#40866)

The dashboard pop-out only claimed zoom chords in before-input-event, so
Kitty-mode xterm encoded Cmd+V as CSI u and consumed it before the Edit
menu accelerator could fire, typing a stray "v" instead of pasting.
Claim the chord with the shared isMacAppPasteInput matcher and route it
through the existing ui:appMenuPaste owner, matching the main window.

Fixes #40862

Co-authored-by: Neil <neil@stably.ai>
This commit is contained in:
Wooseong Kim
2026-11-11 02:55:49 -08:00
committed by GitHub
co-authored by Neil
parent 1a4b0c76b1
commit b981783e5d
+8 -1
View File
@@ -15,6 +15,7 @@ import {
type KeybindingOverrides
} from '../../shared/keybindings'
import { wslHostsWindowArguments } from '../wsl/host-lifecycle/wsl-host-gate'
import { isMacAppPasteInput } from './mac-app-paste-input'
const MIN_WIDTH = 480
const MIN_HEIGHT = 360
@@ -192,8 +193,14 @@ export function createOrFocusDashboardPopout(
}
})
// No renderer shortcut routing exists here; handle zoom chords and yield everything else.
// No renderer shortcut routing exists here; handle paste and zoom chords and yield everything else.
window.webContents.on('before-input-event', (event, input) => {
if (isMacAppPasteInput(input)) {
// Kitty-mode xterm encodes Cmd+V as CSI u and consumes it, so the Edit menu accelerator never fires.
event.preventDefault()
window.webContents.send('ui:appMenuPaste')
return
}
if (input.type !== 'keyDown') {
return
}