Conversation
tmuxNewWindow parsed -t but never used it, so the target session a caller specified was silently ignored and the new workspace always landed in the currently active window instead of the target's window. Resolve -t via tmuxResolveWorkspaceTarget and route workspace.create into that workspace's macOS window (mirroring how surface.split already resolves -t for split-window), matching tmux's new-window semantics where the target's session determines placement. Also collapse the copy-pasted body shared by tmuxNewSession and tmuxNewWindow into tmuxCreateWorkspace/tmuxPrintWorkspaceRef helpers. Refs #84.
tmux_compat.go had grown to 1,801 lines covering nine unrelated concerns in one file. File reorganization only, no behavior change: every type and function moved verbatim (confirmed by diffing the extracted func/type signatures against the pre-split file), all staying in package main so there is zero import churn. - tmux_compat.go: entry point (runTmuxCompat, rpcContext.call) + dispatchTmuxCommand - tmux_args.go: tmux argument parsing (tmuxParsed, parseTmuxArgs, splitTmuxCmd) - tmux_format.go: format string rendering + format context building - tmux_target.go: session/window/pane target resolution - tmux_store.go: TmuxCompatStore local JSON state - tmux_keys.go: special key translation - tmux_waitfor.go: wait-for signal path helper - tmux_commands.go: per-command implementations (new-session, split-window, ...) - tmux_helpers.go: small shared helpers (firstNonEmpty, parseInt, parseFloat) Refs #102.
main.go had grown to 1,105 lines mixing the stdio RPC server lifecycle with two unrelated groups of method handlers. File reorganization only, no behavior change: every type and function moved verbatim (confirmed by diffing extracted func/type signatures against the pre-split file), all staying in package main. - main.go: entry point, stdio RPC server lifecycle, frame I/O, handleRequest dispatch table, closeAll (shared teardown across both stream and session state), and the low-level param helpers shared by both handler groups - main_proxy.go: proxy.* handlers (open/close/write/stream.subscribe) plus their stream bookkeeping (getStream/dropStream/streamPump) - main_sessions.go: session.* handlers (open/close/attach/resize/ detach/status) plus their snapshot/resize bookkeeping Refs #102.
The module path was still the pre-rebrand github.com/manaflow-ai/cmux/daemon/remote leftover from before this repo became darkroomengineering/programa. Rename to github.com/darkroomengineering/programa/daemon/remote. No internal import paths needed updating — the module is a single package (cmd/programad-remote) with no intra-module imports, and a repo-wide grep confirmed no other file references the old manaflow-ai/cmux/daemon/remote import path. Refs #102.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this does
tmux new-window -t now actually routes the workspace to the target session's window, with regression tests, and the two oversized Go files split along their own section comments.
Summary
Fixes #84. Fixes #102.
Test Plan