Skip to content

fix(slack): resolve outgoing mentions on the native streaming path - #755

Merged
dancer merged 2 commits into
vercel:mainfrom
Mohith26:fix/slack-streaming-mention-resolution
Aug 3, 2026
Merged

fix(slack): resolve outgoing mentions on the native streaming path#755
dancer merged 2 commits into
vercel:mainfrom
Mohith26:fix/slack-streaming-mention-resolution

Conversation

@Mohith26

Copy link
Copy Markdown
Contributor

Fixes #754, reported by @alvarosevilla95.

Slack's native streaming path appended renderer deltas as raw markdown_text, skipping the outgoing @name mention resolution that the post-and-edit fallback gets via postMessage/editMessage, so cached names rendered as plain text in the default mode.

The fix runs committed StreamingMarkdownRenderer text through the existing resolveOutgoingMentions incrementally (line by line, tracking code-fence state) before each streamer.append delta is computed. Chunk safety falls out of the renderer's own semantics: incomplete lines are only committed inside fences (where mentions stay literal, matching the full-text resolver) or at inline-marker cuts, which cannot split a bare @name, so a mention spanning source chunks still reaches the resolver whole. The fallback path is untouched.

Patch changeset included; both commits are DCO signed off. Six regression tests cover unique resolution, chunk-spanning mentions, mid-stream line commits, ambiguity, participant disambiguation, and code-fence literalness; 5 of the 6 fail without the fix (the sixth passes either way by design, since the broken path also leaves ambiguous mentions plain). Package suite: 626 passed (baseline 620, zero new failures); biome and typecheck clean.

@Mohith26
Mohith26 requested a review from a team as a code owner July 29, 2026 20:00
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@Mohith26 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Mohith26 added 2 commits July 31, 2026 18:08
Native streaming appended committed renderer deltas directly as
markdown_text, skipping the outgoing @name mention resolution that
postMessage and editMessage apply on the post-and-edit fallback. A
uniquely cached @name therefore rendered as plain text instead of a
Slack mention whenever nativeStreaming (the default) was in effect.

Resolve the renderer's committed text incrementally before calculating
each delta: line by line, tracking code fence state, so fenced content
stays literal and bare mentions reach the resolver whole even when they
span source chunks. Ambiguity semantics are unchanged - participant
disambiguation still applies and unresolved names stay plain text.

Fixes vercel#754

Signed-off-by: Mohith Gajjela <109003762+Mohith26@users.noreply.github.com>
Covers unique-name resolution, mentions spanning source chunks, lines
committed mid-stream, ambiguous names staying plain, thread-participant
disambiguation, and mentions inside code fences staying literal.

Signed-off-by: Mohith Gajjela <109003762+Mohith26@users.noreply.github.com>
@dancer
dancer force-pushed the fix/slack-streaming-mention-resolution branch from 69eefc6 to becc174 Compare August 3, 2026 13:04
@dancer
dancer merged commit 6f0d2f0 into vercel:main Aug 3, 2026
12 of 14 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.

Slack native streaming bypasses outgoing @name mention resolution

2 participants