Skip to content

fix(tui): advertise the terminal shortcut in help and make F1 the only help key - #384

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/help-keys-terminal-shortcut
Aug 17, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/help-keys-terminal-shortcut

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

What

Two help/keybinding fixes found while driving the TUI in a real PTY.

1. `Ctrl+`` was missing from help's Global section.

The terminal panel is reachable from anywhere, but help listed it only inside the FocusBlock::BottomPanel branch — so it told you how to close a panel you had no way to discover. It now sits in the Global section beside Ctrl+E, matching where the binding actually lives in commands.rs.

2. ? is no longer a help shortcut; F1 is the only one.

? was listed under "Global" but was never global. It lived in semantic_command_for_composer_key guarded on an empty composer, so it fired only from an empty chat box and was silently swallowed in the editor and everywhere else. Removing it means ? reaches the composer as an ordinary character. F1 (already the real global binding) and /help remain.

The onboarding shortcut list in overlays.rs is updated to match.

Tests

  • help_advertises_the_terminal_shortcut_from_every_block — asserts the Global line renders from Workspace, Files, Composer and Footer. Verified to fail without the fix, so it isn't vacuous.
  • question_mark_types_into_an_empty_composer — pins the new behaviour on the exact case that used to be intercepted.
  • question_mark_opens_help_overlay renamed to f1_opens_help_overlay; it already pressed F1 and the old name was stale.

Verification

cargo fmt --all -- --check, cargo clippy --all-targets, cargo test --workspace all clean.

Driven in a real tmux PTY at 130x38:

  • F1 opens help, which renders • Ctrl+\ Toggle terminal paneland• F1 Help`
  • ? types a literal ? into the composer
  • Ctrl+\`` opens a real /bin/zsh -l` in the workspace dir and toggles closed cleanly

Note

F1 is now the only key that opens help. Some terminal emulators and multiplexer configs bind F1 themselves; /help remains as the non-key fallback. Worth a thought if you'd rather keep a printable-key alternative.

…y help key

Help's Global section listed Ctrl+E and F4 but not Ctrl+`, so the terminal
panel was only mentioned once you already had it focused — where it told you
how to close a panel you had no way to discover. Add it to the Global section.

Drop `?` as a help shortcut. It was never global despite being listed under
"Global": it lived in semantic_command_for_composer_key and only fired on an
empty composer, so it was silently swallowed everywhere else. F1 is the real
global binding and is now the only key that opens help; `?` reaches the
composer as an ordinary character. Update the onboarding shortcut list to
match.

Tests: help advertises the terminal shortcut from every focus block, and `?`
types into an empty composer instead of opening help. Renames the existing
question_mark_opens_help_overlay test, which already pressed F1.
@github-actions
github-actions Bot enabled auto-merge (squash) August 17, 2026 10:22
@github-actions
github-actions Bot merged commit 216fd0c into main Aug 17, 2026
7 checks passed
@mohitranka
mohitranka deleted the fix/help-keys-terminal-shortcut branch August 17, 2026 10:25
mohitranka added a commit that referenced this pull request Aug 21, 2026
…y help key (#384)

Help's Global section listed Ctrl+E and F4 but not Ctrl+`, so the terminal
panel was only mentioned once you already had it focused — where it told you
how to close a panel you had no way to discover. Add it to the Global section.

Drop `?` as a help shortcut. It was never global despite being listed under
"Global": it lived in semantic_command_for_composer_key and only fired on an
empty composer, so it was silently swallowed everywhere else. F1 is the real
global binding and is now the only key that opens help; `?` reaches the
composer as an ordinary character. Update the onboarding shortcut list to
match.

Tests: help advertises the terminal shortcut from every focus block, and `?`
types into an empty composer instead of opening help. Renames the existing
question_mark_opens_help_overlay test, which already pressed F1.
mohitranka added a commit that referenced this pull request Sep 11, 2026
…y help key (#384)

Help's Global section listed Ctrl+E and F4 but not Ctrl+`, so the terminal
panel was only mentioned once you already had it focused — where it told you
how to close a panel you had no way to discover. Add it to the Global section.

Drop `?` as a help shortcut. It was never global despite being listed under
"Global": it lived in semantic_command_for_composer_key and only fired on an
empty composer, so it was silently swallowed everywhere else. F1 is the real
global binding and is now the only key that opens help; `?` reaches the
composer as an ordinary character. Update the onboarding shortcut list to
match.

Tests: help advertises the terminal shortcut from every focus block, and `?`
types into an empty composer instead of opening help. Renames the existing
question_mark_opens_help_overlay test, which already pressed F1.
mohitranka added a commit that referenced this pull request Sep 11, 2026
…y help key (#384)

Help's Global section listed Ctrl+E and F4 but not Ctrl+`, so the terminal
panel was only mentioned once you already had it focused — where it told you
how to close a panel you had no way to discover. Add it to the Global section.

Drop `?` as a help shortcut. It was never global despite being listed under
"Global": it lived in semantic_command_for_composer_key and only fired on an
empty composer, so it was silently swallowed everywhere else. F1 is the real
global binding and is now the only key that opens help; `?` reaches the
composer as an ordinary character. Update the onboarding shortcut list to
match.

Tests: help advertises the terminal shortcut from every focus block, and `?`
types into an empty composer instead of opening help. Renames the existing
question_mark_opens_help_overlay test, which already pressed F1.
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