Repository navigation
[SE-641] Mention users in documents - #25917
Draft
ihordubas99 wants to merge 1 commit into
Draft
ihordubas99 wants to merge 1 commit into
ihordubas99 wants to merge 1 commit into
Conversation
1 of 3 tasks
ihordubas99
force-pushed
the
feature/se-641-mention-users-in-documents
branch
from
October 14, 2026 08:38
fbd0529 to
21880b8
Compare
1 of 3 tasks
ihordubas99
force-pushed
the
feature/se-641-mention-users-in-documents
branch
from
October 16, 2026 09:41
21880b8 to
fc4d33b
Compare
ihordubas99
force-pushed
the
feature/se-641-mention-users-in-documents
branch
from
October 16, 2026 11:01
fc4d33b to
2e77b09
Compare
ihordubas99
changed the base branch from
dev
to
feature/se-641-mention-users-extension
October 16, 2026 11:03
ihordubas99
force-pushed
the
feature/se-641-mention-users-in-documents
branch
from
October 23, 2026 13:32
2e77b09 to
6510f82
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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/notificationswhen 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 theblock_note_editorinput and component into adocument-idattribute, and from there intoinitializeOpBlockNoteExtensions. The editor registersUserMentionNotificationExtension, 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-extensionsthat contains mentions (#26018) and the notification endpoint (#26028). The dependency infrontend/package.jsonandextensions/op-blocknote-hocuspocus/package.jsonwill 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