cmux/cmuxTests
Eray Bozoglu 2712cabac9
Fix orphaned child processes when closing workspace tabs (#889)
* Fix orphaned child processes when closing workspace tabs

When closing a workspace tab via the sidebar X button, child processes
(login → zsh → claude) survived as orphans because TabManager.closeWorkspace()
only removed the workspace from the tabs array without explicitly freeing
Ghostty surfaces. It relied on ARC to cascade deallocation, but SwiftUI views
and Combine publishers held references, delaying or preventing
ghostty_surface_free() (which sends SIGHUP) from ever running.

This adds explicit teardown on the workspace close path:
- TerminalSurface.teardownSurface(): idempotent method to free the Ghostty
  runtime surface eagerly, matching the existing deinit logic
- TerminalPanel.close() now calls teardownSurface() to ensure SIGHUP is sent
- Workspace.teardownAllPanels() iterates all panels and closes them
- TabManager.closeWorkspace() calls teardownAllPanels() before removing
  the workspace from the tabs array

* Harden workspace teardown and ownership checks

* Address follow-up teardown review feedback

---------

Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com>
2026-03-04 20:00:35 -08:00
..
AppDelegateShortcutRoutingTests.swift Fix Escape propagation when command palette is visible (#847) 2026-03-04 03:27:54 -08:00
BrowserFindJavaScriptTests.swift Add find-in-page (Cmd+F) for browser panels (#837) (#875) 2026-03-04 16:15:15 -08:00
CJKIMEInputTests.swift Fix voice dictation text insertion path in GhosttyNSView. (#857) 2026-03-04 17:25:39 -08:00
CmuxWebViewKeyEquivalentTests.swift Fix orphaned child processes when closing workspace tabs (#889) 2026-03-04 20:00:35 -08:00
GhosttyConfigTests.swift Fix cross-window theme background gating after jump-to-unread (#861) 2026-03-04 02:48:06 -08:00
SessionPersistenceTests.swift Fix Claude wrapper hook errors when cmux socket is stale (#868) 2026-03-04 18:52:57 -08:00
SocketControlPasswordStoreTests.swift Add command palette entries to install/uninstall cmux CLI in PATH (#626) 2026-02-27 01:53:13 -08:00
UpdatePillReleaseVisibilityTests.swift Fix notification bell hover crash by conditionally tracking hover (#574) 2026-02-26 14:26:28 -08:00
WorkspaceContentViewVisibilityTests.swift Fix tab drag blank state and preserve non-custom titles across window drops 2026-02-24 14:36:12 -08:00
WorkspaceManualUnreadTests.swift Add command palette (Cmd+Shift+P) (#358) 2026-02-23 03:26:36 -08:00