Add show-options stub to tmux compatibility layer#2672
Add show-options stub to tmux compatibility layer#2672lark1115 wants to merge 2 commits intomanaflow-ai:mainfrom
Conversation
omx queries `tmux show-options -sv extended-keys` on startup, which routes through cmux's tmux shim and fails because show-options was not implemented. Add a stub that returns empty string since cmux handles keys natively. Fixes manaflow-ai#2671
|
@lark1115 is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded handling for tmux-compat commands Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This review could not be run because your cubic account has exceeded the monthly review limit. If you need help restoring access, please contact contact@cubic.dev. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CLI/cmux.swift`:
- Around line 12289-12293: The "show-options" case was added to
runTmuxCompatCommand but the shims call cmux __tmux-compat ... which is handled
by runClaudeTeamsTmuxCompat, so requests still hit the "Unsupported tmux
compatibility command" path; move or duplicate the case "show-options" handler
(the print("") stub) into runClaudeTeamsTmuxCompat (or dispatch from
runClaudeTeamsTmuxCompat to runTmuxCompatCommand for this command) so that cmux
__tmux-compat show-options returns the empty response as intended.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Greptile SummaryThis PR adds a
Confidence Score: 4/5Not safe to merge — the fix is dead code and the original error is unchanged A single P1 finding: the sole code change is placed in the wrong function and never executes, so the bug it was meant to fix remains fully intact CLI/cmux.swift — specifically Important Files Changed
Sequence DiagramsequenceDiagram
participant omx
participant shim as cmux shim (tmux alias)
participant main as Main Dispatch
participant compat as runClaudeTeamsTmuxCompat
participant helper as runTmuxCompatCommand
omx->>shim: tmux show-options -sv extended-keys
shim->>main: command="__tmux-compat", args=["show-options","-sv","extended-keys"]
main->>compat: runClaudeTeamsTmuxCompat(commandArgs)
compat->>compat: split → command="show-options"
compat->>compat: switch: no matching case
compat-->>omx: ❌ throws "Unsupported tmux compatibility command: show-options"
Note over helper: PR adds show-options here,<br/>but this function is never<br/>called for show-options
Reviews (1): Last reviewed commit: "Add show-options stub to tmux compatibil..." | Re-trigger Greptile |
| case "show-options": | ||
| // Stub: omx queries `tmux show-options -sv extended-keys` to check | ||
| // terminal key mode. cmux handles keys natively, so return empty. | ||
| print("") |
There was a problem hiding this comment.
Unreachable handler —
show-options is never dispatched here
The show-options case is placed inside runTmuxCompatCommand, but no dispatch path routes show-options to that function. runTmuxCompatCommand is only called from (1) the main dispatch's hard-coded list at lines 2679–2701 and (2) the explicit forwarding lists inside runClaudeTeamsTmuxCompat — neither includes "show-options". When omx calls tmux show-options -sv extended-keys, the shim dispatches as __tmux-compat show-options … → runClaudeTeamsTmuxCompat → switch finds no match → default at line 11699 → still throws "Unsupported tmux compatibility command: show-options". The stub is dead code.
The fix belongs in runClaudeTeamsTmuxCompat's switch, appended to the existing no-op block at line 11692:
| case "show-options": | |
| // Stub: omx queries `tmux show-options -sv extended-keys` to check | |
| // terminal key mode. cmux handles keys natively, so return empty. | |
| print("") | |
| case "set-option", "set", "set-window-option", "setw", "source-file", "refresh-client", "attach-session", "detach-client", "show-options": | |
| return |
If an empty-string response is required instead of a silent no-op, add case "show-options": print(""); return as a separate case before that block.
The initial stub only added show-options to runTmuxCompatCommand, but omx routes through `cmux __tmux-compat` which dispatches to runClaudeTeamsTmuxCompat — a separate function with its own switch. The stub was unreachable from the actual omx call path. Fix: - Add show-options/show-option to runClaudeTeamsTmuxCompat (the __tmux-compat path used by omx/omc/omo shims) - Add show-options/show-option to the top-level command dispatch list (for direct `cmux show-options` usage) - Keep existing stub in runTmuxCompatCommand (reached via both paths) Fixes manaflow-ai#2671
Summary
show-optionscase torunTmuxCompatCommandinCLI/cmux.swifttmux show-options -sv extended-keyson startup, which routes through cmux's tmux shim and hits the unsupported command error. This stub returns an empty string since cmux handles keys natively.Fixes #2671
Testing
cmux omx— no longer errors with "Unsupported tmux compatibility command: show-options"Demo Video
N/A — CLI-only change, no UI impact.
Checklist
Summary by cubic
Add
show-options/show-optionhandling across thetmuxcompatibility layer incmuxso theomxstartup call (tmux show-options -sv extended-keys) returns an empty string instead of error. The stub is wired through both the top-level dispatch and the__tmux-compatpath, fixing #2671.Written for commit 808655f. Summary will update on new commits.
Summary by CodeRabbit
show-optionsandshow-optiontmux-compat subcommands; they now return an empty response instead of triggering an error.