Skip to content

[SE-641] Mention users in documents - #25917

Draft
ihordubas99 wants to merge 1 commit into
feature/se-641-mention-users-extensionfrom
feature/se-641-mention-users-in-documents
Draft

ihordubas99 wants to merge 1 commit into
feature/se-641-mention-users-extensionfrom
feature/se-641-mention-users-in-documents

Conversation

@ihordubas99

@ihordubas99 ihordubas99 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Ticket

https://community.openproject.org/wp/SE-641

What are you trying to accomplish?

Users can mention people in a document. Typing @ in the document editor opens a menu with the members of the document's project who are not locked, and the picked user is inserted as an inline mention with avatar and name. The mentioned user gets notified. The mention is stored in the document description as the same <mention> tag CKEditor writes, so it renders as a user link with a hover card wherever the description is shown.

The editor, the stored format and the notification call live in op-blocknote-extensions (#26018). The notification endpoint comes from #26028. This PR wires them into OpenProject.

Screenshots

image image image

What approach did you choose and why?

Notifications. Hocuspocus saves the changes of everyone editing with the token of the first user who connected, so the save can't tell who added a mention. The editor therefore notifies through POST /api/v3/notifications when a mention is inserted, with the session of the user who inserted it. For that it needs the document, so the document id now goes from the form through the block_note_editor input and component into a document-id attribute, and from there into initializeOpBlockNoteExtensions. The editor registers UserMentionNotificationExtension, which sends the request.

Menus. The document editor now renders the library's <OpenProjectMentionMenu /> and <OpenProjectHashMenu /> instead of wiring suggestion menus by hand. The hand-wired # menu had lost the library's rule that a fifth hash is not a command, and using the components keeps both menus in line with the library.

Stored format. The hocuspocus schema registers the server-side mention spec, so the stored markdown contains the canonical <mention> tag. A test pins the exact tag in the saved description.

This needs a release of @openproject/op-blocknote-extensions that contains mentions (#26018) and the notification endpoint (#26028). The dependency in frontend/package.json and extensions/op-blocknote-hocuspocus/package.json will be bumped before merging, so CI fails until then.

AI involvement

Collaborative – AI generated a substantial part of the code; I reviewed and understand every line.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@ihordubas99 ihordubas99 self-assigned this Oct 9, 2026
@ihordubas99
ihordubas99 requested a review from judithroth October 9, 2026 12:16
@ihordubas99
ihordubas99 force-pushed the feature/se-641-mention-users-in-documents branch from fbd0529 to 21880b8 Compare October 14, 2026 08:38
@ihordubas99
ihordubas99 force-pushed the feature/se-641-mention-users-in-documents branch from 21880b8 to fc4d33b Compare October 16, 2026 09:41
@github-actions github-actions Bot added the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Oct 16, 2026
@ihordubas99
ihordubas99 force-pushed the feature/se-641-mention-users-in-documents branch from fc4d33b to 2e77b09 Compare October 16, 2026 11:01
@ihordubas99
ihordubas99 changed the base branch from dev to feature/se-641-mention-users-extension October 16, 2026 11:03
@ihordubas99
ihordubas99 added this pull request to stack #26090 October 16, 2026 11:03
@ihordubas99
ihordubas99 force-pushed the feature/se-641-mention-users-in-documents branch from 2e77b09 to 6510f82 Compare October 23, 2026 13:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. Passion time

Development

Successfully merging this pull request may close these issues.

1 participant