From 502fb04c231f8461b82098aafbcb62d696a5ba30 Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Wed, 10 Jun 2026 15:59:40 -0700 Subject: [PATCH] fix(tui): make Ctrl+B directly background the active foreground shell (#3032) Previously Ctrl+B opened a two-step ShellControlView menu (Background / Cancel). Now it directly calls request_foreground_shell_background(), backgrounding the running foreground shell in one keystroke. When no foreground shell is running, the existing status message ("No foreground shell command to background") provides the hint. The ShellControlView and open_shell_control() remain available as a programmatic entry point for views/tests. --- crates/tui/src/tui/ui.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/tui/src/tui/ui.rs b/crates/tui/src/tui/ui.rs index 3481d43e..62df492b 100644 --- a/crates/tui/src/tui/ui.rs +++ b/crates/tui/src/tui/ui.rs @@ -3340,7 +3340,12 @@ async fn run_event_loop( && key.modifiers.contains(KeyModifiers::CONTROL) && app.view_stack.is_empty() { - open_shell_control(app); + // #3032: Ctrl+B directly backgrounds the active foreground + // shell command instead of opening a two-step shell-control + // menu. When nothing is backgroundable, the status message + // tells the user what's going on. + request_foreground_shell_background(app); + app.needs_redraw = true; continue; }