directory: member resolve matches id prefixes after label tiers; member search skips IME composition - #853
Open
irisfeng wants to merge 1 commit into
Open
Conversation
…er search skips IME composition Member resolution only ever tried label matches: an id like carol@acme.com could not be resolved by typing carol@acm — the prefix form agents and web pickers naturally produce. Exact-id and label-exact matching stay first; the fuzzy tiers become label-prefix, label-contains, id-prefix, id-contains, so the id tiers only widen resolution for queries no label matches (a surname that label-contains several people stays ambiguous instead of collapsing onto a lone id-prefix hit). Channel resolution keeps label-only matching — channel-id prefixes are noise. The web member-picker input skips IME composition events and searches on compositionend, so CJK input methods fire one search per committed candidate instead of one per pinyin keystroke. Chrome dispatches the committing input with isComposing true and no trailing non-composing input, so the compositionend handler is load-bearing, not redundant.
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.
Problem
Member resolution (
GET /v1/directory/resolve, used by agents for mention ids and by the web member picker) only ever tried label (display-name) matching. An id likecarol@acme.comcould not be resolved by typingcarol@acm— the natural prefix form — because ids were only reachable via a full exact match.Fix
Exact-id and label-exact matching stay first; the fuzzy tiers become, in order: label-prefix → label-contains → id-prefix → id-contains. The id tiers only widen resolution for queries where no label matches at all, so:
ambiguous(the disambiguation safety net consumers rely on) instead of collapsing onto one id-prefix hit,The web member-picker input skips IME composition events and searches on
compositionend, so CJK input methods fire one search per committed candidate instead of one per pinyin keystroke. Chrome dispatches the committinginputwithisComposing: trueand no trailing non-composing input, so thecompositionendhandler is load-bearing, not redundant.Tests
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.