fix(slack): render <@user>, <@subteam^group> and <#channel> mentions as rich-text elements - #1763
Merged
Aaronontheweb merged 3 commits intoAug 5, 2026
Conversation
…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
enabled auto-merge
August 5, 2026 16:19
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_idnow carries the bare group ID (S0123ABC) — thesubteam^prefix was being baked into the field, which Slack won't resolve (usergroup element docs)<@subteam^S123|@eng-team>) and the documented bang form<!subteam^S123>(formatting docs)G/D-prefixed conversation IDs (private channels, group DMs), not justCTests: 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.