Skip to content

fix(selectors): paginate SharePoint sites and lists - #7335

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/sharepoint-selector-pagination
Sep 1, 2026
Merged

fix(selectors): paginate SharePoint sites and lists#7335
waleedlatif1 merged 1 commit into
stagingfrom
fix/sharepoint-selector-pagination

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • replace the silent ten-page SharePoint site/list drain with cursor-backed Microsoft Graph pagination
  • expose provider-side site search while keeping list search local
  • preserve direct site/list detail hydration, credential bindings, abort propagation, and Graph destination validation
  • keep Excel consent issue fix(microsoft-excel): decide SharePoint site discovery consent model #7197 separate and out of scope

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

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 passed
  • SharePoint provider coverage verifies site/list cursor continuation, site search forwarding, invalid Graph destination rejection, and existing direct detail hydration
  • bun run check:api-validation:strict — passed
  • bun run check:fork-dependent-coverage — passed
  • bun run check:client-boundary — passed
  • scoped Biome check and git diff --check — passed
  • bun run --cwd apps/sim type-check currently fails in unrelated files on the staging base: workflow-output-selector types and the new color utility export
  • live Microsoft Graph validation was not performed because no native SharePoint tenant credential was available

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)

Screenshots/Videos

Not applicable; no live SharePoint tenant was available for browser validation.

@vercel

vercel Bot commented Sep 1, 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 1, 2026 2:36am UTC

Request Review

@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 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-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces SharePoint’s bounded server-side page draining with cursor-backed Microsoft Graph pagination while preserving direct detail hydration and credential handling.

  • Marks SharePoint site and list selectors as paginated.
  • Forwards provider-side search for sites while retaining local filtering for lists.
  • Validates continuation URLs against the Microsoft Graph origin and original resource pathname.
  • Adds coverage for cursor continuation, search forwarding, destination rejection, and detail hydration.

Confidence Score: 5/5

The 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.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "fix(selectors): paginate SharePoint site..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 507663f into staging Sep 1, 2026
27 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/sharepoint-selector-pagination branch September 1, 2026 02:50
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