Loading
Suggest mentioned users in quick actions
What does this MR do and why?
When one or more users are mentioned in a rich text editor or markdown description or comment, then suggest those mentioned users for any slash commands (quick actions) that take user mentions as arguments.
Screenshots or screen recordings
| Before | After | |
|---|---|---|
| Rich text editor | ![]() |
![]() |
| Markdown | ![]() |
![]() |
How to set up and validate locally
- In your GDK, open a Merge Request or Issue that has at least 3 project members, and note 2-3 usernames (pick ones that do NOT sort first alphabetically so reordering is obvious).
- In the comment box, confirm the Markdown (Source) editing mode is active.
- Validate the basic case in the Markdown editor:
- Open a fresh comment, type
/request_review @, and note the order of the suggestion list before mentioning anyone. - In a new comment, type
@<userB> can you take a look?, then start a new line. - On the new line type
/request_review @(type the@, no letters yet). - Confirm
@<userB>appears at the TOP of the suggestion list before you type anything, AND that the remaining users keep the same relative order they had in step 3.1 (only@<userB>should have moved). - Repeat with
/assign @,/cc @, and/assign_reviewer @, confirming the mentioned user floats to the top each time.
- Open a fresh comment, type
- Validate ordering by appearance:
- Write
@<userA> please review, cc @<userB> @<userC>, then start a new line and type/request_review @. - Confirm the mentioned users appear at the top in mention order (userA, then userB, then userC), not alphabetically or in backend order, and the non-mentioned users below them keep their normal order.
- Write
- Validate the trailing-punctuation regression:
- Write
Thanks @<userB>.(ending with a period). - On a new line type
/request_review @and confirm@<userB>is still floated to the top.
- Write
- Validate code exclusion:
- Write a comment with
@<userB>inside inline code (wrap it in single backticks), then on a new line type/request_review @, and confirm@<userB>is NOT floated to the top. - Repeat with
@<userB>inside a fenced code block (three backticks, newline, the mention, newline, three backticks) and confirm it is also NOT floated.
- Write a comment with
- Validate filtering of invalid choices:
- Assign
@<userB>to the issuable via the sidebar. - In a comment, mention
@<userC>(a non-assignee), then on a new line type/unassign @, and confirm@<userC>does NOT appear (only current assignees show). - Type
/assign @and confirm an already-assigned mentioned user is excluded, while a mentioned non-assignee floats to the top.
- Assign
- Repeat steps 3, 4, and 6 in the rich text editor (toggle the comment box mode) and confirm identical behavior, paying particular attention in step 3.4 that only the mentioned user moves and the rest of the list keeps its original (alphabetical) order.
- Validate the no-op cases:
- After mentioning someone earlier in the comment, type a plain
@(not preceded by a quick action) and confirm the list is NOT reordered. - In a fresh comment with no prior mentions, type
/request_review @and confirm the list looks normal with no errors.
- After mentioning someone earlier in the comment, type a plain
- For the same comment content, confirm the Markdown and rich text editors produce the same top-of-list ordering.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.



