fix(desktop): prevent modifier key buffer resets, clipboard race on terminal accept, and redundant UIA settle snapshots

This commit is contained in:
Yun Chan 2026-10-31 04:19:53 +09:00
parent 6d909dd0e5
commit 41901c1ec5
10 changed files with 198 additions and 23 deletions

View file

@ -354,6 +354,42 @@ describe('terminal prompt extraction', () => {
expect(tracker.hasObservedImeForHwnd(hwnd)).toBe(true)
expect(tracker.currentPrefix()).toBe('ㅔㅊ ')
})
it('Ctrl/Alt/Shift 단독 키 반복이나 Ctrl+Alt 제안 탐색 단축키는 터미널 버퍼를 초기화하지 않는다', () => {
const tracker = new TerminalKeystrokeTracker()
const hwnd = 9902
for (const vk of [0x47, 0x49, 0x54, 0x20]) {
tracker.onKeyDown({
hwnd,
windowTitle: 'Agent Switchboard',
vk,
shift: false,
ctrl: false,
alt: false,
meta: false
})
}
expect(tracker.currentPrefix()).toBe('git ')
// Ctrl 누름(uiohook 은 ctrl=true 로 전달) + Alt 누름(ctrl=true, alt=true) + Ctrl+Alt+Down/Enter
for (const ev of [
{ vk: 0xa2, ctrl: true, alt: false },
{ vk: 0xa4, ctrl: true, alt: true },
{ vk: 0x28, ctrl: true, alt: true },
{ vk: 0x0d, ctrl: true, alt: true }
]) {
tracker.onKeyDown({
hwnd,
windowTitle: 'Agent Switchboard',
vk: ev.vk,
shift: false,
ctrl: ev.ctrl,
alt: ev.alt,
meta: false
})
}
expect(tracker.currentPrefix()).toBe('git ')
})
})
describe('a visible suggestion survives a typing pause', () => {