From a90ba8c1215a3fea8a7efea7a93bbb2bc1d72a48 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Oct 2026 15:20:50 +0000 Subject: [PATCH 1/2] Replace TUI CLI term with panel Co-authored-by: phieri <12006381+phieri@users.noreply.github.com> --- README.md | 4 ++-- docs/index.html | 4 ++-- man/bt-intercom.1 | 4 ++-- src/main.rs | 17 ++++++++++++++--- src/tui.rs | 2 +- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9243d06..6b0d290 100644 --- a/README.md +++ b/README.md @@ -285,10 +285,10 @@ WirePlumber start in that user's session. Inspect pairing logs with ### Terminal control panel and talk groups -Start the Ratatui control panel after saving a headset network: +Start the terminal control panel after saving a headset network: ```sh -bt-intercom tui +bt-intercom panel ``` The panel shows Bluetooth connection and signal status plus PipeWire duplex diff --git a/docs/index.html b/docs/index.html index 7b9ed4f..a5cdfc3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -97,7 +97,7 @@

Hear only your group.

A small terminal, a clear picture

Keep the network in hand.

-

Open bt-intercom tui for the terminal control panel. Check Bluetooth connection and signal, confirm duplex audio is available, then manage groups and membership without editing config files.

+

Open bt-intercom panel for the terminal control panel. Check Bluetooth connection and signal, confirm duplex audio is available, then manage groups and membership without editing config files.

-

Illustrative terminal view; the TUI runs in your terminal, not in a separate app window.

+

Illustrative terminal view; the control panel runs in your terminal, not in a separate app window.

diff --git a/man/bt-intercom.1 b/man/bt-intercom.1 index 4063a14..fe6f33f 100644 --- a/man/bt-intercom.1 +++ b/man/bt-intercom.1 @@ -40,8 +40,8 @@ With --pair-button, a missing saved network starts empty for headless enrollment Write shell completion definitions to standard output. Supported shells include Bash, Zsh, Fish, and Elvish. .TP -.B tui -Open the Ratatui terminal control panel to monitor headsets and edit talk +.B panel +Open the interactive terminal control panel to monitor headsets and edit talk groups. Use Tab and arrow keys to navigate; press n to add a group, d to remove the selected group, and Space to toggle headset membership. .SH OPTIONS diff --git a/src/main.rs b/src/main.rs index 4bf2326..d81db89 100644 --- a/src/main.rs +++ b/src/main.rs @@ -169,8 +169,8 @@ enum CliCommand { #[arg(value_enum)] shell: Shell, }, - /// Open the terminal headset and talk-group control panel. - Tui, + /// Open the interactive terminal control panel. + Panel, } /// Opens an interactive BlueZ agent session to pair the specified device. @@ -562,7 +562,7 @@ fn reconnect_worker( /// Executes one CLI action, including the main polling and routing loop. fn run(action: CliCommand) -> Result<(), String> { match action { - CliCommand::Tui => { + CliCommand::Panel => { let network_path = headset_network_path()?; let allowed = load_headsets(&network_path)?; tui::run(allowed, talk_groups_path(&network_path)?)?; @@ -1162,6 +1162,17 @@ mod tests { } } + #[test] + fn terminal_control_panel_uses_panel_subcommand() { + assert!(matches!( + Cli::try_parse_from(["bt-intercom", "panel"]) + .unwrap() + .command, + CliCommand::Panel + )); + assert!(Cli::try_parse_from(["bt-intercom", "tui"]).is_err()); + } + #[test] fn verbose_is_global_and_version_short_alias_is_preserved() { for args in [ diff --git a/src/tui.rs b/src/tui.rs index a85d9e6..ef42c7d 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -426,7 +426,7 @@ impl Drop for TerminalRestore { pub fn run(allowed: BTreeSet, groups_path: PathBuf) -> Result<(), String> { if !std::io::stdin().is_terminal() || !std::io::stdout().is_terminal() { - return Err("the TUI requires an interactive terminal".into()); + return Err("the control panel requires an interactive terminal".into()); } let mut app = ControlPanel::new(allowed, groups_path)?; let mut terminal = ratatui::try_init().map_err(|error| error.to_string())?; From db26df3117b176fda5f8d982098fd76455c321fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Oct 2026 15:21:45 +0000 Subject: [PATCH 2/2] Update user-facing control panel docs Co-authored-by: phieri <12006381+phieri@users.noreply.github.com> --- docs/demo.cast | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/demo.cast b/docs/demo.cast index 9d860df..136c182 100644 --- a/docs/demo.cast +++ b/docs/demo.cast @@ -10,7 +10,7 @@ [0.0,"o","--he"] [0.12,"i","lp\r"] [0.0,"o","lp\r\n"] -[0.25,"o","A Bluetooth headset intercom for Linux\r\n\r\nUsage: bt-intercom [OPTIONS] \r\n\r\nCommands:\r\n scan Scan for nearby Bluetooth devices\r\n pair Pair, trust, and connect a headset\r\n remove Remove a headset from the saved intercom network\r\n status Show Bluetooth headset audio status\r\n run Route configured headset microphones to one another\r\n completions Generate shell completion definitions\r\n tui Open the terminal headset and talk-group control panel\r\n help Print this message or the help of the given subcommand(s)\r\n\r\nOptions:\r\n --verbose Enable detailed diagnostics on stderr (unless RUST_LOG is set)\r\n -V, --version \r\n -h, --help Print help\r\n"] +[0.25,"o","A Bluetooth headset intercom for Linux\r\n\r\nUsage: bt-intercom [OPTIONS] \r\n\r\nCommands:\r\n scan Scan for nearby Bluetooth devices\r\n pair Pair, trust, and connect a headset\r\n remove Remove a headset from the saved intercom network\r\n status Show Bluetooth headset audio status\r\n run Route configured headset microphones to one another\r\n completions Generate shell completion definitions\r\n panel Open the interactive terminal control panel\r\n help Print this message or the help of the given subcommand(s)\r\n\r\nOptions:\r\n --verbose Enable detailed diagnostics on stderr (unless RUST_LOG is set)\r\n -V, --version \r\n -h, --help Print help\r\n"] [0.5,"o","$ "] [0.12,"i","bt-i"] [0.0,"o","bt-i"]