Skip to content

feat(slack-search): stream enterprise answers through one Slack app - #7644

Merged
TheodoreSpeaks merged 8 commits into
stagingfrom
feat/slack-search
Sep 9, 2026
Merged

feat(slack-search): stream enterprise answers through one Slack app#7644
TheodoreSpeaks merged 8 commits into
stagingfrom
feat/slack-search

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Answer Slack DMs with the existing Enterprise Search Assistant, native streaming, verified sources, and private Sim chat history. Route channel mentions into private DM threads.
  • Use one organization Slack app and shared setup wizard for Search and member-authorized channel/DM indexing. Add OAuth installation, unified signed ingress, account onboarding, and the existing source connection flow.
  • Match the existing settings UI, show actionable setup errors, and send admins to finish indexing setup when needed. Use the shared app's validated configuration to determine source readiness.
  • Persist deduplicated FIFO turns with bounded concurrency, cancellation, and current member/installation checks. Close failed streams with bounded, authorized cleanup and explain oversized questions in private threads. Preserve existing workflow and custom-webhook dispatch.
  • Add migration 0332_slack_search. Before enabling unified ingress, apply the migration and register the existing platform Slack app using the documented setup script.

Type of Change

  • New feature

Testing

  • Focused Slack, connector, credential, authorization, and compatibility suites passed, including regression coverage for setup errors, source readiness, stream cleanup, query limits, and history persistence failures. The latest Slack run passed 162 tests across 18 suites.
  • 21 PostgreSQL integration tests passed for queue ordering, claims, deduplication, limits, and private history.
  • App/auth/db/testing typechecks, Biome, all 46 repository audits, block registry, generated artifacts, and migration safety checks passed. Drizzle reports no schema drift.
  • Live validation of expanded member OAuth, mentions, DM indexing, and the native Stop UI remains pending; the README includes the walkthrough.

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 9, 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 9, 2026 6:23am UTC

Request Review

@gitguardian

gitguardian Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
37110256 Triggered Generic High Entropy Secret 4c916e3 apps/sim/app/slack-search/connect/[token]/page.test.tsx View secret
37110256 Triggered Generic High Entropy Secret 4c916e3 apps/sim/app/o/[organizationId]/integrations/page.test.tsx View secret
37110256 Triggered Generic High Entropy Secret 4c916e3 apps/sim/app/api/knowledge/slack/onboarding/route.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

# Conflicts:
#	apps/sim/app/o/[organizationId]/integrations/integrations.tsx
#	apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review this PR. Please bypass the file-count limit for this review.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 9, 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-apps please review the latest revision, including the page-gate regression fix.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The latest revision appears safe to merge, with no outstanding correctness, security, or repository-rule failures.

Summary

  • Routes verified Slack events to Search, native-stop handling, and existing workflow/custom-bot dispatch as appropriate.
  • Adds organization setup, source-readiness, onboarding, and account-connection interfaces.
  • Adds persistent installation, queue, turn, stream, and history support through migration 0332_slack_search.
  • Makes the knowledge utility tests independent of provider credentials loaded from local or CI environment files.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Slack[Slack event] --> Ingress[Unified signed Slack ingress]
    Ingress --> Verify[Resolve registered app and verify signature]
    Verify --> Install[Resolve workspace installation]
    Install --> Search[Enterprise Search dispatcher]
    Verify --> Existing{App kind}
    Existing -->|Platform| Workflows[Existing workflow webhooks]
    Existing -->|Custom| Custom[Custom bot dispatch]
    Search --> Queue[Durable deduplicated FIFO turns]
    Queue --> Assistant[Authorized Search Assistant]
    Assistant --> Stream[Native Slack answer stream]
    Assistant --> History[Private Sim chat history]
    Assistant --> Sources[Verified source citations]
    Stream --> Cleanup[Bounded stop and failure cleanup]
Loading

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 9, 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/slack-search/assistant-stream.ts
Comment thread apps/sim/lib/knowledge/application/slack-search/process-message.ts Outdated
Comment thread apps/sim/lib/knowledge/application/slack-search/assistant.ts
Comment thread packages/db/migrations/0332_slack_search.sql
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please review the latest revision. The stream cleanup and query-limit findings are fixed; each thread has a detailed reply, including the documented native Stop behavior and deferred FK validation.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 9, 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-apps please review the latest revision, including the CI test environment fix.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 9, 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 0bba808 into staging Sep 9, 2026
32 of 33 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/slack-search branch September 9, 2026 06:44
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