Main claims Cmd/Ctrl+W on every window (window-accelerator's
before-input-event + preventDefault, kept for the #105498 swallow
guard and the Win/Linux close path) and routes it to the renderer via
hermes:close-preview-requested; the renderer's close rung maps any
focused [data-terminal] to closeActiveTerminal(), so the chord closed
the pane and killed the live shell instead of reaching xterm as
readline unix-word-rubout (#65457).
Route it the way #108550 routes Cmd/Ctrl+R: keep main's claim exactly
as-is, and add the missing terminal rung in the renderer.
- TerminalInstance (the user PTY) gains [data-interactive-terminal];
the read-only agent mirror keeps only [data-terminal], so its tab
stays deliberately closeable (the #65524 breadth complaint).
- The terminal handle registry (terminal-context-menu) keys by the
[data-terminal] scope rather than the nested xterm host — the same
fix#108550 carries — and grows a wordErase verb: the user terminal
re-delivers the ^W byte to its PTY, the agent mirror's is null.
- The close-preview IPC rung (use-desktop-integrations) and the
view.closeTab keybind dispatch (use-keybinds) both consume the
bare platform chord through that verb instead of closing; Shift /
Alt / rebound variants keep closing.
- The non-mac Window>Close menu item becomes click-only
(registerAccelerator: false): the 'close' role's default
CommandOrControl+W accelerator would claim the chord before the
before-input-event run. Clicking it still closes the window.
Co-authored-by: Kyssta <218078013+kyssta-exe@users.noreply.github.com>
Co-authored-by: percival <ignacio@agenticolabs.io>