Repository navigation
fix(terminal): macOS Cmd+Backspace의 한 줄 삭제 동작 수정 - #347
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe terminal maps eligible macOS Cmd+Backspace input to Ctrl+U. Browser regression checks cover macOS input and IME behavior, readline line clearing, and native Linux behavior. ChangesTerminal Backspace behavior
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue remains; the change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The shortcut retains existing pane routing and input controls. No new access or authority has been demonstrated. Interrupted-event behavior remains uncertain, including whether pending shortcut state could survive a pane change. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…aw the chat lens for the shared grid Two cases the covered attach (keep_size) left open, found in review: - A resize that reached the server while the pane's attachment was still being created was dropped. A chat lens that attached and then switched to the terminal lens before the terminal was looked up stayed on the pane's own grid under a terminal fitted to the device. The resize now waits for the creation. - The terminal lens ignores pane-geometry (it drives the grid), so a device that entered the chat lens after another one had resized the pty kept its hidden screen at its own size. The last pane-geometry is kept and the hidden screen takes it on entering the chat lens. The changelog entries of devswha#347 and devswha#363 were written before 0.3.44 was cut and merged under that released version: both move to Unreleased, with their PR links. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Change
안녕하세요. macOS에서 Web UI의 라이브 터미널을 사용할 때 Cmd+Backspace가 한 글자만 삭제하는 문제의 수정을 제안드립니다.
현재 xterm은 Cmd+Backspace도 일반 Backspace와 같은 DEL(
0x7f)로 전달합니다. Mac의 Command 키 의미가 반영되지 않아, 입력줄 끝에서 Cmd+Backspace를 눌러도 줄 전체가 지워지지 않습니다.이번 변경은 macOS의 Cmd+Backspace를 터미널에서 줄 앞부분을 삭제하는 Ctrl+U(
0x15)로 전달합니다. 커서가 줄 끝에 있으면 입력줄 전체가 삭제됩니다. xterm이 대기 중인 IME 입력을 먼저 확정한 뒤 발생하는onKey에서 키를 식별하고, 바로 이어지는onData만 변환하므로 한글 → 삭제 순서를 보존합니다. 입력이 잠긴 상태에서는 매핑을 예약하지 않습니다.일반 Backspace, Ctrl/Alt/Shift가 함께 눌린 조합과 macOS 이외의 Meta+Backspace는 기존 동작을 유지합니다. Shift+Enter 수정(#339)과 분리하여
main기준의 별도 브랜치에서 작성했습니다. 최신main(bb7ef50)과의 충돌을 정리했으며, 이미 병합된 #339와 #334의 입력 준비 검사·사용자 단축키 설정을 유지했습니다. 두 키 조합을 함께 검증했습니다.Validation
Linux(WSL), Herdr 0.9.3, Bun 1.4.2, lockfile에 맞는 Playwright Chromium 153에서 검증했습니다. 브라우저의 별도 컨텍스트에 MacIntel 플랫폼과 Command 키 이벤트를 재현했으며, 실제 macOS/Safari 기기 테스트는 수행하지 않았습니다.
7f(DEL)7f(DEL)7f(DEL)15(Ctrl+U)15(Ctrl+U)15(Ctrl+U)수정 전 캡처
수정 후 캡처
캡처는 별도로 생성한 테스트 터미널의 실제 PTY 수신 바이트입니다. WebSocket 입력 프레임과 수신 바이트가 일치하는지도 확인했습니다. 검증 자료는 포크의 별도 브랜치에 보관했습니다.
새 브라우저 회귀 테스트에서는 다음을 확인합니다.
compositionend("한")직후 Cmd+Backspace를 발생시켜["한", "\x15"]순서와 지연된 중복 전송이 없음을 확인합니다. 조합 중 플래그는 줄 삭제로 바꾸지 않습니다.remove this entire input을 입력한 뒤 Cmd+Backspace를 눌러, 입력 버퍼가 빈 문자열이 되는 것을 확인합니다.검증 결과:
bun run generate:types --check,bun run typecheck,bun run build: 통과bun run test:unit: 1,059건 통과, 기존 3건 건너뜀, 실패 없음bun scripts/ui-regression.ts: 전체 통과main에 포함된 fix(terminal): preserve IME input, drafts and attachment readiness #334 xterm 백포트: 같은 Mac 키·IME 순서·실제 readline 삭제 테스트를 포함한 전체 브라우저 검사 통과관련 브라우저 원본 로그:
전체 통합 테스트 재실행은 170건 통과·9건 실패였습니다. 8건은 변경하지 않은
server/codex-binding.contract.test.ts의 테스트용 Codex 프로세스 탐지 실패로, 수정 없는 원본에서도 대표 실패를 확인한 상태입니다. 나머지 1건은 변경하지 않은server/updater.test.ts의 supervisor 종료 코드 검사가 0 대신 1을 받은 경우이며, 해당 테스트를 단독 재실행하면 통과했습니다(1건 통과, 12건 필터링, 실패 없음). 이번 PR에서 이 서버 파일들을 수정하지 않습니다. 검증 로그에 최신 통과 범위와 이 제한을 함께 기록했습니다.확인해 주시면 감사하겠습니다. 프로젝트에서 선호하시는 키 입력 방식이나 보완할 사항이 있으면 말씀 부탁드립니다.