Skip to content

feat(bot): route Slack app through Chat SDK - #2738

Merged
RSO merged 5 commits into
mainfrom
RSO/funny-leo
Apr 23, 2026
Merged

RSO merged 5 commits into
mainfrom
RSO/funny-leo

Conversation

@RSO

@RSO RSO commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Routes the existing Slack app webhook and interactivity endpoints through the canonical Chat SDK Slack bot.
  • Removes the obsolete slack-next platform/install flow and makes PLATFORM.SLACK the only Slack integration platform in app code.
  • Uses the Chat SDK Slack adapter's official OAuth callback handler to exchange codes and seed installation state for the existing Slack app.

Verification

  • N/A (manual Slack workspace verification should be completed in staging after deploy).

Visual Changes

N/A

Reviewer Notes

  • No database migration is included because platform_integrations.platform is plain text and slack-next has no active production installs.
  • Slack SDK installation sync/backfill helpers were removed; new installs are seeded by slackAdapter.handleOAuthCallback() in the existing Slack OAuth callback route.
  • SLACK_BOT_NEW_INFRA_PLATFORM_INTEGRATION_IDS and SLACK_NEXT_* deployment env vars are obsolete after this rollout.
  • Automated checks run locally: pnpm test -- apps/web/src/lib/bot/platform-helpers.test.ts, pnpm typecheck, pnpm lint, pnpm format.

Comment thread apps/web/src/app/slack/webhook/route.ts Resolved
@kilo-code-bot

kilo-code-bot Bot commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/app/api/integrations/slack/callback/route.ts 103 Only fresh OAuth installs are now seeded into adapter state, so pre-existing Slack integrations can stop working until they reinstall.
apps/web/src/app/slack/webhook/route.ts 27 External Slack Connect events are still forwarded because the previous cross-workspace guard was removed.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
apps/web/src/lib/integrations/slack-service.ts 163 The scopes regression is fixed, but reinstall/update still drops metadata.incoming_webhook, so sendTestMessage() can lose its webhook-based path after reinstall.
Files Reviewed (1 file)
  • apps/web/src/lib/integrations/slack-service.ts - verified the scopes fix; incoming_webhook regression remains

Reviewed by gpt-5.4-20260305 · 410,292 tokens

*/
export function getPlatformIdentity(thread: Thread, message: Message): PlatformIdentity {
const platform = thread.id.split(':')[0]; // "slack", "discord", "gchat", "teams", …
const platform = thread.id.split(':')[0]; // "slack", "discord", "gchat", "teams", ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@RSO
RSO enabled auto-merge (squash) April 23, 2026 11:54
@RSO
RSO merged commit 8459d68 into main Apr 23, 2026
16 checks passed
@RSO
RSO deleted the RSO/funny-leo branch April 23, 2026 12:00
@markijbema

Copy link
Copy Markdown
Contributor
image

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.

2 participants