[OPE-198] docs(slack): correct setup to HTTP Events API (drop dead Socket Mode)#131
Merged
Conversation
The Slack setup docs and the in-app wizard described Socket Mode, but the
code uses the HTTP Events API (signed POST to /api/v1/slack/{events,
interactions,commands}). socketmode is not imported and SLACK_APP_TOKEN
is never read. This mismatch made Slack sync silently fail to debug.
- Rewrite docs/getting-started/connecting-slack.md: the three Request
URLs, a Local development (ngrok) section, the signing-secret-must-match
403 note, the "tunnel URL changes on restart" gotcha, troubleshooting
- SlackSetupModal: replace the isLocal "Socket Mode (no public URLs)" text
and dead xapp-token step with tunnel guidance (manifest already uses
socket_mode_enabled: false)
- Remove dead SLACK_APP_TOKEN from .env.example, environment-variables.md,
kubernetes.md, docker-compose{,.dev,.ha}.yml, helm secret/values
- Fix stale "Slack Socket Mode" comment in teams_event_handler.go
- README: pointer to the corrected guide
Verified: npm run build green; every step cross-checked against the
manifest/scopes/events/endpoints in code, not the old doc.
7b0b094 to
fdd2e9a
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.
Problem
The Slack setup docs and the in-app setup wizard describe Socket Mode, but the code uses the HTTP Events API — signed
POSTto/api/v1/slack/{events,interactions,commands}.slack-go/slack/socketmodeis never imported andSLACK_APP_TOKEN(xapp-…) is never read. This mismatch is what made a real Slack-sync issue so hard to debug: nobody knew you need a public tunnel (Slack can't reach localhost), the Interactivity Request URL set (buttons), and the signing secret to match (403).Changes
docs/getting-started/connecting-slack.md— rewritten to the real flow: the three Request URLs (Events / Interactivity / Slash Commands), a Local development (ngrok) section, the signing-secret-must-match → 403 note, the "tunnel URL changes on every ngrok restart, update all three" gotcha, and a troubleshooting table.SlackSetupModal.tsx— theisLocaltext claimed "Socket Mode (no public URLs needed)" and had a deadxappApp-Level Token step. Replaced with tunnel guidance. (The generated manifest was already correct:socket_mode_enabled: false.)SLACK_APP_TOKENfrom.env.example,environment-variables.md,kubernetes.md,docker-compose{,.dev,.ha}.yml, and the Helm secret/values.teams_event_handler.go.Verification
npm run build(modal change) — green.slack http event handler initializedstartup log), not the old doc.Follow-up (separate)
Wizard local-dev UX: let the user enter their tunnel URL so the generated manifest's URLs aren't
localhost(today it useswindow.location.origin). Worth filing.Closes OPE-198