Skip to content

fix(slack): render <@user>, <@subteam^group> and <#channel> mentions as rich-text elements - #1763

Merged
Aaronontheweb merged 3 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/slack-mention-rendering
Aug 5, 2026
Merged

Aaronontheweb merged 3 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/slack-mention-rendering

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Supersedes #1759 by @CumpsD — this branch contains the author's original commit (b5fe6276) unchanged, plus follow-up fixes on top. All credit for the feature goes to @CumpsD.

Original feature (by @CumpsD): renders Slack user, user-group, and channel mentions as Block Kit rich-text elements instead of literal text.

Follow-up fixes (from review of #1759):

  • usergroup_id now carries the bare group ID (S0123ABC) — the subteam^ prefix was being baked into the field, which Slack won't resolve (usergroup element docs)
  • User-group regex now also matches the labeled form (<@subteam^S123|@eng-team>) and the documented bang form <!subteam^S123> (formatting docs)
  • Channel regex now covers G/D-prefixed conversation IDs (private channels, group DMs), not just C

Tests: 5 new tests in SlackBlockConverterTests (user, labeled user, user-group, labeled user-group, bang-form user-group, channel, private channel, in-list-item). All 33 SlackBlockConverter tests pass locally.

Nixie and others added 2 commits August 5, 2026 11:06
…as rich-text elements

The Block Kit converter parsed bold/italic/code/links but passed
Slack-native mention syntax (<@U...>, <@SubTeam^S...>, <#C...>) through
as literal text, because rich_text blocks render their own elements and
ignore the mrkdwn Text fallback on modern clients. Agents therefore had
no way to mention users in outbound Slack messages.

Add mention patterns to the inline parser emitting RichTextUser,
RichTextUserGroup and RichTextChannel (all present in SlackNet 0.17.x),
including the labeled forms (<@u123|name>, <#C123|general>). Covers
paragraphs, list items and quotes via the shared ParseInlineElements.

Adds 5 converter tests: user, labeled user, user group, channel, and
user mention inside a bullet list item.
…and bang-form usergroup mentions, private channels
@Aaronontheweb Aaronontheweb added bug Something isn't working channels Discord, Slack, and other channels. labels Aug 5, 2026
@Aaronontheweb
Aaronontheweb merged commit 0c69316 into netclaw-dev:dev Aug 5, 2026
15 checks passed
@Aaronontheweb Aaronontheweb mentioned this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working channels Discord, Slack, and other channels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant