fix(slack): paginate selector resources - #7362
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR converts Slack channel and user selectors to cursor-based pagination and adds direct detail hydration for saved values. It also separates public and installing-user private-channel streams, binds cursors to authentication modes, and applies bounded fail-closed membership verification.
Confidence Score: 5/5The PR appears safe to merge because no concrete blocking or independently actionable non-blocking issue was identified. The manifest capabilities align with the new provider responses, pagination cursors are validated against the recomputed authentication mode, and private-channel listing and hydration retain the documented fail-closed boundaries.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/selectors/server/providers/slack.ts | Replaces bounded eager draining with mode-bound pagination, dual-stream scoped channel listing, direct detail hydration, and fail-closed private membership checks; no actionable defect was established. |
| apps/sim/lib/selectors/server/providers/slack.test.ts | Adds focused tests for continuation, cancellation, authentication-mode isolation, fallback behavior, detail hydration, and private-channel failure handling. |
| apps/sim/lib/selectors/manifest.ts | Advertises pagination and detail support for Slack channel and user selectors, matching the updated provider result contract. |
Sequence Diagram
sequenceDiagram
participant C as Selector client
participant P as Slack selector provider
participant L as Slack API
C->>P: List channels
P->>L: conversations.list (public stream)
L-->>P: Public page + cursor
P->>L: users.conversations (private membership stream)
L-->>P: Private page + cursor
P-->>C: Deduplicated options + mode-bound composite cursor
C->>P: Continue with composite cursor
P->>L: Continue each unfinished stream
L-->>P: Next pages
P-->>C: Options + remaining continuation
C->>P: Hydrate saved private channel ID
P->>L: conversations.info
P->>L: conversations.members (bounded verification)
P-->>C: Detail option or null
Reviews (1): Last reviewed commit: "fix(slack): paginate selector resources" | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
Summary
Security
Tests
Live validation
Not run: no suitably large authenticated Slack workspace was available. The follow-up manual checklist is continuation beyond ten cursors, authorized versus bot-only private visibility, separate OAuth and bot fallback behavior, saved label hydration in editor and connector surfaces, and cancellation or credential changes during loading.