Skip to content

Add show-options stub to tmux compatibility layer#2672

Open
lark1115 wants to merge 2 commits intomanaflow-ai:mainfrom
lark1115:fix/tmux-compat-show-options
Open

Add show-options stub to tmux compatibility layer#2672
lark1115 wants to merge 2 commits intomanaflow-ai:mainfrom
lark1115:fix/tmux-compat-show-options

Conversation

@lark1115
Copy link
Copy Markdown
Contributor

@lark1115 lark1115 commented Apr 7, 2026

Summary

  • Add show-options case to runTmuxCompatCommand in CLI/cmux.swift
  • omx queries tmux show-options -sv extended-keys on 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

  • Ran cmux omx — no longer errors with "Unsupported tmux compatibility command: show-options"
  • Verified other tmux compat commands still work

Demo Video

N/A — CLI-only change, no UI impact.

Checklist

  • I tested the change locally
  • I added or updated tests for behavior changes
  • I updated docs/changelog if needed
  • I requested bot reviews after my latest commit (copy/paste block above or equivalent)
  • All code review bot comments are resolved
  • All human review comments are resolved

Summary by cubic

Add show-options/show-option handling across the tmux compatibility layer in cmux so the omx startup 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-compat path, fixing #2671.

Written for commit 808655f. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Added support for the show-options and show-option tmux-compat subcommands; they now return an empty response instead of triggering an error.
    • No other tmux-compat subcommands’ behavior was changed by this update.

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
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

@lark1115 is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2dfa5db2-dc57-410d-a97e-4a6c318f1322

📥 Commits

Reviewing files that changed from the base of the PR and between e9b76d4 and 808655f.

📒 Files selected for processing (1)
  • CLI/cmux.swift
✅ Files skipped from review due to trivial changes (1)
  • CLI/cmux.swift

📝 Walkthrough

Walkthrough

Added handling for tmux-compat commands show-options and show-option in the CLI; these cases now synchronously print an empty string instead of falling through to the unsupported-command error.

Changes

Cohort / File(s) Summary
Tmux Compatibility Command Handler
CLI/cmux.swift
Added show-options and show-option cases to runTmuxCompatCommand, both printing an empty string to avoid the previous unsupported-command error when invoked by tmux-compat clients (e.g., omx).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I nudged a case into the switch with care,
Now show-options finds an empty hare,
No more errors hopping in the night,
Omx can run and all feels right,
A tiny fix — a quiet delight. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a stub for the show-options command to the tmux compatibility layer.
Description check ✅ Passed The PR description includes all key sections: summary of changes, explanation of why the change was needed, testing performed, and a filled-out checklist.
Linked Issues check ✅ Passed The changes fully address the linked issue #2671 by adding show-options handling to prevent the unsupported command error when running cmux omx.
Out of Scope Changes check ✅ Passed All changes in CLI/cmux.swift are directly scoped to handling the show-options/show-option commands as required by issue #2671, with no extraneous modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai
Copy link
Copy Markdown

cubic-dev-ai bot commented Apr 7, 2026

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 182c827b-1640-44e0-8e95-ee738417ecd6

📥 Commits

Reviewing files that changed from the base of the PR and between 0bbaa48 and e9b76d4.

📒 Files selected for processing (1)
  • CLI/cmux.swift

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 7, 2026

Greptile Summary

This PR adds a show-options stub to silence the error omx triggers when querying tmux show-options -sv extended-keys on startup. However, the stub is placed inside runTmuxCompatCommand, which is never invoked for show-options — the actual dispatch path routes through runClaudeTeamsTmuxCompat, whose default case still throws the unsupported-command error.

  • P1: The new show-options case at line 12289 is unreachable dead code. runTmuxCompatCommand is only called for commands in the hard-coded list at lines 2679–2701 and explicit forwarding lists inside runClaudeTeamsTmuxCompat (wait-for, last-window, etc.) — show-options is in neither. The fix must be placed in runClaudeTeamsTmuxCompat, e.g. appending "show-options" to the no-op return block at line 11692 (alongside set-option, set-window-option, etc.).

Confidence Score: 4/5

Not 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 runClaudeTeamsTmuxCompat around line 11692 where show-options should be handled

Important Files Changed

Filename Overview
CLI/cmux.swift Adds a show-options stub to runTmuxCompatCommand, but no dispatch path routes show-options to that function — the handler is unreachable and the original error persists

Sequence Diagram

sequenceDiagram
    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
Loading

Reviews (1): Last reviewed commit: "Add show-options stub to tmux compatibil..." | Re-trigger Greptile

Comment on lines +12289 to +12292
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("")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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:

Suggested change
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cmux omx fails with "Unsupported tmux compatibility command: show-options"

1 participant