Remove the plus separator after Option symbols in TUI key hints (#49136)

## What changed

Render macOS Option shortcuts as `⌥t` and `ctrl+⌥t` instead of `⌥+t` and `ctrl+⌥+t`. Keep `+` separators after text modifier labels such as `ctrl`, `shift`, and `alt`.

## Testing

Update key-label and chord assertions and UI snapshots to expect the compact labels across shortcut help, navigation hints, and tooltips.

GitOrigin-RevId: 7d52088ebce3dfa3f8bdad65eb159ca0fead8a31
This commit is contained in:
Benjamin Carlsson
2026-09-29 02:37:23 +00:00
committed by copyberry
parent 458f7046a5
commit d7f7fa4106
26 changed files with 142 additions and 143 deletions
@@ -9,7 +9,7 @@ expression: "snapshots.join(\"\\n\\n\")"
↑ Loading earlier messages… · esc latest
80 columns · Failed
Retry history: ⌥+</ctrl+home. esc latest
Retry history: ⌥</ctrl+home. esc latest
80 columns · Complete
esc latest
@@ -21,7 +21,7 @@ expression: "snapshots.join(\"\\n\\n\")"
↑ Loading… · esc latest
40 columns · Failed
Retry: ⌥+</ctrl+home
Retry: ⌥</ctrl+home
40 columns · Complete
esc latest
@@ -33,7 +33,7 @@ expression: "snapshots.join(\"\\n\\n\")"
↑ Loading… · esc latest
28 columns · Failed
Retry: ⌥+</ctrl+home
Retry: ⌥</ctrl+home
28 columns · Complete
esc latest
@@ -4370,7 +4370,7 @@ fn session_lifecycle_avoids_redundant_subagent_metadata_reads() -> Result<()> {
.replace(&child_thread_id.to_string(), "[child]"),
@r###"
Subagents
Select an agent to watch. ⌥+← previous, ⌥+→ next.
Select an agent to watch. ⌥← previous, ⌥→ next.
› 1. • Main [default] (current) [root]
@@ -13,18 +13,18 @@ shortcut help:
Compose Session
/ Commands tab Send message
@ Mention files ⌥+, Less reasoning
! Shell command ⌥+. More reasoning
@ Mention files ⌥, Less reasoning
! Shell command ⌥. More reasoning
ctrl+j New line f4 Inspect activity
ctrl+v Paste image ctrl+c Quit
ctrl+g External editor
ctrl+r Search history Transcript (open first)
esc esc Edit last message ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥+, / shift+⌥+. Top / latest
esc esc Edit last message ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥, / shift+⌥. Top / latest
/keymap customize
@@ -48,18 +48,18 @@ shortcut help:
Compose Session
/ Commands tab Send message
@ Mention files ⌥+, Less reasoning
! Shell command ⌥+. More reasoning
@ Mention files ⌥, Less reasoning
! Shell command ⌥. More reasoning
ctrl+j New line f4 Inspect activity
ctrl+v Paste image ctrl+c Quit
ctrl+g External editor
ctrl+r Search history Transcript (open first)
esc esc Edit last message ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥+, / shift+⌥+. Top / latest
esc esc Edit last message ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥, / shift+⌥. Top / latest
/keymap customize
@@ -7,18 +7,18 @@ shortcut help:
Compose Session
/ Commands tab Send message
@ Mention files ⌥+, Less reasoning
! Shell command ⌥+. More reasoning
@ Mention files ⌥, Less reasoning
! Shell command ⌥. More reasoning
ctrl+j New line f4 Inspect activity
ctrl+v Paste image ctrl+c Quit
ctrl+g External editor
ctrl+r Search history Transcript (open first)
esc esc Edit last message ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥+, / shift+⌥+. Top / latest
esc esc Edit last message ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥, / shift+⌥. Top / latest
/keymap customize
@@ -14,12 +14,12 @@ expression: "snapshots.join(\"\\n---\\n\")"
Keyboard shortcuts
Compose Session Transcript (open first)
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥+, Less reasoning f3 Find text
! Shell command ⌥+. More reasoning pgup / pgdn Scroll
ctrl+j New line f4 Inspect activity ctrl+space Start selection
ctrl+v Paste image ctrl+c Quit ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥+, / shift+⌥+. Top / latest
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥, Less reasoning f3 Find text
! Shell command ⌥. More reasoning pgup / pgdn Scroll
ctrl+j New line f4 Inspect activity ctrl+space Start selection
ctrl+v Paste image ctrl+c Quit ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥, / shift+⌥. Top / latest
ctrl+r Search history
esc esc Edit last message
@@ -42,12 +42,12 @@ expression: "snapshots.join(\"\\n---\\n\")"
Keyboard shortcuts
Compose Session Transcript (open first)
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥+, Less reasoning f3 Find text
! Shell command ⌥+. More reasoning pgup / pgdn Scroll
ctrl+j New line ctrl+x t Inspect activity ctrl+space Start selection
ctrl+v Paste image ctrl+c Quit ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥+, / shift+⌥+. Top / latest
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥, Less reasoning f3 Find text
! Shell command ⌥. More reasoning pgup / pgdn Scroll
ctrl+j New line ctrl+x t Inspect activity ctrl+space Start selection
ctrl+v Paste image ctrl+c Quit ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥, / shift+⌥. Top / latest
ctrl+r Search history
esc esc Edit last message
@@ -70,12 +70,12 @@ expression: "snapshots.join(\"\\n---\\n\")"
Keyboard shortcuts
Compose Session Transcript (open first)
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥+, Less reasoning f3 Find text
! Shell command ⌥+. More reasoning pgup / pgdn Scroll
ctrl+j New line ctrl+c Quit ctrl+space Start selection
ctrl+v Paste image ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥+, / shift+⌥+. Top / latest
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥, Less reasoning f3 Find text
! Shell command ⌥. More reasoning pgup / pgdn Scroll
ctrl+j New line ctrl+c Quit ctrl+space Start selection
ctrl+v Paste image ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥, / shift+⌥. Top / latest
ctrl+r Search history
esc esc Edit last message
@@ -24,18 +24,18 @@ expression: text
Session
tab Send message
⌥+, Less reasoning
⌥+. More reasoning
⌥, Less reasoning
⌥. More reasoning
f4 Inspect activity
ctrl+c Quit
Transcript (open first)
ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥+, / shift+⌥+. Top / latest
ctrl+t Open transcript
f3 Find text
pgup / pgdn Scroll
ctrl+space Start selection
ctrl+home / ctrl+end Top / latest
shift+⌥, / shift+⌥. Top / latest
/keymap customize
@@ -13,12 +13,12 @@ expression: text
Keyboard shortcuts
Compose Session Transcript (open first)
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥+, Less reasoning f3 Find text
! Shell command ⌥+. More reasoning pgup / pgdn Scroll
ctrl+j New line f4 Inspect activity ctrl+space Start selection
ctrl+v Paste image ctrl+c Quit ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥+, / shift+⌥+. Top / latest
/ Commands tab Send message ctrl+t Open transcript
@ Mention files ⌥, Less reasoning f3 Find text
! Shell command ⌥. More reasoning pgup / pgdn Scroll
ctrl+j New line f4 Inspect activity ctrl+space Start selection
ctrl+v Paste image ctrl+c Quit ctrl+home / ctrl+end Top / latest
ctrl+g External editor shift+⌥, / shift+⌥. Top / latest
ctrl+r Search history
esc esc Edit last message
@@ -6,19 +6,19 @@ expression: terminal.backend()
" "
" Compose Session "
" / Commands tab Send message "
" @ Mention files ⌥+, Less reasoning "
" ! Shell command ⌥+. More reasoning "
" @ Mention files ⌥, Less reasoning "
" ! Shell command ⌥. More reasoning "
" ctrl+j New line ← Agents (empty prompt) "
" ctrl+v Paste image f4 Inspect activity "
" ctrl+g External editor ctrl+c Quit "
" ctrl+r Search history "
" esc esc Edit last message Transcript (open first) "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
" "
@@ -6,18 +6,18 @@ expression: terminal.backend()
" "
" Compose Session "
" / Commands tab Send message "
" @ Mention files ⌥+, Less reasoning "
" ! Shell command ⌥+. More reasoning "
" @ Mention files ⌥, Less reasoning "
" ! Shell command ⌥. More reasoning "
" ctrl+x enter New line f4 Inspect activity "
" ctrl+v Paste image ctrl+c Quit "
" ctrl+g ctrl+g External editor "
" ctrl+r Search history Transcript (open first) "
" esc esc Edit last message ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" esc esc Edit last message ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
" "
@@ -6,18 +6,18 @@ expression: terminal.backend()
" "
" Compose Session "
" / Commands tab Send message "
" @ Mention files ⌥+, Less reasoning "
" ! Shell command ⌥+. More reasoning "
" @ Mention files ⌥, Less reasoning "
" ! Shell command ⌥. More reasoning "
" shift+enter New line f4 Inspect activity "
" ctrl+v Paste image ctrl+c Quit "
" ctrl+g External editor "
" ctrl+r Search history Transcript (open first) "
" esc Edit last message ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" esc Edit last message ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
" "
@@ -6,18 +6,18 @@ expression: terminal.backend()
" "
" Compose Session "
" / Commands tab Queue message "
" @ Mention files ⌥+, Less reasoning "
" ! Shell command ⌥+. More reasoning "
" @ Mention files ⌥, Less reasoning "
" ! Shell command ⌥. More reasoning "
" shift+enter New line f4 Inspect activity "
" ctrl+v Paste image ctrl+c Quit "
" ctrl+g External editor "
" ctrl+r Search history Transcript (open first) "
" esc esc Edit last message ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" esc esc Edit last message ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
" "
@@ -7,18 +7,18 @@ expression: terminal.backend()
" Compose Session "
" / Commands tab Send message "
" @ Mention files shift+tab Change mode "
" ! Shell command ⌥+, Less reasoning "
" ctrl+j New line ⌥+. More reasoning "
" ! Shell command ⌥, Less reasoning "
" ctrl+j New line ⌥. More reasoning "
" ctrl+v Paste image f8 Voice "
" ctrl+g External editor f4 Inspect activity "
" ctrl+r Search history ctrl+c Quit "
" esc esc Edit last message "
" Transcript (open first) "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
@@ -6,18 +6,18 @@ expression: terminal.backend()
" "
" Compose Session "
" / Commands tab Queue message "
" @ Mention files ⌥+, Less reasoning "
" ! Shell command ⌥+. More reasoning "
" @ Mention files ⌥, Less reasoning "
" ! Shell command ⌥. More reasoning "
" ctrl+j New line f8 Voice "
" ctrl+v Paste image f4 Inspect activity "
" ctrl+g External editor ctrl+c Interrupt "
" ctrl+r Search history "
" esc esc Edit last message Transcript (open first) "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
@@ -6,18 +6,18 @@ expression: terminal.backend()
" "
" Compose Session "
" / Commands tab Send message "
" @ Mention files ⌥+, Less reasoning "
" ! Shell command ⌥+. More reasoning "
" @ Mention files ⌥, Less reasoning "
" ! Shell command ⌥. More reasoning "
" shift+enter New line f8 Voice "
" ctrl+v Paste image f4 Inspect activity "
" ctrl+g External editor ctrl+c Quit "
" ctrl+r Search history "
" esc Edit last message Transcript (open first) "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
@@ -7,18 +7,18 @@ expression: terminal.backend()
" Compose Session "
" / Commands tab Send message "
" @ Mention files shift+tab Change mode "
" ! Shell command ⌥+. More reasoning "
" ! Shell command ⌥. More reasoning "
" shift+enter New line f8 Voice "
" ctrl+⌥+v Paste image ← Agents (empty prompt) "
" ctrl+⌥v Paste image ← Agents (empty prompt) "
" ctrl+x ctrl+e External editor f4 Inspect activity "
" esc Edit last message ctrl+c Quit "
" "
" Transcript (open first) "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥+, / shift+⌥+. Top / latest "
" ctrl+t Open transcript "
" f3 Find text "
" pgup / pgdn Scroll "
" ctrl+space Start selection "
" ctrl+home / ctrl+end Top / latest "
" shift+⌥, / shift+⌥. Top / latest "
" "
" /keymap customize "
@@ -11,4 +11,4 @@ expression: "render_bottom_popup(&chat, 100)"
Type your answer
enter submit ctrl+] skip ⌥+↓ main prompt ⌥+↑ next question
enter submit ctrl+] skip ⌥↓ main prompt ⌥↑ next question
+3 -1
View File
@@ -89,7 +89,9 @@ impl KeyBinding {
] {
if self.modifiers.contains(modifier) {
label.push_str(name);
label.push('+');
if !matches!(name, "⌥" | "⌘" | "^") {
label.push('+');
}
}
}
let key = match self.key {
+2 -2
View File
@@ -11,9 +11,9 @@ use ratatui::widgets::Paragraph;
fn modifier_combinations_stay_compact_inside_chords() {
let cases = [
(KeyModifiers::CONTROL, "ctrl+t"),
(KeyModifiers::ALT, "⌥+t"),
(KeyModifiers::ALT, "⌥t"),
(KeyModifiers::CONTROL | KeyModifiers::SHIFT, "ctrl+shift+t"),
(KeyModifiers::CONTROL | KeyModifiers::ALT, "ctrl+⌥+t"),
(KeyModifiers::CONTROL | KeyModifiers::ALT, "ctrl+⌥t"),
];
for (modifiers, expected) in cases {
let prefix = KeyBinding::new(KeyCode::Char('t'), modifiers);
+2 -2
View File
@@ -589,8 +589,8 @@ fn pending_hint_skips_whole_oversized_configured_completions() {
assert_eq!(
scenes,
[
"80: ctrl+x then · shift+⌥+f11 activity · ctrl+shift+⌥+f12 copy · esc cancel",
"32: shift+⌥+f11 inspect · esc cancel",
"80: ctrl+x then · shift+⌥f11 activity · ctrl+shift+⌥f12 copy · esc cancel",
"32: shift+⌥f11 inspect · esc cancel",
"12: esc cancel",
]
);
@@ -1,6 +1,5 @@
---
source: tui/src/pager_overlay/transcript_tests.rs
assertion_line: 417
expression: snapshots
---
--- loading ---
@@ -32,7 +31,7 @@ recent transcript
Retry history: ⌥+</ctrl+home.
Retry history: ⌥</ctrl+home.
@@ -32,7 +32,7 @@ recent transcript
Retry history: ⌥+</ctrl+home.
Retry history: ⌥</ctrl+home.
@@ -3,7 +3,7 @@ source: tui/src/app/tests.rs
expression: "render_bottom_popup(&app.chat_widget, 80)"
---
Subagents
Select an agent to watch. ⌥+← previous, ⌥+→ next.
Select an agent to watch. ⌥← previous, ⌥→ next.
› 1. • /root/worker 00000000-0000-0000-0000-000000000123
@@ -3,7 +3,7 @@ source: tui/src/app/tests.rs
expression: "render_bottom_popup(&app.chat_widget, 80)"
---
Subagents
Select an agent to watch. ⌥+← previous, ⌥+→ next.
Select an agent to watch. ⌥← previous, ⌥→ next.
› 1. • Main [default] (current) 00000000-0000-0000-0000-000000000123
@@ -1,6 +1,5 @@
---
source: tui/src/tooltips/keybinding_tests.rs
assertion_line: 42
expression: "lines.iter().map(|line| format!(\"{line:?}\")).collect::<Vec<_>>().join(\"\\n\")"
---
Line::from("Default")
@@ -24,8 +23,8 @@ Line::from_iter([Span::from("Tip:").bold(), Span::from(" Press "), Span::from("c
Line::from("entered prompts.")
Line::default()
Line::from_iter([Span::from("Tip:").bold(), Span::from(" For models with adjustable")])
Line::from_iter([Span::from("reasoning, press "), Span::from("⌥+.").fg(Color::Rgb(166, 227, 161)), Span::from(" to increase")])
Line::from_iter([Span::from("reasoning effort or "), Span::from("⌥+,").fg(Color::Rgb(166, 227, 161)), Span::from(" to decrease it.")])
Line::from_iter([Span::from("reasoning, press "), Span::from("⌥.").fg(Color::Rgb(166, 227, 161)), Span::from(" to increase")])
Line::from_iter([Span::from("reasoning effort or "), Span::from("⌥,").fg(Color::Rgb(166, 227, 161)), Span::from(" to decrease it.")])
Line::default()
Line::from("Remapped")
Line::from_iter([Span::from("Tip:").bold(), Span::from(" Press "), Span::from("ctrl+x q").fg(Color::Rgb(166, 227, 161)), Span::from(" to queue a message")])
@@ -301,7 +301,7 @@ fn loading_completion_restores_unseen_activity_and_failure_stops_motion() {
let failed = view
.footer(/*width*/ 80, MotionMode::Reduced)
.expect("failed history footer");
insta::assert_snapshot!(failed.text.to_string(), @"New activity · Retry history: ⌥+</ctrl+home. esc latest");
insta::assert_snapshot!(failed.text.to_string(), @"New activity · Retry history: ⌥</ctrl+home. esc latest");
view.history = TranscriptHistoryState::Complete;
assert!(!view.is_loading_history());
assert_eq!(
@@ -1,17 +1,16 @@
---
source: tui/src/transcript_view/footer_tests.rs
assertion_line: 240
expression: "snapshots.join(\"\\n\")"
---
26 columns, LoadingOlder: ↑ Loading… · esc latest
26 columns, LoadingBeginning: ↑ Loading… · esc latest
26 columns, Failed: Retry: ⌥+</ctrl+home
26 columns, Failed: Retry: ⌥</ctrl+home
26 columns, Complete: New activity · esc latest
38 columns, LoadingOlder: ↑ Loading… · esc latest
38 columns, LoadingBeginning: ↑ Loading… · esc latest
38 columns, Failed: Retry: ⌥+</ctrl+home
38 columns, Failed: Retry: ⌥</ctrl+home
38 columns, Complete: New activity · esc latest
78 columns, LoadingOlder: ↑ Loading earlier messages… · New activity · esc latest
78 columns, LoadingBeginning: ↑ Loading earlier messages… · New activity · esc latest
78 columns, Failed: New activity · Retry history: ⌥+</ctrl+home. esc latest
78 columns, Failed: New activity · Retry history: ⌥</ctrl+home. esc latest
78 columns, Complete: New activity · esc latest