Skip to content

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

Open
jvanderen1 wants to merge 6 commits into
kitknox:mainfrom
jvanderen1:feature/407-2-mux-close-semantics
Open

jvanderen1 wants to merge 6 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
Leave a mux session running from Tabs / the tab menu, focus a live
auto-start attachment instead of opening a second client, and offer
Reconnect on a short banner. Raw-pane chords use swipe discovery
when present, otherwise the usual defaults.
@jvanderen1
jvanderen1 force-pushed the feature/407-2-mux-close-semantics branch from 36b7a98 to aef83ee Compare September 13, 2026 21:27
herdr (control) is a gateway plus projected tabs, not a raw pane binding.
Match HerdrController the same way tmux -CC matches TmuxController, and do
not treat a leftover gateway shell as still attached.
@jvanderen1
jvanderen1 marked this pull request as ready for review September 16, 2026 02:26
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.

1 participant