Skip to content

feat: highlight @mentions in dialog comments (#138)#380

Open
akash2017sky wants to merge 4 commits into
mainfrom
feat/138-mentions-in-comments
Open

feat: highlight @mentions in dialog comments (#138)#380
akash2017sky wants to merge 4 commits into
mainfrom
feat/138-mentions-in-comments

Conversation

@akash2017sky
Copy link
Copy Markdown
Collaborator

@akash2017sky akash2017sky commented May 10, 2026

Summary

  • The full ticket page (TicketDetail) already styles @mentions via highlightMentions, but the work-item dialog's CommentSection was rendering comment.content raw — so the same dropdown-inserted mentions stayed plain text in the dialog.
  • Pipe comment.content through highlightMentions in CommentSection so the dialog matches the full page.
  • Tweak the comment placeholder text to advertise the @ trigger, matching the hint already in TicketDetail.

The autocomplete itself (the MentionInput component, /api/devops/users endpoint, debouncing, keyboard nav, plain-text storage) was already in place — this PR closes the visible gap so #138's "highlighted in the comment" behavior is consistent everywhere comments render.

Fixes #138.

Test plan

  • Open a ticket via the Kanban / Tickets list dialog (work-item dialog), type @, pick a user from the dropdown, submit. Verify the rendered comment shows the mention highlighted in green.
  • Open the same ticket on the full /tickets/[id] page — confirm highlighting still works there (no regression).
  • Reload the dialog and verify previously-stored mention comments are highlighted on initial render.
  • Confirm the placeholder text reads "Use @ to mention" in both compact and full reply boxes.

🤖 Generated with Claude Code

Ayush and others added 2 commits May 10, 2026 16:13
The full ticket page already styles @mentions, but the work item dialog's
CommentSection was rendering comment content without running it through
highlightMentions, so the dropdown-inserted mentions stayed plain text.
Wire up the same helper here, and update the placeholder so the @ trigger
is discoverable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR brings dialog comment rendering in line with the full ticket page by applying mention highlighting to comments shown through CommentSection, and updates reply placeholders to advertise the @ mention trigger.

Changes:

  • Imports and applies highlightMentions when rendering dialog/work-item comments.
  • Updates compact and full CommentSection placeholders to mention the @ trigger.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

className={`user-content ${compact ? 'prose prose-sm prose-invert max-w-none text-sm' : 'text-sm'}`}
style={{ color: 'var(--text-secondary)' }}
dangerouslySetInnerHTML={{ __html: comment.content }}
dangerouslySetInnerHTML={{ __html: highlightMentions(comment.content) }}
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.

[ENHANCEMENT] Add @mention tagging in ticket comments

3 participants