fix(composer): a fully typed user ID + Enter sends as typed
CI / Build & Quality Checks (push) Successful in 1m47s
CI / Docker image build & smoke test (push) Skipped
CI / Secret scan (gitleaks) (push) Successful in 9s
CI / Trigger Desktop Build (push) Successful in 2s
CI / Playwright smoke (e2e) (push) Successful in 8m35s
CI / Build & Quality Checks (push) Successful in 1m47s
CI / Docker image build & smoke test (push) Skipped
CI / Secret scan (gitleaks) (push) Successful in 9s
CI / Trigger Desktop Build (push) Successful in 2s
CI / Playwright smoke (e2e) (push) Successful in 8m35s
d2503332 made Enter pick the mention suggestion, which also caught
"/kick @alice:server" + Enter (the e2e "/kick failure is reported" test):
typing a complete ID opens the mention list too, and Enter picked it instead
of running the command. Enter now picks only while a partial name is being
typed (no ':' in the query); a complete @user:server or #alias:server sends
as typed, like before.
Chromium e2e 19 passed; "@bo" + Enter still picks, ":smi" + Enter still
sends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d250333290
commit
4323babfb9
@@ -140,7 +140,8 @@ export function RoomMentionAutocomplete({
|
||||
};
|
||||
|
||||
useKeyDown(window, (evt: KeyboardEvent) => onTabPress(evt, pickTop));
|
||||
useAutocompleteEnter(true, pickTop);
|
||||
// Same rule as people: a fully typed #alias:server sends as typed.
|
||||
useAutocompleteEnter(!query.text.includes(':'), pickTop);
|
||||
|
||||
return (
|
||||
<AutocompleteMenu headerContent={<Text size="L400">Rooms</Text>} requestClose={requestClose}>
|
||||
|
||||
@@ -140,9 +140,9 @@ export function UserMentionAutocomplete({
|
||||
};
|
||||
|
||||
useKeyDown(window, (evt: KeyboardEvent) => onTabPress(evt, pickTop));
|
||||
// The list always shows a suggestion (a member, or the typed id), so Enter
|
||||
// always picks rather than sending "hey @bo".
|
||||
useAutocompleteEnter(true, pickTop);
|
||||
// Enter picks while a partial name is being typed ("hey @bo"). Once a full
|
||||
// user ID has been typed ("/kick @alice:server"), Enter sends as typed.
|
||||
useAutocompleteEnter(!query.text.includes(':'), pickTop);
|
||||
|
||||
const getName = (member: RoomMember) => getMemberName(room, member.userId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user