Fix remote tmux mirror pane titles

Merged
AU
3mo ago
+483-33

Closes #7832

Root cause

Multi-pane remote-tmux windows had split title ownership. The outer mirror tab used the authoritative tmux window name from RemoteTmuxWindow.name, but inner mirrored pane surfaces exposed titles from pane-level data, and the control/tree projection preferred tmux pane-border-format. On stock tmux that format expands to raw values like 0 "hostname", so the window name disappeared only in the multi-pane path.

Fix

RemoteTmuxWindowMirror now adopts the authoritative tmux window display title from each RemoteTmuxWindow update and derives every inner pane surface/tab title from that one value, with deterministic pane suffixes (logs, logs [1], logs [2]). Pane-border-format remains only pane-header label state and no longer becomes the surface title.

Tests

Added behavior coverage through the real control-mode title pipeline using captured list-windows and list-panes replies:

  • multi-pane mirror surface titles carry the tmux window name instead of raw pane header labels
  • single-pane mirror title behavior remains unchanged
  • a window transitioning from single-pane to multi-pane keeps the window name on recreated surfaces

Local allowed checks:

  • git diff --check HEAD~2..HEAD passed
  • ./scripts/lint-pbxproj-test-wiring.sh passed
  • python3 scripts/swift_file_length_budget.py reports the pre-existing origin/main AutomationSocketUITests budget mismatch (551 actual vs 528 budget), with no touched file over budget

Note: per task constraints, I did not run local xcodebuild, reload, or any cmux socket/app dogfood commands.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


[!NOTE]
Medium Risk
Changes user-visible remote-tmux titles and control-socket surface names; layout parsing now drops malformed duplicate-pane layouts. CI-only changes are low product risk.

Overview
Fixes #7832 by making remote tmux mirror inner pane and control-surface titles follow the tmux window name, not pane-border labels, foreground command, or CWD.

RemoteTmuxWindowMirror now keeps an authoritative windowTitle from each RemoteTmuxWindow update and builds tab titles via windowPaneTitle — base name for the first pane, then localized indexed suffixes (logs, logs [1], …). Control topology projection uses the same title(forPane:) path. RemoteTmuxRawLayoutParser rejects layouts with duplicate pane IDs. New localization keys cover the window fallback and indexed pane pattern; app-host tests cover multi-pane, single-pane, and single→multi transitions through the control surface list.

CI: swift-package-tests runs on vars.MACOS_RUNNER_DUAL_XCODE (SDK 15 helper build, then SDK 26 package tests). App-host focused regressions detect or install Node 20 when the runner image lacks node; Python wrapper tests use tests/node_runtime.py to repair PATH or skip. Runner docs and workflow guard tests were updated for the dual-Xcode variable.

Reviewed by Cursor Bugbot for commit 3f472d3b46ffbfd4a5bbbaf6cc60afb7d65613c2. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes #7832 by unifying all remote tmux mirror pane and control titles on the tmux window name with a localized fallback. CI routes swift-package-tests to the dual-Xcode runner and guarantees Node.js for wrapper regressions, pinning actions/setup-node@v6.4.0 to install Node 20 when absent.

  • Bug Fixes

    • Titles now come from the tmux window name via RemoteTmuxWindowMirror; pane-border labels, command, and CWD no longer affect titles.
    • Deterministic pane suffixes in multi-pane mirrors: "logs", "logs [1]", "logs [2]"; single-pane unchanged; single→multi keeps the window name.
    • Control topology uses title(forPane:).
    • RemoteTmuxRawLayoutParser rejects duplicate pane IDs.
  • Tests

    • Added end-to-end title tests for multi-pane, single-pane, and single→multi transitions; added localized strings for remoteTmux.tab.window and remoteTmux.tab.windowPaneIndexed.
    • CI: swift-package-tests runs on vars.MACOS_RUNNER_DUAL_XCODE; wrapper regressions ensure Node.js is on PATH and install Node 20 via actions/setup-node@v6.4.0 when missing. Tests use tests/node_runtime.py to repair PATH or skip when truly unavailable.

Summary by CodeRabbit

  • New Features

    • Remote tmux mirror pane/control titles are now based on the mirrored tmux window name, with non-zero pane indices showing an indexed suffix.
  • Bug Fixes

    • Titles remain consistent across layout changes using stable window-title tracking and pane ordering.
    • Layouts containing duplicate pane identifiers are now rejected.
  • Tests

    • Added/updated coverage for multi-pane, single-pane, and layout transition title behavior.
    • Added tests verifying duplicate pane identifiers are rejected.
  • Chores

    • Expanded localization coverage for the remote tmux window title (including indexed suffixes).
    • Updated CI runner selection checks for the dual-Xcode macOS 15 lane.