-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Preserve ssh-tmux pane identity across remote layout changes #7838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5187332
test: preserve remote tmux pane identity across layout changes
austinywang 0dc8aab
Fix remote tmux layout reconciliation identity
austinywang 80a3273
Preserve initial multi-pane sizing ownership
austinywang d2f1210
Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue…
austinywang d78c794
Keep remote tmux control identities render-independent
austinywang baf237e
test: keep remote session pane identities distinct
austinywang cce3649
test: publish initial remote windows atomically
austinywang 9f4c728
test: make mirror lookup capture explicit
austinywang fae63cd
ci: route helper build to SDK 15 runner
austinywang 24265ab
test: gate remote tmux identity regression directly
austinywang fb3553a
Fix remote tmux session pane identity ownership
austinywang 1171508
Deduplicate remote tmux mirror test lookup
austinywang f686623
Keep workspace file within hard cap
austinywang 19f418f
Preserve pane ownership through layout reorders
austinywang b530462
Import Bonsplit in remote tmux observability tests
austinywang 0c53eab
Reconcile final-pane moves atomically
austinywang 60fa525
Fix remote tmux identity test references
austinywang 5de8edc
Retain pane identity through topology refresh
austinywang f45763f
Merge origin/main into issue-7833-mirror-incremental-split
austinywang 09af1ab
Scope remote tmux topology refresh ownership
austinywang f7381cb
Install Node for CLI wrapper CI regressions
austinywang dc526f2
Merge origin/main into issue-7833-mirror-incremental-split
austinywang fbed5ec
Merge origin/main into issue-7833-mirror-incremental-split
austinywang a9998ef
Recover retained pane identities after topology errors
austinywang 264dc7c
Integrate remote tmux resize ownership
austinywang 6c4558a
Close remote tmux tabs before topology refresh
austinywang bdcc92f
Coalesce remote tmux topology refreshes
austinywang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /// Outcome of translating and forwarding one control-plane key to tmux. | ||
| enum RemoteTmuxControlKeySendResult { | ||
| case sent | ||
| case rejected | ||
| case unknownKey | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import Foundation | ||
|
|
||
| /// Resolves one projected tmux pane to its sole mutation owner. Production | ||
| /// session workspaces always use their session mirror; a standalone window | ||
| /// mirror can own mutations only when no session is bound to the workspace. | ||
| @MainActor | ||
| struct RemoteTmuxControlPaneLocation { | ||
| let containerPanelID: UUID | ||
| let owner: any RemoteTmuxControlPaneMutationOwner | ||
| let windowMirror: RemoteTmuxWindowMirror? | ||
| let pane: RemoteTmuxControlPane | ||
|
|
||
| func controlFocus() -> Bool { | ||
| owner.controlFocus(pane: pane.tmuxPaneID) | ||
| } | ||
|
|
||
| func sendInput(_ text: String) -> Bool { | ||
| owner.sendInput(toPane: pane.tmuxPaneID, text: text) | ||
| } | ||
|
|
||
| func sendKey(_ name: String) -> RemoteTmuxControlKeySendResult { | ||
| owner.sendKey(toPane: pane.tmuxPaneID, name: name) | ||
| } | ||
|
|
||
| func requestSplit(vertical: Bool) -> Bool { | ||
| owner.requestSplit(fromPane: pane.tmuxPaneID, vertical: vertical) | ||
| } | ||
|
|
||
| func requestResizePane(_ tmuxPaneID: Int, direction: String, amountCells: Int) -> Bool { | ||
| owner.requestResizePane(tmuxPaneID, direction: direction, amountCells: amountCells) | ||
| } | ||
|
|
||
| func requestResizePane(_ tmuxPaneID: Int, absoluteAxis: String, targetCells: Int) -> Bool { | ||
| owner.requestResizePane(tmuxPaneID, absoluteAxis: absoluteAxis, targetCells: targetCells) | ||
| } | ||
|
|
||
| func requestResizePane( | ||
| _ tmuxPaneID: Int, | ||
| absoluteAxis: String, | ||
| targetPercentage: Int | ||
| ) -> Bool { | ||
| owner.requestResizePane( | ||
| tmuxPaneID, | ||
| absoluteAxis: absoluteAxis, | ||
| targetPercentage: targetPercentage | ||
| ) | ||
| } | ||
|
|
||
| func requestRespawn(command: String, workingDirectory: String?) -> Bool { | ||
| owner.requestRespawnPane( | ||
| pane.tmuxPaneID, | ||
| command: command, | ||
| workingDirectory: workingDirectory | ||
| ) | ||
| } | ||
|
|
||
| func requestKill() -> Bool { | ||
| owner.requestKillPane(pane.tmuxPaneID) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import Foundation | ||
|
|
||
| /// Mutation boundary shared by session-owned pane projections and deliberately | ||
| /// standalone window-mirror fixtures. | ||
| @MainActor | ||
| protocol RemoteTmuxControlPaneMutationOwner: AnyObject { | ||
| func controlFocus(pane tmuxPaneID: Int) -> Bool | ||
| func sendInput(toPane tmuxPaneID: Int, text: String) -> Bool | ||
| func sendKey( | ||
| toPane tmuxPaneID: Int, | ||
| name: String | ||
| ) -> RemoteTmuxControlKeySendResult | ||
| func requestSplit(fromPane tmuxPaneID: Int, vertical: Bool) -> Bool | ||
| func requestResizePane(_ tmuxPaneID: Int, direction: String, amountCells: Int) -> Bool | ||
| func requestResizePane(_ tmuxPaneID: Int, absoluteAxis: String, targetCells: Int) -> Bool | ||
| func requestResizePane( | ||
| _ tmuxPaneID: Int, | ||
| absoluteAxis: String, | ||
| targetPercentage: Int | ||
| ) -> Bool | ||
| func requestRespawnPane( | ||
| _ tmuxPaneID: Int, | ||
| command: String, | ||
| workingDirectory: String? | ||
| ) -> Bool | ||
| func requestKillPane(_ tmuxPaneID: Int) -> Bool | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.