The best way to control Claude Code, Codex and more from any computer or phone
fix(shared): @ mentions complete display names in any script (#36504)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
JS-coder-K committed
Nov 14, 2026 at 15:23 UTC
2dd6cddbc3fc20a4c8a330dc7361750cccfe35e3
2 files changed
+6
-2
packages/shared/src/pullRequestComposerTrigger.test.ts
+3
@@ -16,6 +16,9 @@ describe("detectPullRequestComposerTrigger", () => {
16
["cc @ju", 3, "@", "ju"],
17
["line one\n@first.last", 9, "@", "first.last"],
18
["@jane-doe more", 0, "@", "jane-doe"],
19
+ ["cc @김철", 3, "@", "김철"],
20
+ ["@ㄱ", 0, "@", "ㄱ"],
21
+ ["@प्रिया", 0, "@", "प्रिया"],
22
["fixes #", 6, "#", ""],
23
["see #12", 4, "#", "12"],
24
["after !5", 6, "!", "5"],
packages/shared/src/pullRequestComposerTrigger.ts
+3
-2
@@ -17,8 +17,9 @@ export type PullRequestComposerTrigger = {
17
| { readonly kind: "reference"; readonly sigil: PullRequestReferenceSigil }
18
);
19
20
-// Mentions cover GitHub logins (letters, digits, hyphens) and GitLab usernames (also `_` and `.`).
21
-const TOKEN = /^(?:@([A-Za-z0-9_][A-Za-z0-9_.-]*)?|([#!])([\p{L}\p{N}_-]*))$/u;
20
+// Logins are ASCII, but the query also matches display names, which can be in any script.
21
+// Combining marks (\p{M}) attach to the letter before them, so they cannot start a name.
22
+const TOKEN = /^(?:@([\p{L}\p{N}_][\p{L}\p{M}\p{N}_.-]*)?|([#!])([\p{L}\p{N}_-]*))$/u;
23
24
/** What a pull request's host can complete; absent fields complete nothing. */
25
export type PullRequestCompletionSupport = Pick<