Add guarded Close Tab UX

Merged
TE
2mo ago
+4915-3883

What changed

  • Add a localized Close Tab item to the surface-tab context menu and show its configured shortcut.
  • Add a browser-style close affordance on hover and on the selected tab, while keeping pinned tabs out of inline and batch close targets.
  • Route context-menu, close-button, Cmd-W, pane/workspace batches, window closes, and socket/CLI closes through guarded close paths.
  • Warn before closing a tab, workspace, window, or Dock surface with a live agent session or foreground process; batch closes use one aggregated dialog.
  • Add --force / force: true for non-interactive close automation.
  • Leave the tab-bar icon-cluster deduplication as proposal #15668.

Verification

  • swift test --filter ControlCommandCoordinatorWindowTests: 20 tests passed.
  • python3 scripts/verify-local.py: 16/16 selected checks passed.
  • python3 scripts/localization_catalog.py check: 10 catalogs, 9 locales, 0 parity errors.
  • ./scripts/sync-test-wiring --check: passed.
  • Exact-head fleet build for 0e270dab5d6c3ab8f453601794967c9b99d43756: job bb2577567511377c0b2256d8, worker cmux11s-Mac-mini.local, artifact digest sha256:88dae11c6f45e8b6f9108a49cfd87529b208a0fbe1e353f5b580859c3b804b66.
  • CUA Driver dogfood on fleet Mac cmux-a: shows the tab context menu with Close Tab ⌘W and the live-process warning dialog.

Changelog

Added: Close Tab menu and hover close affordance with guarded warnings for live sessions and processes.