feat: @mention autocomplete in comment composer

Typing "@" + 2+ characters now opens a dropdown of matching users
(reusing the existing people-search endpoint), with arrow-key/Enter/
Tab selection and click-to-select. Consolidated the previously
duplicated MENTION_REGEX (client display vs. server extraction) into
a single export from lib/mentions.ts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-13 22:00:10 +02:00
parent 6efabeab8a
commit a144052e46
6 changed files with 143 additions and 13 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const MENTION_REGEX = /@([a-z0-9_-]{3,30})/gi;
export const MENTION_REGEX = /@([a-z0-9_-]{3,30})/gi;
export function extractMentionedUsernames(content: string): string[] {
const matches = content.matchAll(MENTION_REGEX);