Skip to content

fix(slack): keep refused file reads from suggesting a reconnect and find the download URL for trigger files - #10095

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/slack-file-review-followups
Nov 16, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/slack-file-review-followups

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from a final review of the Slack file read/download changes in this release:

  • Live search file read: a 401/403 from Slack's file host used to surface the client's generic "Reconnect your account" text as the read's reason, though files.info had just accepted the same token, so reconnecting changes nothing. Those reads now say Slack did not serve the file's contents and keep the preview. Other provider reasons pass through unchanged, and a reconnect error that is not an HTTP denial keeps its own message
  • Slack trigger: an event file carrying url_private but no url_private_download now gets its download URL from files.info, so a PDF downloads instead of hitting Slack's off-host viewer redirect (which the download refuses). External files skip the lookup entirely
  • isExternalSlackFile is exported from lib/internal/slack/file-download.ts and shared by slackFileDownloadUrl and the trigger
  • Tests: the download tool and trigger external-file fixtures now use a files.slack.com URL, so they prove the external-file check rather than passing on the host check

Type of Change

  • Bug fix

Testing

  • sim-search/live/slack.test.ts: a 403 from the file host yields the file-specific reason and never "Reconnect"; another provider reason passes through; the preview survives both
  • webhooks/providers/slack.test.ts: an event with only url_private resolves and downloads url_private_download; an external file triggers no files.info lookup and no download
  • Each new guard reverted and watched go red
  • lib/internal/slack, lib/webhooks, lib/sim-search/live, lib/knowledge/search suites pass (1,244 tests); biome; egress-boundary, organization-egress, boundaries, comment-hygiene, test-patterns, file-names, utils, explicit-any, import-specifiers, source-conventions audits pass

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • 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 Nov 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 Nov 16, 2026 9:40pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no blocking issues remain.

Summary

This PR improves Slack file downloads and explains refused reads without suggesting an unnecessary reconnect.

  • Slack file refusals no longer suggest reconnecting the account.
  • Slack triggers look up a download URL when an event leaves it out.

Reviews (2) · Last reviewed commit: "fix(slack): keep a throttled file downlo..." · Reviewed by Greptile

Comment thread apps/sim/lib/sim-search/live/slack.ts Resolved

@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 6 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/slack.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 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 6 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit be3741a into staging Nov 16, 2026
147 of 149 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/slack-file-review-followups branch November 16, 2026 22:50

This branch was previously deployed

1 inactive deployment
Preview — 7e426474 Deployed Nov 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.

1 participant