fix(selectors): paginate SharePoint sites and lists - #7335
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
Greptile SummaryThis PR replaces SharePoint’s bounded server-side page draining with cursor-backed Microsoft Graph pagination while preserving direct detail hydration and credential handling.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness or security failures identified. Cursor pagination integrates with the existing selector accumulation and local-filtering behavior, while continuation URLs are constrained to Microsoft Graph and the original collection pathname.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/selectors/manifest.ts | Enables pagination for SharePoint sites and lists and provider-backed search for sites, consistently with selector client behavior. |
| apps/sim/lib/selectors/server/providers/sharepoint.ts | Replaces bounded page draining with validated one-page cursor requests while retaining credential, abort, filtering, and detail behavior. |
| apps/sim/lib/selectors/server/providers/sharepoint.test.ts | Adds focused coverage for site/list pagination, site search forwarding, cross-resource cursor rejection, and existing detail hydration. |
Sequence Diagram
sequenceDiagram
participant UI as Selector UI
participant API as Selector Provider
participant Graph as Microsoft Graph
UI->>API: List sites/lists
API->>Graph: Initial collection request
Graph-->>API: "Items + @odata.nextLink"
API-->>UI: Items + nextCursor
UI->>API: Load more with cursor
API->>API: Validate Graph origin and collection pathname
API->>Graph: Continuation request
Graph-->>API: Next items
API-->>UI: Items + optional nextCursor
Reviews (1): Last reviewed commit: "fix(selectors): paginate SharePoint site..." | Re-trigger Greptile
Summary
Type of Change
Testing
bun run --cwd apps/sim test lib/selectors/server/providers/sharepoint.test.ts lib/selectors/server/providers/microsoft.test.ts lib/selectors/manifest.test.ts hooks/queries/selectors.test.tsx— 4 files, 28 tests passedbun run check:api-validation:strict— passedbun run check:fork-dependent-coverage— passedbun run check:client-boundary— passedgit diff --check— passedbun run --cwd apps/sim type-checkcurrently fails in unrelated files on the staging base: workflow-output-selector types and the new color utility exportChecklist
Screenshots/Videos
Not applicable; no live SharePoint tenant was available for browser validation.