Skip to content

Render links reliably in Slack messages - #158

Closed
dwaxe wants to merge 6 commits into
stablyai:mainfrom
dwaxe:dwaxe/convert-commonmark-links-upstream
Closed

dwaxe wants to merge 6 commits into
stablyai:mainfrom
dwaxe:dwaxe/convert-commonmark-links-upstream

Conversation

@dwaxe

@dwaxe dwaxe commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Slack does not render [label](URL) input as a labeled link, so agents can post the literal syntax even though message send handles other Markdown-like formatting. Lists also force native rich_text, where bare URLs must be explicit link elements to remain clickable.

This normalizes HTTP(S) and mailto links for send/edit text, emits Markdown and bare HTTP(S) URLs as native links in converted rich text, preserves code, images, malformed input, and escaped links, and avoids swallowing sentence punctuation. The README and agent skill document the supported formats.

Validation

  • bun test (432 tests)
  • tsc --noEmit
  • oxlint (0 errors)
  • oxfmt --check on changed files

@maelvls

maelvls commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

fwiw, Slack renders <url|label>

@dwaxe dwaxe changed the title Render Markdown links in Slack messages Render links reliably in Slack messages Sep 21, 2026
@dwaxe

dwaxe commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @maelvls! Yep—that’s what this PR emits for ordinary message text. The additional path handles messages converted to rich_text blocks, such as lists and drafts, where links need native link elements. The latest commit covers bare HTTP(S) URLs in that path too.

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.

2 participants