Skip to content

Next psmux tag: re-verify the switch-client/select-window paths and drop the psmux#497 and other workarounds #222

Description

@dracic

Summary

This is the single "when the next psmux tag lands" tracker for the psmux family under #288. Two separate upstream fixes are sitting on psmux main with no release carrying them — 3.3.7 (2026-07-20) is still the newest tag, and the only one our version gate admits:

upstream what it fixes commits on main
psmux/psmux#483 switch-client window/pane targets silently ignored (rc-0 no-op) d56d777 + 6c76ff9
psmux/psmux#497 select-window -t sess:@N rejected CLI-side; and the server focusing @N as index on ≥3-window sessions 33ea109

Everything below is what changes for us the day a tag ships both. Sections are split by what each item is actually gated on — the tag alone, the tag plus a code removal here, or something no release will ever fix.


A. Gated on the tag only — live smoke, real attached client, Windows 11

Several forms we rely on (or plan to, see #221) were never live-verified because 3.3.7 cannot exercise them.

  • switch-client -t %N same-session: the parked-window trailer's return move now actually lands on the originating pane (maintainer verified; confirm through our trailer end-to-end)
  • Unresolvable target exits non-zero → the trailer's switch-client -l fallback is now reachable; confirm the fallback itself works
  • switch-client -l semantics across psmux's per-session servers: does "last session" survive the server hop at all? (never live-tested; both trailers and switch_client(last_fallback=True) depend on it)
  • Cross-session sess:win selection: TUI/CLI attach to a control-session window from inside psmux (switch-client -t =bmad-loop-ctl:<win>) lands on that window, not the session's active one (fixed upstream in 6c76ff9; on 3.3.7 the window part is ignored)
  • = exact-match prefix in a qualified target (=sess:win): does the new dedicated switch-client handler parse it? (untested upstream form; upstream tests use bare sess:win)
  • Whichever return-target form Parked-window return target is a bare pane id — unresolvable cross-session on psmux (one server per session) #221 lands (sess:idx.idx or sess:%N): verify it live cross-session (ctl session → user session)
  • switch_client() seam no longer returns a false True on a no-op (rc-0 trust — self-heals with the release, confirm)
  • select-window -t sess:@N focuses the right window on a ≥3-window session — the select-window -t session:@id: client-side existence check rejects window-id targets the server supports (3.3.7) psmux/psmux#497 part 2 defect (server fell back to id-number-as-index) only manifests there; a 2-window control is not a valid check
  • select-window -t sess:@N.pane (select-window -t session:@id: client-side existence check rejects window-id targets the server supports (3.3.7) psmux/psmux#497 part 3, parse_target dropping the pane suffix) — we do not target this form today, but confirm before anyone relies on it

B. Gated on the tag and a workaround removal here — psmux/psmux#497

Removal recipe and the reasoning are in the #291 comment. All in src/bmad_loop/adapters/psmux_backend.py, and the whole group goes at once:

  • Bump _LAST_UNSUPPORTED from (3, 3, 6) to the last release without 33ea109this is the actual gate. While available() still admits 3.3.7, the workaround is load-bearing: on that build the id form does not merely fail, it focuses the wrong window on ≥3-window ctl sessions.
  • Delete the PsmuxMultiplexer.select_window override (base select-window -t session:@N works directly)
  • Delete _window_index — sole caller is that override; its renumber-race ceiling disappears with it
  • Delete the _QUALIFIED_ID class attribute — sole consumer is that override
  • Module docstring: drop the "select_window is the one verb that cannot take that form…" sentence; every id-taking verb becomes uniform
  • tests/test_psmux_backend.py: invert the id→index resolution tests (and the unresolvable-id pass-through case) to assert the qualified id reaches the verb untranslated

Not affected, do not touch: the session-qualification of new_window / list_window_ids / new_parked_window / list_windows / current_window_id. That is psmux/psmux#483's per-server-id model property, permanent, and independent of #497.

Also tag-dependent: #228's version gate (the rc-0 no-op ceiling) — it needs the same tag, and its _LAST_UNSUPPORTED bump is the same edit as the first box above. Sequence them together, not as two PRs fighting over one constant.

C. Not release-gated — no psmux tag fixes these

Recorded here so the "next tag" pass does not re-litigate them:

Notes

Refs: psmux/psmux#483, psmux/psmux#497, psmux/psmux#321, #221, #185, #228, #291, #310

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:psmuxpsmux terminal-multiplexer backendblocked:upstreamWaiting on a change in another repository

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions