Skip to content

feat: add @mention parsing, chip rendering, and notification integration#355

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
Keengfk:feat/mention-notifications
Jun 28, 2026
Merged

feat: add @mention parsing, chip rendering, and notification integration#355
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
Keengfk:feat/mention-notifications

Conversation

@Keengfk

@Keengfk Keengfk commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Add @mention parsing, chip rendering & notification integration to
CommentSection

Closes #

What changed

  • notifications.ts — added parseMentions(text) (extracts unique valid Stellar
    addresses via /\bG[A-Z0-9]{55}\b/g) and notifyMention(mentionedAddress,
    commenterAddress, invoiceId) (fires a browser notification, skips
    self-mentions)
  • CommentSection.tsx — renderCommentText() splits comment text on the mention
    pattern and renders valid @g... addresses as truncated indigo chips with
    full-address aria-label; handleSubmit calls parseMentions + notifyMention for
    each mentioned address on submit
  • CommentSection.test.tsx — 13 unit tests covering mention parsing (no match,
    single, multi, dedup, malformed short/long/lowercase), chip rendering (plain
    text passthrough, single chip, multi chip, malformed stays plain), and
    notification dispatch (self-suppression, fires for others)

Acceptance criteria met

  • @g... patterns render as distinct styled inline chips
  • ✅ Submitting triggers a notification per mentioned address via existing
    notification plumbing
  • ✅ Self-mentions do not trigger a notification
  • ✅ Malformed @ patterns render as plain text
  • ✅ Unit tests pass (13/13)
    closes Build comment thread notifications with @mentions #256

- parseMentions() extracts valid Stellar addresses from comment text
- notifyMention() fires browser notification, skips self-mentions
- renderCommentText() renders @g... chips with truncated display
- Unit tests: parsing, chip rendering, self-mention suppression, malformed patterns
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Keengfk is attempting to deploy a commit to the kingsman-99's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Keengfk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99 Kingsman-99 merged commit 03c0576 into Stellar-split:main Jun 28, 2026
1 of 3 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.

Build comment thread notifications with @mentions

2 participants