fix(slack): resolve outgoing mentions on the native streaming path - #755
Merged
dancer merged 2 commits intoAug 3, 2026
Merged
Conversation
Contributor
|
@Mohith26 is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
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
approved these changes
Aug 3, 2026
dancer
force-pushed
the
fix/slack-streaming-mention-resolution
branch
from
August 3, 2026 13:04
69eefc6 to
becc174
Compare
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.
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
StreamingMarkdownRenderertext through the existingresolveOutgoingMentionsincrementally (line by line, tracking code-fence state) before eachstreamer.appenddelta 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.