Support multiword mention autocomplete sessions - #2345
Open
jshph wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The prompt mention trigger scanner treated every whitespace character as the end of an
@query. Thread matching already supported multiword titles, but the editor stopped dispatching the query at the first space, so those matches were unreachable. The menu also treated its initially highlighted row as intentional keyboard selection, which made a longer-lived autocomplete session unsafe for Return/Send behavior.What changed
Mention queries now preserve spaces verbatim while stopping at natural delimiters, with editor-local session state for explicit dismissal and settled no-match suppression. A silent no-match session can reopen after backspacing to a viable query, while an explicitly dismissed occurrence stays closed. Passive Enter no longer applies a suggestion; desktop Tab or intentionally navigated Enter can apply, and coarse-pointer users apply by tapping. Touch layouts get a dedicated 44×44 close target that does not overlap results. Thread suggestions retain fuzzy match and relationship priority, then prefer active and recently attended threads. No wire contracts or protocol versions changed.
How you verified
Added regressions that fail before this change and pass after for multiword/verbatim whitespace queries, punctuation and newline exits, silent no-match reopening, dismissal persistence, passive desktop and coarse-pointer Enter, tap application, touch close sizing, copy/text preservation, and activity/recency ranking.
All checks passed. App lint reported 181 pre-existing warnings and zero errors.
Fixes: N/A (no linked issue).