Skip to content
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
f07dc8a
Add remote tmux (-CC over SSH) mirroring (beta)
robertnisipeanu Jun 5, 2026
6b4d06d
Fix remote tmux TUI rendering: sync client size for single-pane windows
robertnisipeanu Jun 5, 2026
8c8d16e
Remote tmux: track remote working directory + paste images to the host
robertnisipeanu Jun 5, 2026
962fd1b
Remote tmux: paste/drop via tmux paste-buffer -p so images render nat…
robertnisipeanu Jun 6, 2026
72297d6
Remote tmux: fix mirror resize for alt-screen and inline TUIs
robertnisipeanu Jun 6, 2026
0813e53
Remote tmux: fix mirror UTF-8 corruption and harden pane-state seeding
robertnisipeanu Jun 6, 2026
fce5181
Remote tmux: forward mouse to the remote pane (seed tracking mode on …
robertnisipeanu Jun 6, 2026
62865f2
Docs: add Remote tmux (beta) page
robertnisipeanu Jun 6, 2026
6f7d7e0
Remote tmux: keep window reorder in sync across repeated drags
robertnisipeanu Jun 6, 2026
23cf7a4
Docs: correct remote tmux attach flow (mirrors the host)
robertnisipeanu Jun 6, 2026
bdd0ffe
Remote tmux: keep window reorder correct across rapid drags
robertnisipeanu Jun 6, 2026
7faf644
Remote tmux: drop unused RemoteTmuxLayoutNode.isLeaf
robertnisipeanu Jun 6, 2026
5109701
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 6, 2026
ddd207d
Remote tmux: out-of-band reorder, disconnect handling, scrollback see…
robertnisipeanu Jun 7, 2026
196caf2
Remote tmux: auto-reconnect on transport loss (keep the mirror frozen)
robertnisipeanu Jun 7, 2026
d0550c6
feat(remote-tmux): cmux ssh-tmux interactive SSH auth
robertnisipeanu Jun 7, 2026
ff04798
remote-tmux: don't auto-restore mirrors on launch
robertnisipeanu Jun 7, 2026
422e1d3
remote-tmux: remove File-menu/palette attach (CLI-only)
robertnisipeanu Jun 7, 2026
77b09ca
fix(remote-tmux): close ControlMaster when user closes a host's last …
robertnisipeanu Jun 7, 2026
fc7e16a
remote-tmux: register ssh terminationHandler before launch
robertnisipeanu Jun 7, 2026
dc2ef4a
remote-tmux: cancel-safe window creation + master teardown on mirror …
robertnisipeanu Jun 7, 2026
1c55a69
remote-tmux: guard async master teardown against reattach + exit conn…
robertnisipeanu Jun 7, 2026
2d7bdf1
fix(remote-tmux): fail loudly if the ssh foreground handoff fails
robertnisipeanu Jun 7, 2026
fc8cb84
remote-tmux: keep the ControlMaster alive on remote session-end if a …
robertnisipeanu Jun 7, 2026
f7f657f
remote-tmux: drop now-unused Codable from RemoteTmuxHost
robertnisipeanu Jun 7, 2026
6507065
fix(remote-tmux): don't leave a sticky empty window when every sessio…
robertnisipeanu Jun 7, 2026
0d4ba11
docs(remote-tmux): correct the reconnect limitation to match auto-rec…
robertnisipeanu Jun 8, 2026
6315a1d
remote-tmux: drop the unshipped remote.tmux.open command
robertnisipeanu Jun 8, 2026
ce1041b
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 8, 2026
64829d1
remote-tmux: address review-bot comments (#5553)
robertnisipeanu Jun 8, 2026
a230bdc
remote-tmux: bump vendor/bonsplit (drop-path delegate fired outside t…
robertnisipeanu Jun 8, 2026
99ef05e
remote-tmux: decompose oversized files, scope new-workspace routing, …
robertnisipeanu Jun 8, 2026
adc1d80
remote-tmux: add missing ja docs.navItems.remoteTmux nav label
robertnisipeanu Jun 8, 2026
49202b8
remote-tmux: address coderabbit review findings (reseed reset, teardo…
robertnisipeanu Jun 8, 2026
4ff851e
remote-tmux: conditional shell reflow + reliable on-attach client sizing
robertnisipeanu Jun 9, 2026
9cf6101
remote-tmux: seed-before-size ordering + attach redraw kick
robertnisipeanu Jun 9, 2026
9339433
remote-tmux: FIFO-safe first-connect sizing + attach-block consumptio…
robertnisipeanu Jun 9, 2026
feff74c
remote-tmux: shrink GhosttyTerminalView footprint — move initial sizi…
robertnisipeanu Jun 9, 2026
f4a003c
remote-tmux: simplification pass (seedPane helper, PostAttachAction e…
robertnisipeanu Jun 10, 2026
38be9cd
remote-tmux: pin vendor/bonsplit to merged upstream main (bonsplit#143)
robertnisipeanu Jun 10, 2026
f98e499
docs: remote-tmux troubleshooting note for Permission denied on incom…
robertnisipeanu Jun 10, 2026
d86ad77
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
28d3259
remote-tmux: refresh swift file-length budget for files grown by this PR
robertnisipeanu Jun 11, 2026
7e1786c
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
d178b67
remote-tmux: confirm before closing mirror tabs/panes running a command
robertnisipeanu Jun 11, 2026
555a74d
perf: never stat possibly-remote paths on the main thread in menu/ico…
robertnisipeanu Jun 11, 2026
8d3e029
remote-tmux: refresh swift file-length budget for files grown by this PR
robertnisipeanu Jun 11, 2026
a2a692c
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
f9641d5
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
f8c238d
settings: add Remote tmux beta row to the search-anchor contract list
robertnisipeanu Jun 11, 2026
774d4dc
fix NSMenuItem non-Sendable capture warning in the path-menu title re…
robertnisipeanu Jun 11, 2026
d7e5a52
remote-tmux: regression test — a mirror-workspace split must never cr…
robertnisipeanu Jun 11, 2026
c09e0ee
remote-tmux: report socket/CLI splits routed to a mirror as accepted,…
robertnisipeanu Jun 11, 2026
e7453fc
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
9ac65aa
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
a873871
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
3af0bd0
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 11, 2026
d9cd98f
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 12, 2026
da3f36a
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 12, 2026
1cf21d7
Merge origin/main into remote-tmux-upstream: port mirror split routin…
robertnisipeanu Jun 12, 2026
1f4d795
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 12, 2026
d1e96df
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 12, 2026
d004a45
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 12, 2026
1ee7da5
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 12, 2026
f77de2f
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 13, 2026
1d822ca
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 13, 2026
b323980
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 13, 2026
41e543e
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 13, 2026
cce58d8
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 13, 2026
edfb57d
Merge remote-tracking branch 'origin/main' into pr-5553-remote-tmux-hq
azooz2003-bit Jun 13, 2026
a0a8492
Add remote tmux control name regression tests
azooz2003-bit Jun 13, 2026
d32d290
Harden remote tmux mirror state changes
azooz2003-bit Jun 13, 2026
1a232f5
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 13, 2026
88fce0b
Fix remote tmux control stream backpressure
azooz2003-bit Jun 13, 2026
7f742df
Fix remote tmux mirror snapshot and seeding
azooz2003-bit Jun 13, 2026
aa1adba
Merge remote-tracking branch 'origin/main' into pr-5553-remote-tmux-hq
azooz2003-bit Jun 13, 2026
44a9419
Merge remote-tracking branch 'pr-fork/remote-tmux-upstream' into pr-5…
azooz2003-bit Jun 13, 2026
bcb3387
Fix remote tmux quit and paste routing
azooz2003-bit Jun 13, 2026
0bb1f16
Restore terminal cwd inheritance
azooz2003-bit Jun 14, 2026
2ba604d
Harden remote tmux attach and output buffering
azooz2003-bit Jun 14, 2026
ede2397
Fix remote tmux reconnect auth and paste guarding
azooz2003-bit Jun 14, 2026
c0a146f
Bound remote tmux parser and folder lookups
azooz2003-bit Jun 14, 2026
4edc81a
Reject remote tmux split print before routing
azooz2003-bit Jun 14, 2026
500d77e
Veto remote tmux batch close on route failure
azooz2003-bit Jun 14, 2026
c0cdce3
Scope remote tmux dedicated window ownership
azooz2003-bit Jun 14, 2026
8cc2d68
Fix remote tmux auth and capabilities
azooz2003-bit Jun 14, 2026
80bf6ed
Propagate remote tmux split send failures
azooz2003-bit Jun 14, 2026
e680864
Merge origin/main into remote tmux PR
azooz2003-bit Jun 14, 2026
0a56674
Add remote tmux initial topology regression test
azooz2003-bit Jun 14, 2026
168033f
Seed remote tmux topology after attach
azooz2003-bit Jun 14, 2026
f0bc81b
Tighten remote tmux policy cleanup
azooz2003-bit Jun 14, 2026
01704d1
Avoid off-main folder icon resolution
azooz2003-bit Jun 14, 2026
5fe2555
Merge origin/main into remote tmux PR
azooz2003-bit Jun 14, 2026
dd169e3
Add remote tmux pane pruning regression test
azooz2003-bit Jun 14, 2026
6ab052d
Prune remote tmux pane state on layout changes
azooz2003-bit Jun 14, 2026
6cb00ba
Gate remote tmux docs to translated locales
azooz2003-bit Jun 14, 2026
4d83747
Keep remote tmux control file within budget
azooz2003-bit Jun 14, 2026
1e02fd4
Close remote tmux pipe writer on writer queue
azooz2003-bit Jun 14, 2026
646d211
Merge remote-tracking branch 'origin/main' into pr-5553-remote-tmux-hq
azooz2003-bit Jun 14, 2026
503aed2
Fix double-free crash on manual-I/O surface resize (display-scale cha…
robertnisipeanu Jun 14, 2026
3f18017
Tighten render_now->refresh comment to the load-bearing constraints
robertnisipeanu Jun 14, 2026
da43a20
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 14, 2026
85c16b4
Merge remote-tracking branch 'origin/main' into remote-tmux-upstream
robertnisipeanu Jun 14, 2026
5f227e4
Merge origin/main into remote-tmux-upstream
robertnisipeanu Jun 15, 2026
c690dc7
Mark remote tmux onResize closure @Sendable to satisfy warning budget
azooz2003-bit Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/swift-file-length-budget.tsv
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# cmux-owned Swift file length budget.
# Format: max_lines<TAB>relative path
# Reduce counts as files shrink. CI fails if tracked files exceed this budget.
32955 CLI/cmux.swift
22576 Sources/TerminalController.swift
19955 Sources/Workspace.swift
19248 Sources/ContentView.swift
18057 Sources/AppDelegate.swift
16539 Sources/GhosttyTerminalView.swift
33224 CLI/cmux.swift
22759 Sources/TerminalController.swift
20540 Sources/Workspace.swift
19270 Sources/ContentView.swift
18132 Sources/AppDelegate.swift
16777 Sources/GhosttyTerminalView.swift
13608 Sources/Panels/BrowserPanel.swift
11916 cmuxTests/AppDelegateShortcutRoutingTests.swift
9992 Sources/TabManager.swift
10030 Sources/TabManager.swift
8494 cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
7737 Sources/Panels/BrowserPanelView.swift
7198 cmuxTests/WorkspaceUnitTests.swift
Expand Down Expand Up @@ -66,6 +66,7 @@
1380 cmuxUITests/MenuKeyEquivalentRoutingUITests.swift
1376 cmuxTests/KeyboardShortcutSettingsFileStoreStartupTests.swift
1372 cmuxTests/AppDelegateIssue2907RoutingTests.swift
1370 Sources/RemoteTmuxControlConnection.swift
1365 Sources/Feed/FeedButtonStyleDebugWindowController.swift
1362 Sources/CMUXInstalledExtensionSidebarHostView.swift
1313 cmuxTests/MobileHostAuthorizationTests.swift
Expand All @@ -91,9 +92,10 @@
937 Sources/TextBoxMentionIndexStore.swift
937 cmuxTests/RestorableAgentSessionIndexTests.swift
924 Sources/DockPanelView.swift
918 Sources/RemoteTmuxController.swift
913 cmuxTests/WorkspaceGroupTests.swift
905 Sources/CmuxSSHURLRequest.swift
878 Sources/WorkspaceContentView.swift
898 Sources/WorkspaceContentView.swift
868 Sources/Panels/BrowserScreenshotSnapshotter.swift
866 Sources/CommandPalette/CommandPaletteSettingsToggle.swift
864 Sources/Panels/TerminalPanel.swift
Expand All @@ -103,7 +105,7 @@
842 Sources/Panels/MarkdownWebRenderer.swift
830 Sources/TaskManagerTypes.swift
810 Packages/CmuxSwiftRender/Tests/CmuxSwiftRenderTests/SwiftViewInterpreterTests.swift
Comment thread
robertnisipeanu marked this conversation as resolved.
Resolved
787 Sources/ClosedItemHistory.swift
797 Sources/ClosedItemHistory.swift
768 Sources/MainWindowFocusController.swift
760 Packages/CMUXAgentLaunch/Tests/CMUXAgentLaunchTests/AgentLaunchSanitizerTests.swift
757 Packages/CmuxAuthRuntime/Sources/CmuxAuthRuntime/Coordinator/AuthCoordinator.swift
Expand Down Expand Up @@ -143,6 +145,7 @@
614 cmuxTests/SessionIndexViewTests.swift
613 Sources/PortScanner.swift
599 Packages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizerPrimaryPolicies.swift
597 cmuxTests/RemoteTmuxControlParserTests.swift
596 cmuxTests/CmuxEventBusTests.swift
594 Sources/SessionIndexModels.swift
594 cmuxTests/PortalTabDragRoutingTests.swift
Expand Down Expand Up @@ -182,6 +185,7 @@
507 Sources/TerminalControllerTopSupport.swift
506 Sources/App/MainWindowVisibilityController.swift
505 cmuxUITests/DisplayResolutionRegressionUITests.swift
504 Sources/TerminalImageTransfer.swift
504 cmuxTests/TerminalNotificationSocketActionTests.swift
502 Sources/CmuxEventPublishing.swift
502 Sources/Settings/ConfigSource.swift
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ tmp-*/

# Local dogfood scratch (screenshots, recordings) — never commit
artifacts/

# tmux verbose debug logs (tmux -v) that land in the cwd
tmux-*.log
277 changes: 273 additions & 4 deletions CLI/cmux.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ public enum ControlCommandExecutionPolicy: Sendable, Equatable {
"workspace.remote.pty_detach",
"workspace.remote.pty_bridge",
"workspace.remote.pty_resize",
"remote.tmux.sessions",
"remote.tmux.attach",
"remote.tmux.detach",
"remote.tmux.state",
"remote.tmux.mirror",
"remote.tmux.window",
"sidebar.custom.validate",
"sidebar.custom.reload",
"sidebar.custom.select",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,18 @@ public struct BetaFeaturesCatalogSection: SettingCatalogSection {
userDefaultsKey: "customSidebars.beta.enabled"
)

/// Remote tmux: mirror a remote host's tmux sessions in the cmux sidebar
/// over `ssh … tmux -CC` (iTerm2-style control mode). Sessions appear as
/// sidebar workspaces, tmux windows as tabs, and tmux panes as splits;
/// create/close propagate to the remote, while quitting cmux leaves the
/// remote tmux server running for resume. Defaults off; while off, every
/// remote-tmux entry point and socket command is gated out so the local
/// terminal path is unaffected.
public let remoteTmux = DefaultsKey<Bool>(
id: "remoteTmux.beta.enabled",
defaultValue: false,
userDefaultsKey: "remoteTmux.beta.enabled"
)

public init() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ extension Array where Element == CuratedSettingEntry {
.init(section: .betaFeatures, id: "feed", title: "Feed", synonyms: "feed right sidebar agent decisions permissions questions approval beta unstable"),
.init(section: .betaFeatures, id: "dock", title: "Dock", synonyms: "dock right sidebar terminal controls tui beta unstable"),
.init(section: .betaFeatures, id: "customSidebars", title: "Custom Sidebars", synonyms: "custom sidebars swift json interpreted vibe beta unstable"),
.init(section: .betaFeatures, id: "remoteTmux", title: "Remote tmux", synonyms: "remote tmux ssh control mode -CC mirror session window pane sidebar workspace beta unstable"),

// Automation
.init(section: .automation, id: "socket-mode", title: "Socket Control Mode", synonyms: "automation.socketControlMode api socket unix domain control server auth allow password disabled"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ public struct BetaFeaturesSection: View {
@State private var dock: DefaultsValueModel<Bool>
@State private var extensions: DefaultsValueModel<Bool>
@State private var customSidebars: DefaultsValueModel<Bool>
@State private var remoteTmux: DefaultsValueModel<Bool>

public init(defaultsStore: UserDefaultsSettingsStore, catalog: SettingCatalog) {
_feed = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.rightSidebarFeed))
_dock = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.rightSidebarDock))
_extensions = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.extensions))
_customSidebars = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.customSidebars))
_remoteTmux = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.remoteTmux))
}

public var body: some View {
Expand All @@ -33,6 +35,8 @@ public struct BetaFeaturesSection: View {
extensionsRow
SettingsCardDivider()
customSidebarsRow
SettingsCardDivider()
remoteTmuxRow
}
}
}
Expand Down Expand Up @@ -104,6 +108,23 @@ public struct BetaFeaturesSection: View {
.accessibilityIdentifier("SettingsBetaCustomSidebarsToggle")
}
}

@ViewBuilder
private var remoteTmuxRow: some View {
SettingsCardRow(
configurationReview: .settingsOnly,
searchAnchorID: "setting:betaFeatures:remoteTmux",
String(localized: "settings.betaFeatures.remoteTmux", defaultValue: "Remote tmux"),
subtitle: remoteTmux.current
? String(localized: "settings.betaFeatures.remoteTmux.subtitleOn", defaultValue: "Mirrors a remote host's tmux sessions in the sidebar over ssh tmux -CC; sessions become workspaces and windows become tabs. Quitting cmux leaves the remote tmux server running.")
: String(localized: "settings.betaFeatures.remoteTmux.subtitleOff", defaultValue: "Hides remote tmux mirroring until you enable it here.")
) {
Toggle("", isOn: Binding(get: { remoteTmux.current }, set: { remoteTmux.set($0) }))
.labelsHidden()
.controlSize(.small)
.accessibilityIdentifier("SettingsBetaRemoteTmuxToggle")
}
}
}

/// Small warning callout with a yellow triangle, used at the top of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ struct SettingsRowAnchorResolutionTests {
"setting:betaFeatures:feed",
"setting:betaFeatures:dock",
"setting:betaFeatures:customSidebars",
"setting:betaFeatures:remoteTmux",
"setting:browser:history",
"setting:browser:http-allowlist",
"setting:workspaceColors:palette",
Expand Down
Loading
Loading