Skip to content

feat(search): add shared Slack app installation and commands - #7743

Merged
TheodoreSpeaks merged 6 commits into
stagingfrom
codex/shared-slack-search
Sep 11, 2026
Merged

TheodoreSpeaks merged 6 commits into
stagingfrom
codex/shared-slack-search

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add the official Slack app installation behind a global flag for existing Search customers, with separate organization bot and personal account authorization.
  • Reuse the existing Slack indexing pipeline and KB search for both the web Assistant and Slack bot. Add private /query, /connect, and uninstall/token-revocation handling.
  • Preserve custom apps and workflows, require explicit app replacement, and update setup documentation. No database migration or Mothership changes.

Type of Change

  • New feature

Testing

  • Focused suites passed locally: 52 OAuth/configuration tests, 13 command/manifest/DM-routing tests, and 22 revocation/Stop tests.
  • Biome, all 46 repository audits, block-registry validation, and docs-manifest checks passed.
  • Validated shared-app OAuth installation, a bot DM, and private command responses locally.
  • Previous revision passed all CI, including typechecks, test shards, build, and PostgreSQL integration jobs. CI is running again for the mixed-revocation fix; full rollout validation remains required before enabling the flag.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 11, 2026 12:25am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the latest revision resolves mixed revocation handling without leaving any outstanding reviewed defect.

Summary

  • Adds organization installation and personal-account authorization flows with explicit replacement safeguards.
  • Adds private /query and /connect commands, DM-thread routing, and shared knowledge-base search behavior.
  • Adds uninstall and token-revocation handling, including member-scoped cancellation and stale-event protection.
  • Extends configuration, manifests, contracts, setup UI, documentation, and focused test coverage.
  • The latest revision fixes mixed bot/member revocation events so stale bot revocations do not suppress valid member cleanup.

Diagram

sequenceDiagram
    participant Admin
    participant Sim
    participant Slack
    participant Member
    participant Search

    Admin->>Sim: Install shared Slack app
    Sim->>Slack: Bot OAuth authorization
    Slack-->>Sim: Workspace bot grant
    Sim->>Sim: Validate and persist installation
    Member->>Sim: Authorize personal Slack account
    Sim->>Slack: Member OAuth authorization
    Slack-->>Sim: Personal indexing grant
    Member->>Slack: /query question
    Slack->>Sim: Signed command
    Sim->>Sim: Authorize installation and persist turn
    Sim-->>Slack: Ephemeral acknowledgement
    Sim->>Search: Run permission-aware KB search
    Search-->>Slack: Answer in private DM thread
    Slack->>Sim: tokens_revoked
    Sim->>Sim: Invalidate matching grant and cancel affected turns
Loading

Reviews (6) · Last reviewed commit: "fix(slack): process member revocations i..."

Comment thread apps/sim/.env.example Outdated
Comment thread apps/sim/lib/knowledge/application/slack-search/setup.ts
Comment thread apps/sim/lib/knowledge/application/slack-search/setup.test.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/lib/knowledge/application/slack-search/lifecycle.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/lib/knowledge/application/slack-search/lifecycle.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/lib/knowledge/application/slack-search/lifecycle.ts Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

@TheodoreSpeaks
TheodoreSpeaks merged commit 5e39483 into staging Sep 11, 2026
34 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/shared-slack-search branch September 11, 2026 01:21
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.

1 participant