fix(slack): normalize typed command mentions - #316
Merged
amaudruz merged 1 commit intoAug 29, 2026
Conversation
Pumpurri
requested review from
amaudruz and
christian-mcdermott
as code owners
August 28, 2026 05:25
|
All contributors have signed the CLA. ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
amaudruz
approved these changes
Aug 28, 2026
amaudruz
left a comment
Collaborator
There was a problem hiding this comment.
Nice, thanks for this !
amaudruz
added a commit
that referenced
this pull request
Sep 1, 2026
Two Slack bugfixes: normalize typed command mentions (#316) and resolve agent mentions that crossed a workspace boundary (#327). Bumps core/pyproject.toml and artifacts.yaml (switch-core 0.21.0 -> 0.21.1), regenerates the artifact modules, and cuts the CHANGELOG section. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Context
Fixes #315
Slack encodes an autocomplete-selected mention as
<@U123>, even though it displays the mention as@usernamein the client.The Slack slash-command path normalizes this encoding with
translate_inbound, but the typed!commandpath previously passed its arguments to the command dispatcher unchanged. As a result, commands such as!invite-agentcould silently fail when their target was selected from Slack’s autocomplete popup.Description
Normalize typed Slack
!commandarguments usingtranslate_inboundbefore dispatching them.This converts Slack-encoded mentions such as
<@U123>into the@usernameformat expected by the command dispatcher. The stale slash-command comment was also updated to describe the shared normalization behavior accurately.The related adapters were checked in the same pass:
@username, so no normalization change is required.Steps to review
core/switch_core/bridges/collaboration/slack/adapter.py— confirm typed command arguments pass throughtranslate_inbound.core/tests/switch_core/bridges/collaboration/test_slack_adapter.py— regression test sends!invite-agent <@U999>and verifies the dispatcher receives@worker.Tests:
just check— passedjust typecheck— passedjust test— 2011 passed, 5 deselected!invite-agent @usernamesuccessfully added the corresponding Switch agent