Repository navigation
feat(slack): pick an org from one dropdown in the shared-channel route prompt - #1142
Merged
Merged
Conversation
…e prompt When several Munin orgs share a workspace, the prompt posted on channel join repeated a row of three buttons per org. It now shows one org picker (with an "All orgs" option) and the buttons once. Routed orgs drop out of the picker and are listed underneath as one compact line each; "Not now" closes the prompt for every org still waiting. "All conversations" is the primary button in both the shared and the single-org prompt. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Resolves the conflicts with #1141 (guard channels several orgs share). The org picker stays, so the shared join prompt names the waiting orgs again. Routing from the picker now goes through the channel-membership check #1141 added, and unexpected routing failures surface as an ephemeral instead of silence. Prompts posted with #1141's unnamed workspace buttons are still handled. Co-Authored-By: Claude Opus 5.5 (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.
What
When several Munin orgs share a Slack workspace and the bot joins a channel, the route prompt repeated Mirror all conversations / Escalation alerts only / Not now once per org. With four orgs that's four identical button rows.
The prompt now has:
static_select) with an All orgs option first, followed by All conversations / Escalations only / Not now onceBehaviour
state.valueson the button'sblock_actionspayload; buttons carryvalue: "shared".The per-org routing (user mapping → owner/admin check →
setRoutingunderbypass_rls) is extracted intorouteOrgso the single and shared paths share it.Block budget: intro + divider + actions + up to 40 done lines ≤ 50 blocks, so
MAX_SHARED_ROUTE_PROMPT_ORGSgoes from 20 to 40. Option labels are cut at Slack's 75-char limit.Relation to #1141
#1141 (merged first) made this prompt name no orgs, so the channel would not learn who else uses the workspace. This PR deliberately brings the names back in the picker. What it keeps from #1141:
verifiedSlackUserId→slack_not_channel_member).workspace:<teamId>) still work through its handler.Compatibility
Shared prompts already posted (per-org buttons whose value is an integration id) take the single-org path: pressing one routes that org and replaces the whole prompt with its confirmation. The remaining orgs can be routed from the dashboard or
slack_set_routing.Testing
slack-projection.test.ts: picker contents, All orgs visibility, option truncation, block/option limits, resolve and dismiss shapes, primary style.slack-interactions.integration.test.ts: routing the picked org, All orgs with a skipped org, no pick, dismiss, unlinked clicker.slack-inbound.integration.test.ts: the join prompt carries a single picker with every unrouted org.slack-interactions.integration.test.tsalso covers a picked org refused withslack_not_channel_member.state.valueson the button click (documented behaviour, mocked in tests).Skill
connect-slack.mdanddocs-fixtures/skills.jsonupdated.🤖 Generated with Claude Code