From 209e01bc0687fc6124056c10678b7906283d63be Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 16:24:44 +0000 Subject: [PATCH] storkit: create 438_story_slash_command_autocomplete_in_web_ui_text_input --- ...fix_ci_panics_on_multi_byte_utf_8_input.md | 26 ------------------- ...mmand_autocomplete_in_web_ui_text_input.md | 23 ++++++++++++++++ 2 files changed, 23 insertions(+), 26 deletions(-) delete mode 100644 .storkit/work/1_backlog/437_bug_strip_prefix_ci_panics_on_multi_byte_utf_8_input.md create mode 100644 .storkit/work/1_backlog/438_story_slash_command_autocomplete_in_web_ui_text_input.md diff --git a/.storkit/work/1_backlog/437_bug_strip_prefix_ci_panics_on_multi_byte_utf_8_input.md b/.storkit/work/1_backlog/437_bug_strip_prefix_ci_panics_on_multi_byte_utf_8_input.md deleted file mode 100644 index 4a8e51ef..00000000 --- a/.storkit/work/1_backlog/437_bug_strip_prefix_ci_panics_on_multi_byte_utf_8_input.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: "strip_prefix_ci panics on multi-byte UTF-8 input" ---- - -# Bug 437: strip_prefix_ci panics on multi-byte UTF-8 input - -## Description - -The `strip_prefix_ci` function in `server/src/chat/transport/matrix/assign.rs` slices the input string at `prefix.len()` bytes without checking that the offset is a valid UTF-8 char boundary. When the input message starts with multi-byte characters (e.g. `⏺` which is 3 bytes), the slice can land mid-character, causing a panic. - -## How to Reproduce - -Send a Matrix message to the bot that starts with a multi-byte UTF-8 character (e.g. `⏺ storkit - wizard_confirm`) where the bot name byte length falls inside a multi-byte character. - -## Actual Result - -Thread panics: `byte index 6 is not a char boundary; it is inside '⏺' (bytes 4..7)` - -## Expected Result - -The function should return `None` (no match) without panicking, since an ASCII bot name cannot match a slice containing multi-byte characters. - -## Acceptance Criteria - -- [ ] strip_prefix_ci checks is_char_boundary before slicing -- [ ] No panic when input contains multi-byte UTF-8 characters at the prefix boundary diff --git a/.storkit/work/1_backlog/438_story_slash_command_autocomplete_in_web_ui_text_input.md b/.storkit/work/1_backlog/438_story_slash_command_autocomplete_in_web_ui_text_input.md new file mode 100644 index 00000000..4c0129a2 --- /dev/null +++ b/.storkit/work/1_backlog/438_story_slash_command_autocomplete_in_web_ui_text_input.md @@ -0,0 +1,23 @@ +--- +name: "Slash command autocomplete in web UI text input" +--- + +# Story 438: Slash command autocomplete in web UI text input + +## User Story + +As a user, I want to type `/` at the start of the text box and see a filtered list of available slash commands, so that I can discover and quickly invoke commands without memorizing them. + +## Acceptance Criteria + +- [ ] Typing `/` at position 0 in the ChatInput textarea shows a command picker overlay above the input +- [ ] The overlay lists all slash commands with name and description +- [ ] Typing further characters after `/` fuzzy-filters the list +- [ ] Arrow keys navigate the list, Tab/Enter selects, Escape dismisses +- [ ] Selecting a command inserts `/ ` into the input (with trailing space) +- [ ] Command list is a single shared source of truth used by both the picker and HelpOverlay +- [ ] The overlay follows the same visual style as the existing file picker (@-mention overlay) + +## Out of Scope + +- TBD