Skip to content

Fix mux tab close after detach/reattach (#407) - #431

Merged
kitknox merged 4 commits into
kitknox:mainfrom
jvanderen1:feature/407-2-mux-close-semantics
Sep 24, 2026
Merged

kitknox merged 4 commits into
kitknox:mainfrom
jvanderen1:feature/407-2-mux-close-semantics

Conversation

@jvanderen1

@jvanderen1 jvanderen1 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • tmux -CC: optimistic kill + tombstone so ✕ after detach→reattach does not leave empty self-healing trees
  • Window-tab close always uses the live gateway requestKillWindow (does not require a live pane in the tab tree)

Depends on / merge after: #430 (this branch now includes current #430, including the herdr control-mode resume commit and the main merge). Review the unique commit for the close-after-reattach change — two files: TmuxController.swift, MainView+TabManagement.swift.

Part of #407. Stack: PR 2 of 3. Still required after #430: that PR does not include the tombstone / requestKillWindow path, so reattached background tmux windows still no-op or self-heal on ✕.

#432 is optional and is not needed to land this.

Screencast

Same DietPi recording as #430 — no separate take. Watch the close/kill beats here; detach/resume is #430.

Different.Multiplexers-gh.mp4

This PR (after #430 detach → reconnect)

  1. DietPi tmux -CC, at least 2 windows.
  2. Detach Session → reconnect (window tabs return) — Add multiplexer detach/resume (#407) #430.
  3. ✕ a background window — tab is gone for good (no ghost / self-heal).

Last herdr tab ✕ ending the session may appear later in the same recording; that is local follow-up, not this diff.

Test plan

  • Close reattached tmux window with ✕ (no empty tree / self-heal)
  • Detach Session still leaves the tmux session running (Add multiplexer detach/resume (#407) #430)
  • Background window ✕ after reattach does not require a live pane in the tab tree

@jvanderen1
jvanderen1 force-pushed the feature/407-2-mux-close-semantics branch 2 times, most recently from 8af4c7b to 36b7a98 Compare September 13, 2026 21:20
@jvanderen1
jvanderen1 marked this pull request as ready for review September 16, 2026 02:26
@kitknox
kitknox merged commit 225ea69 into kitknox:main Sep 24, 2026
@jvanderen1
jvanderen1 deleted the feature/407-2-mux-close-semantics branch September 26, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants