Repository navigation
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe terminal shortcut policy now maps non-keypad Alt+Delete to Priority: ➖ Normal Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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.
✅ No new issues found.
Reviewed changes
- Alt/Option + Forward-Delete →
forward-kill-word:resolveTerminalShortcutActionnow matches non-numpadDeletealongsideBackspacein the Alt-modified branch, emitting\x1bd(ESC d) while keeping\x1b\x7ffor Alt+Backspace. Kitty-negotiated panes still returnnullbefore emitting bytes, so xterm sends native escapes. - Numpad exclusion:
event.code?.startsWith('Numpad') !== truekeeps keypadDelete/NumpadDecimalout of the translation, preserving the kitty functional-numpad identity path inresolveTerminalOptionShortcutAction. - Tests: the new
terminal-shortcut-forward-delete.test.tspins macOS, non-mac, kitty deferral, numpad exclusion, and modifier isolation with exactsendInputbyte assertions — they would fail against the pre-PR behavior.
I specifically checked the non-mac half against the local Windows ConPTY hazard the repo already guards for Ctrl+Arrow (Escape→PSReadLine RevertLine). Upstream microsoft/terminal and PSReadLine sources show ConPTY fuses ESC d into a single Alt+d key event, and PSReadLine's default Windows bindings map Alt+d to KillWord — so the unguarded translation here is correct and guarding it would instead send Alt+Delete, which PSReadLine does not bind. This also matches the existing unguarded Alt+Arrow / Alt+Backspace branches. The dashboard preview terminal routes through resolvePreviewShortcutAction, which delegates to this same policy, so there is no parity gap.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…#33296) macOS: Option+Forward-Delete sends ESC d (delete word forward) for shells and inline agent TUIs, so Claude Code deletes a word instead of the whole line; full-screen non-agent apps (vim, nano, less) keep the native CSI 3;3~. Linux/Windows unchanged. Fixes #21491. Supersedes #21893. Co-authored-by: bbingz <11211020+bbingz@users.noreply.github.com>

ELI5
Pressing Option + Delete (⌥⌦ / Alt + Delete) in an Orca terminal now deletes the word to the right, matching standard macOS terminal behavior and preventing stray characters or accidental line clearing in tools like Claude Code.
What Changed
\x1b[3;3~(CSI 3;3~). Shells without this binding would swallow the prefix and print a stray~, while Claude Code would misinterpret the sequence and delete all text to the end of the line instead of a single word.\x1bd(ESC d), which readline and CLI tools recognize asforward-kill-word. When the Kitty Keyboard Protocol is active, it defers to xterm so advanced TUIs receive native events.resolveTerminalShortcutAction(src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts), unifiedAlt+Backspaceand non-numpadAlt+Deleteto emit\x1bdforDeleteand\x1b\x7fforBackspace.Why
On macOS and in readline-based shells,
Option + Backspacedeletes the word to the left (backward-kill-word), andOption + Forward-Deletesymmetrically deletes the word to the right (forward-kill-word). Unifying this alongsideAlt+Backspaceprovides expected muscle-memory behavior across terminals (iTerm2, Terminal.app, Ghostty) while keeping cyclomatic complexity low and remaining strictly within line-count limits.Alternatives considered:
CSI 3;3~by default, leading to terminal noise or application misbehavior.forward-kill-word(\x1bd), so treating both platforms consistently aligns with the existingAlt+BackspaceandAlt+Arrowpolicies.Linked Issue
Fixes #21491
Visual Proof
N/A - Keyboard input sequence mapping inside terminal pane; verified with automated unit test suite.
Testing
src/renderer/src/components/terminal-pane/terminal-shortcut-forward-delete.test.tscovering macOS, Linux/Windows, Kitty protocol negotiation, numpad exclusion, and modifier isolation.node config/scripts/check-changed-code-quality.mjs(passed with 0 findings)node config/scripts/check-max-lines-ratchet.mjs(passed with 0 new bypasses; file stays at 293 lines)tsc --noEmitacross CLI and Web configurations (all passed)vitest runonterminal-shortcut-forward-delete.test.tsandterminal-shortcut-policy.test.ts(40 passed)AI Disclosure
Developed with Google Antigravity.
Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)