Skip to content

fix(slack): clean up Chat SDK on disconnect#2757

Merged
RSO merged 3 commits intomainfrom
RSO/sable-red
Apr 24, 2026
Merged

fix(slack): clean up Chat SDK on disconnect#2757
RSO merged 3 commits intomainfrom
RSO/sable-red

Conversation

@RSO
Copy link
Copy Markdown
Contributor

@RSO RSO commented Apr 23, 2026

Summary

  • Clean up the Chat SDK Slack workspace installation when a Slack integration is disconnected.
  • Keep the platform integration row if Chat SDK cleanup fails, avoiding mismatched database and SDK state.
  • Add unit coverage for successful cleanup, cleanup failure, and legacy rows without platform_installation_id.

Verification

N/A - no manual verification performed; backend cleanup behavior is covered by automated tests.

Visual Changes

N/A

Reviewer Notes

  • The disconnect path now deletes Chat SDK state before deleting platform_integrations, so transient Redis/state failures leave the integration row available for retry.

Comment thread apps/web/src/lib/integrations/slack-service.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 23, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
apps/web/src/lib/integrations/slack-service.ts 243 Revoking the Slack token before Chat SDK cleanup can still leave an active integration row backed by invalid credentials when cleanup fails.
Other Observations (not in diff)

No additional observations.

Files Reviewed (4 files)
  • apps/web/src/lib/bot-identity.ts - 0 issues
  • apps/web/src/lib/integrations/slack-service.test.ts - 0 issues
  • apps/web/src/lib/integrations/slack-service.ts - 1 issue
  • apps/web/src/routers/slack-router.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.4-20260305 · 351,064 tokens

@RSO RSO enabled auto-merge (squash) April 24, 2026 09:06
@RSO RSO merged commit e83ea86 into main Apr 24, 2026
20 checks passed
@RSO RSO deleted the RSO/sable-red branch April 24, 2026 10:03
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