Skip to content

fix(slack): paginate v2 conversation listing - #7396

Open
TheodoreSpeaks wants to merge 4 commits into
stagingfrom
fix/slack-v2-pagination
Open

fix(slack): paginate v2 conversation listing#7396
TheodoreSpeaks wants to merge 4 commits into
stagingfrom
fix/slack-v2-pagination

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • follow Slack conversation cursors across a bounded number of provider pages, including filtered short pages
  • expose page caps, continuation state, and fail-fast pagination validation in the Slack v2 block
  • move conversation listing behind the registered internal tool operation boundary

Type of Change

  • Bug fix

Testing

  • bun run lint
  • bun run check:audits

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added or updated
  • 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 2, 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 2, 2026 8:28am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR moves Slack conversation listing behind the registered internal-operation boundary and adds bounded cursor pagination.

  • Fetches up to ten Slack pages while continuing through filtered short pages.
  • Returns continuation metadata through hasMore, nextCursor, and pages.
  • Validates pagination inputs and treats unresolved optional values as defaults.
  • Aligns the Slack v2 block, tool metadata, generated outputs, documentation, and tests.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported optional-pagination issue is fixed for both block-mapped and direct internal-operation inputs.

Important Files Changed

Filename Overview
apps/sim/lib/internal/slack/operations/list-conversations.ts Implements bounded multi-page Slack conversation retrieval, strict response validation, cursor-loop detection, and correct optional-value defaults.
apps/sim/blocks/blocks/slack.ts Exposes and maps the new pagination controls while normalizing cleared optional values before execution.
apps/sim/tools/slack/list_channels.ts Converts channel listing to a registered internal tool operation and expands its input and output contracts.
apps/sim/lib/internal/slack/execute-tool.ts Dispatches Slack channel listing through the shared internal-operation execution boundary.
apps/sim/tools/slack/list_channels.test.ts Covers short provider pages, page caps, resumable cursors, malformed responses, repeated cursors, and optional pagination defaults.

Sequence Diagram

sequenceDiagram
    participant Block as Slack v2 block
    participant Tool as Internal tool boundary
    participant Operation as List conversations operation
    participant Slack as Slack API
    Block->>Tool: list_channels(limit, cursor, maxPages)
    Tool->>Operation: validated input and execution context
    loop Until cursor ends or maxPages reached
        Operation->>Slack: conversations.list(cursor, limit)
        Slack-->>Operation: channels and next_cursor
        Operation->>Operation: append channels and validate cursor
    end
    Operation-->>Tool: channels, count, hasMore, nextCursor, pages
    Tool-->>Block: structured result
Loading

Reviews (4): Last reviewed commit: "fix(slack): clarify shared pagination ou..." | Re-trigger Greptile

Comment thread apps/sim/lib/internal/slack/operations/list-conversations.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 2, 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 2, 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.

All reported issues were addressed across 13 files

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/slack.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 2, 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 13 files

Confidence score: 5/5

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

Re-trigger cubic

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