Skip to content

feat(backlog): @mentions in task comments - #36

Merged
somaraj merged 1 commit into
developfrom
feature/mentions
Dec 1, 2026
Merged

somaraj merged 1 commit into
developfrom
feature/mentions

Conversation

@somaraj

@somaraj somaraj commented Dec 1, 2026

Copy link
Copy Markdown
Member

What and why

Closes #14.

To pull someone into a task, people copied the link into chat by hand. Now you type @ in the comment box and pick them.

  • Suggestions: people who can see the task (project members with "view others' tasks", or the task's developer/tester), excluding yourself. Arrow keys plus Enter/Tab pick a name; Enter doesn't send while the list is open.
  • Storage: mentions are stored as @[userId] in the plain-text comment and rendered as highlighted names on display, so they follow renames. Names replace tokens wherever comment text leaves the panel: notifications, chat, and comments pushed to GitHub/GitLab issues.
  • Notification: in-app, on by default. A user who is both mentioned and watching gets one notification (the mention), not two. Mentioned users start watching the task when task watchers are on.
  • Optional extras, off until enabled:
    • a new Mention chat event per project channel (not ticked on existing or new channels by default)
    • e-mail through a new Mentioned template, seeded inactive
  • Never reveals a task: mentioning yourself, a non-member, or a member who can't see the task does nothing.

The "who can see this task" query now lives in one ITaskViewerService used by both watchers and mentions.

Upgrade notes

  • No schema change.
  • Re-run sql-scripts/02_defaults.sql (Docker does this) for the inactive Mentioned e-mail template, and 03_locale.sql for 3 new labels.

How it was tested

  • dotnet build src/Taskist.sln and dotnet test src/Taskist.sln pass: 455 tests, 13 new in MentionTextTests.
  • 18 end-to-end checks against the running app on a fresh database:
    • suggestions are limited to people who can see the task and filter by name
    • a non-member gets no suggestions
    • a mentioned watcher gets exactly one notification
    • excerpts show names, not tokens
    • self, non-member and can't-see mentions do nothing
    • comment text stays HTML-encoded with mentions highlighted
    • a mentioned user is auto-watched
    • other watchers still get the normal comment notice
    • mentions work with watchers turned off
    • re-running the seed doesn't duplicate the template
  • Not run end to end: the chat event and the e-mail (they need a real channel or SMTP server).

Checklist

  • dotnet build src/Taskist.sln and dotnet test src/Taskist.sln pass
  • Entity changes come with an EF migration, and the migration is additive (n/a, no schema change)
  • New UI text is added to sql-scripts/03_locale.sql
  • New menu entries or permissions are added to sql-scripts/02_defaults.sql (no menu or permission; the new e-mail template is seeded there)
  • No inline scripts or styles, no CDN links, no ViewBag/ViewData, no comments in .cs files
  • New dependencies are MIT, Apache or BSD licensed (n/a, none added)
  • This touches authentication, authorization, file uploads, outbound HTTP or query building: suggestions and recipients are limited to users who can see the task; MentionCandidates requires the Backlog permission and CanViewTaskAsync

Typing @ in the comment box suggests people who can see the task. Mentions are stored as user ids and shown as highlighted names. The mentioned user gets an in-app notification (one, even if also watching) and starts watching the task when watchers are on. Optional Mention chat event per project channel and an inactive Mentioned e-mail template. Mentioning yourself, a non-member or someone who can't see the task does nothing.

Closes #14
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@somaraj
somaraj merged commit 9c7154c into develop Dec 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@mentions in comments

1 participant