From 8f8641d9fb7ed038a235cab40f29155455617afc Mon Sep 17 00:00:00 2001 From: Alex Gorevski Date: Thu, 19 Feb 2026 07:19:20 -0800 Subject: [PATCH] fix(onboard): correct channel selector default to 'Done' item MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hardcoded .default(11) became stale when Lark/Feishu was added at index 11, shifting 'Done — finish setup' to index 12. The wizard now pre-selects the wrong channel instead of 'Done'. Use options.len() - 1 so the default always tracks the last item regardless of how many channels exist. Fixes #913 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/onboard/wizard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onboard/wizard.rs b/src/onboard/wizard.rs index aa3bcd7..f52a416 100644 --- a/src/onboard/wizard.rs +++ b/src/onboard/wizard.rs @@ -2695,7 +2695,7 @@ fn setup_channels() -> Result { let choice = Select::new() .with_prompt(" Connect a channel (or Done to continue)") .items(&options) - .default(11) + .default(options.len() - 1) .interact()?; match choice {