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 @@
A small terminal, a clear picture
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