Skip to content

fix(slack-search): wait for content before starting replies - #7891

Merged
waleedlatif1 merged 3 commits into
stagingfrom
codex/fix-slack-search-empty-stream
Sep 16, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
codex/fix-slack-search-empty-stream

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Delay Slack Search message creation until the first safe answer text or visible tool-progress update; keep the native processing and Stop controls available while waiting.
  • Preserve whitespace, chunk order, and streaming updates. End empty runs without blank replies and deliver early failures once without replaying ambiguous sends.

Type of Change

  • Bug fix

Testing

  • 383 mocked tests across 30 Slack Search and streaming suites, including 18 new lifecycle regression cases.
  • App type-check, repository lint, full repository audits, block registry, and docs manifest checks passed.

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 16, 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 16, 2026 8:47pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable new issue remains, and the previously reported cleanup problem is resolved.

Summary

This PR delays Slack Search reply creation until safe visible text or tool progress is available while retaining Slack’s native processing state during the wait.

  • Buffers leading whitespace and starts the stream with the first visible chunk.
  • Avoids blank replies for empty runs and safely reports early failures.
  • Adds bounded cleanup after failed notification and status-reset attempts.
  • Expands lifecycle, ordering, authorization, and ambiguous-send regression coverage.
Diagram
sequenceDiagram
  participant Runner as Slack Search runner
  participant Stream as Assistant stream
  participant Slack as Slack API

  Runner->>Stream: start()
  Stream->>Slack: Set session status to processing
  Runner->>Stream: text/tool events
  alt No visible content yet
    Stream->>Stream: Buffer safe text and whitespace
  else First visible text or tool progress
    Stream->>Slack: Start stream with buffered chunks
    Stream->>Slack: Append subsequent chunks
  end
  alt Successful completion
    Stream->>Slack: Stop stream or reset empty session
  else Failure
    Stream->>Slack: Send safe failure when possible
    Stream->>Slack: Stop stream or reset session status
  end
Loading

Reviews (3) · Last reviewed commit: "fix(slack-search): allow one authorized ..."

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/slack-search/assistant-stream.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 16, 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

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@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 16, 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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 42a413b into staging Sep 16, 2026
34 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/fix-slack-search-empty-stream branch September 16, 2026 21:13

This branch was previously deployed

1 inactive deployment
Preview aa4e79d3 Deployed Sep 16, 2026 by vercel[bot]
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