Skip to content

fix(notifications): dismiss comment mention notifications when viewed…#59811

Open
miaulalala wants to merge 3 commits into
masterfrom
fix/2531/comments-not-marked-read
Open

fix(notifications): dismiss comment mention notifications when viewed…#59811
miaulalala wants to merge 3 commits into
masterfrom
fix/2531/comments-not-marked-read

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

… in activity sidebar

Summary

Add a DELETE /notifications/dismiss/{id} endpoint to the comments NotificationsController that marks the comments/comment/mention notification as processed without redirecting.

When comments are loaded in the activity sidebar, the frontend calls this endpoint for any comment that mentions the current user, so the notification is cleared from the bell without requiring the user to navigate via the notification link.

Fixes: nextcloud/activity#2531

AI-Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@miaulalala
Copy link
Copy Markdown
Contributor Author

/compile amend

@miaulalala
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in commit 169be0b. The branch now has a merge commit bringing it up to date with current master. The only conflicting file was the binary dist/comments-comments-tab.mjs (kept our version with the dismiss feature compiled in). The TypeScript source was automatically merged correctly. The PR now shows 6 changed files (just the actual feature changes).

@miaulalala
Copy link
Copy Markdown
Contributor Author

/compile amend

@nextcloud-command nextcloud-command force-pushed the fix/2531/comments-not-marked-read branch from 169be0b to 1cea17e Compare May 5, 2026 09:20
… in activity sidebar

Add a `DELETE /notifications/dismiss/{id}` endpoint to the comments
NotificationsController that marks the `comments/comment/mention`
notification as processed without redirecting.

When comments are loaded in the activity sidebar, the frontend calls
this endpoint for any comment that mentions the current user, so the
notification is cleared from the bell without requiring the user to
navigate via the notification link.

Fixes: nextcloud/activity#2531

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
… is opened

When comments are loaded via the activity sidebar integration, call
markCommentsAsRead() (PROPPATCH readMarker) so the server-side unread
count is reset, and immediately update the node attribute to zero so
the badge disappears from the files list without requiring a page reload.

The regular comments tab (CommentsApp.vue) already called
markCommentsAsRead on visibility; this brings the activity integration
path to parity.

Fixes: nextcloud/activity#2531

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Verify that:
- the unread badge appears in the files list when another user has left
  a comment on a file
- the badge is removed immediately (no page reload) after opening the
  sidebar, and that the readMarker PROPPATCH is sent to the server
- the badge stays absent after the sidebar is closed again

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@miaulalala miaulalala force-pushed the fix/2531/comments-not-marked-read branch from 1cea17e to a0dd846 Compare May 12, 2026 16:21
Copy link
Copy Markdown
Member

@janepie janepie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments don't get marked as read

3 participants