From 4d1e388a4885b94fad3a6c48e6667d9a647e0521 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 31 Mar 2026 10:18:24 +0000 Subject: [PATCH] storkit: done 447_bug_element_tab_completion_display_name_breaks_bot_command_matching --- ...k_via_chat_when_credentials_are_missing.md | 20 -------------- ...isplay_name_breaks_bot_command_matching.md | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 20 deletions(-) delete mode 100644 .storkit/work/1_backlog/448_story_send_oauth_login_link_via_chat_when_credentials_are_missing.md create mode 100644 .storkit/work/5_done/447_bug_element_tab_completion_display_name_breaks_bot_command_matching.md diff --git a/.storkit/work/1_backlog/448_story_send_oauth_login_link_via_chat_when_credentials_are_missing.md b/.storkit/work/1_backlog/448_story_send_oauth_login_link_via_chat_when_credentials_are_missing.md deleted file mode 100644 index ab47b2fb..00000000 --- a/.storkit/work/1_backlog/448_story_send_oauth_login_link_via_chat_when_credentials_are_missing.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: "Send OAuth login link via chat when credentials are missing" ---- - -# Story 448: Send OAuth login link via chat when credentials are missing - -## User Story - -As a storkit user on Matrix or WhatsApp, I want the bot to send me a clickable OAuth authorize link when credentials are missing or expired, so that I can authenticate without terminal access or manually constructing the URL. - -## Acceptance Criteria - -- [ ] When storkit detects missing or expired credentials during a chat interaction, it sends the user a clickable /oauth/authorize link -- [ ] Works on Matrix and WhatsApp transports -- [ ] After successful OAuth callback, the user can immediately resume chatting without restarting storkit -- [ ] If credentials are already valid, no login link is sent - -## Out of Scope - -- TBD diff --git a/.storkit/work/5_done/447_bug_element_tab_completion_display_name_breaks_bot_command_matching.md b/.storkit/work/5_done/447_bug_element_tab_completion_display_name_breaks_bot_command_matching.md new file mode 100644 index 00000000..d5ebc812 --- /dev/null +++ b/.storkit/work/5_done/447_bug_element_tab_completion_display_name_breaks_bot_command_matching.md @@ -0,0 +1,27 @@ +--- +name: "Element tab-completion display name breaks bot command matching" +--- + +# Bug 447: Element tab-completion display name breaks bot command matching + +## Description + +When a user tab-completes a bot mention in Element, the Matrix client inserts the display name (e.g. `timmy ⚡️`) rather than the user ID (`@timmy`). If the display name contains emoji or special characters, the `strip_bot_mention` function in chat::util may fail to match it against the bot name, causing commands like `ambient on` to not be recognized. + +## How to Reproduce + +1. Set bot display_name to include emoji (e.g. `timmy ⚡️`) in bot.toml\n2. In Element, tab-complete the bot name to get `timmy ⚡️`\n3. Send `timmy ⚡️ ambient on`\n4. The bot does not respond — command not matched + +## Actual Result + +Bot ignores the command. The display name with emoji doesn't match during strip_bot_mention, so the command text is not correctly extracted. + +## Expected Result + +Bot should recognize commands regardless of whether the mention was tab-completed with the display name (including emoji) or typed manually as @localpart. + +## Acceptance Criteria + +- [ ] strip_bot_mention handles display names containing emoji and special characters +- [ ] strip_bot_mention handles Element's tab-completion format (display name followed by colon or comma) +- [ ] Commands work whether the user types @timmy, timmy, or tab-completes timmy ⚡️