Skip to content

fix(tui): use actual tmux prefix in welcome dialog and status bar#887

Open
redhelix wants to merge 2 commits intonjbrake:mainfrom
redhelix:Spanish
Open

fix(tui): use actual tmux prefix in welcome dialog and status bar#887
redhelix wants to merge 2 commits intonjbrake:mainfrom
redhelix:Spanish

Conversation

@redhelix
Copy link
Copy Markdown

@redhelix redhelix commented May 2, 2026

Description

AOE hardcodes Ctrl+b as the tmux prefix in two places:

  • The first-run welcome dialog (src/tui/dialogs/welcome.rs)
  • The session status bar injected into every agent session (src/tmux/status_bar.rs)

Users who configure a non-default tmux prefix (e.g. Ctrl+a, which is common) see misleading detach instructions. This fix reads the actual configured prefix at runtime via tmux show-option -gv prefix and displays it correctly.

Changes

  • src/tmux/utils.rs: Added tmux_prefix_display() — reads tmux show-option -gv prefix, converts tmux notation (C-a, M-b) to human-readable form (Ctrl+a, Alt+b), falls back to Ctrl+b if tmux is unavailable.
  • src/tmux/mod.rs: Re-exports tmux_prefix_display from the public API.
  • src/tui/dialogs/welcome.rs: Welcome dialog now calls tmux_prefix_display() for all three prefix references (detach key, scroll key, and the note line).
  • src/tmux/status_bar.rs: apply_status_bar() now calls tmux_prefix_display() so the status-left injected into each agent session shows the correct prefix.

Root cause

Reported by a user whose tmux prefix is C-a. The status bar displayed Ctrl+b d to detach; pressing Ctrl+b d did nothing; pressing the actual prefix Ctrl+a d worked. The mismatch caused confusion about whether AOE itself was broken.

PR Type

  • New Feature
  • Bug Fix
  • Refactor
  • Documentation
  • Infrastructure / CI

Checklist

  • I understand the code I am submitting
  • New and existing tests pass
  • Documentation was updated where necessary
  • For UI changes: included screenshot or recording

Testing

  • cargo test passes (existing test_enter_submits, test_esc_submits, test_space_submits, test_other_keys_continue in welcome.rs all green)
  • Manually verified on a machine with prefix = C-a: welcome dialog shows Ctrl+a then d, status bar shows Ctrl+a d to detach
  • Fallback tested: with tmux not on PATH, tmux_prefix_display() returns Ctrl+b

AI Usage

  • AI was used for drafting/refactoring

AI Model/Tool used: Claude Sonnet 4.6 (Claude Code)

Any Additional AI Details you'd like to share: Used for implementation and PR writeup; logic and testing verified by the submitting developer.

  • I am an AI Agent filling out this form (check box if true)

redhelix and others added 2 commits May 2, 2026 18:07
…oded Ctrl+b

The welcome dialog hardcoded "Ctrl+b" for tmux key hints, which is wrong
for users who set a custom prefix (e.g. Ctrl+a). Add tmux_prefix_display()
in src/tmux/utils.rs which reads `tmux show-option -gv prefix` at render
time and converts the raw tmux format (C-a, M-b, etc.) to a human-readable
label. Falls back to "Ctrl+b" if tmux is unavailable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Ctrl+b

Reads the user's configured tmux prefix via `tmux show-option -gv prefix`
and displays it in the session status-left bar, so users with non-default
prefixes (e.g. Ctrl+a) see the correct detach hint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@redhelix redhelix requested a review from njbrake as a code owner May 2, 2026 22:15
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.

1 participant