Skip to content

Sharepoint - new components & updates#19761

Merged
lcaresia merged 8 commits intomasterfrom
issue-19743
Jan 29, 2026
Merged

Sharepoint - new components & updates#19761
lcaresia merged 8 commits intomasterfrom
issue-19743

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Jan 20, 2026

Resolves #19743
Resolves #19744
Resolves #19747

Summary by CodeRabbit

  • New Features

    • Added "Get Site", "List Sites", "Search Files", and "Search Sites" SharePoint actions.
    • Introduced selectable response fields ("select"), max-results limits, and server-side ordering for listing/search actions.
    • Added improved selection support for fetching files by ID.
  • Chores

    • Bumped SharePoint package and multiple action/source versions.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jan 28, 2026 9:36pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

Adds new SharePoint actions (Get Site, List Sites, Search Sites, Search Files), extends the SharePoint app API with getSite, searchQuery, and param-driven listAllSites, introduces select/orderBy/maxResults props across actions, updates value resolution in select-files, and bumps multiple component versions including package.json.

Changes

Cohort / File(s) Summary
New site actions
components/sharepoint/actions/get-site/get-site.mjs, components/sharepoint/actions/list-sites/list-sites.mjs, components/sharepoint/actions/search-sites/search-sites.mjs
Add Get Site, List Sites, and Search Sites actions with props like siteId, select, maxResults; implement pagination/limits and call into updated sharepoint app methods; export summaries.
New global file search
components/sharepoint/actions/search-files/search-files.mjs
Add Search Files action using sharepoint.searchQuery; props include queryString, queryTemplate, select, size, sortField, descending; constructs POST body for the search API.
Enhanced file actions (select/orderBy)
components/sharepoint/actions/get-file-by-id/get-file-by-id.mjs, components/sharepoint/actions/list-files-in-folder/list-files-in-folder.mjs
Add select prop to get-file-by-id (passes params.select to getDriveItem); add select and orderBy to list-files-in-folder and pass params (select, orderby) to listing calls.
Core SharePoint app updates
components/sharepoint/sharepoint.app.mjs
Add public methods getSite({ siteId }), searchQuery(args), change listAllSites to accept params (use params.search), and add propDefinitions select and maxResults.
Value-resolution update
components/sharepoint/actions/select-files/select-files.mjs
Change prop resolvers and resolveValue to use prop?.value (remove __lv checks and reloadProps: true), adjust option resolvers accordingly.
Version bumps — actions & sources
components/sharepoint/actions/... (many files), components/sharepoint/sources/... (new-file-created, new-folder-created, new-list-item, updated-list-item), components/sharepoint/package.json
Multiple components had version increments (package 0.5.0 → 0.6.0); most are metadata-only changes. Review for unintended behavior.
Minor metadata-only bumps
components/sharepoint/actions/create-folder/..., create-item/..., create-link/..., create-list/..., download-file/..., find-file-by-name/..., get-excel-table/..., update-item/..., upload-file/...
Only version fields updated in these action files.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Action as Action (UI/Trigger)
participant SDK as SharePoint SDK (sharepoint.app)
participant API as Microsoft Graph API
rect rgba(200,230,255,0.5)
Action->>SDK: call getSite / listAllSites / searchQuery (include params: select, search, maxResults)
end
rect rgba(220,255,200,0.5)
SDK->>API: GET /sites/{siteId} or GET /sites with params or POST /search/query
API-->>SDK: results (single or paged)
end
rect rgba(255,240,200,0.5)
SDK-->>Action: return results (apply pagination cap, export $summary)
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

User submitted

Suggested reviewers

  • GTFalcao
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only lists three linked issue numbers (#19743, #19744, #19747) without elaborating on what was implemented or why the changes matter, failing to meet the repository's description template requirements. Expand the description by adding a 'WHY' section explaining the rationale for these changes and summarizing what new features or actions were added to resolve the issues.
Title check ❓ Inconclusive The PR title 'Sharepoint - new components & updates' is partially related to the changeset—it mentions SharePoint and updates—but is vague and overly broad, failing to specify the main changes (new site/search actions, file listing enhancements, new search functionality). Revise title to be more specific, e.g., 'Add SharePoint site listing, file search, and folder navigation actions' to clearly convey the primary additions.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully implements all three linked issues: new list-sites and search-sites actions [#19743], new search-files action [#19744], and enhanced list-files-in-folder with select/orderby parameters [#19747].
Out of Scope Changes check ✅ Passed All changes are within scope of the three linked issues, though version bumps and select/maxResults enhancements to sharepoint.app.mjs also benefit other existing actions beyond the specific issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@michelle0927 michelle0927 marked this pull request as ready for review January 20, 2026 18:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@components/sharepoint/actions/list-files-in-folder/list-files-in-folder.mjs`:
- Around line 47-78: The params object in run() must use MS Graph query names
($select, $orderby, $filter) and support server-side filtering; add a new
filterType prop (e.g., supports values like "excludeFolders" or "foldersOnly"),
build params using keys "$select": this.select, "$orderby": this.orderBy and
"$filter": computedFilter (derived from filterType, e.g. "folder ne null" or
"folder eq null"), then call cleanObject(params) before passing to
sharepoint.listDriveItemsInFolder/listDriveItems so undefined values are
stripped; update any references to excludeFolders to use filterType and ensure
sharepoint calls receive the cleaned params.

In `@components/sharepoint/sharepoint.app.mjs`:
- Around line 11-24: In the async options function (options({ prevContext, query
})) stop adding args.params.search when following a paginated nextLink: only set
args.params = { search: query } when query is present AND prevContext?.nextLink
is falsy; when prevContext.nextLink exists, rely on that URL and do not append
params to avoid duplicate search query breaking pagination (adjust logic around
prevContext.nextLink, args, and args.params.search accordingly).
- Around line 269-281: Normalize Graph query params before the HTTP call by
updating _makeRequest to map incoming params keys: transform "select" →
"$select", "orderby" → "$orderby", and "filter" → "$filter" (preserving other
params) so axios receives the dollar-prefixed names; locate the params object
handling in _makeRequest and perform this key replacement (or a small mapping
pass) prior to passing params to axios, ensuring existing callers like
list-files-in-folder.mjs need no changes.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/sharepoint/actions/list-files-in-folder/list-files-in-folder.mjs (1)

79-81: Client-side filtering fetches all items before filtering.

The excludeFolders prop filters results after fetching all items from the API. For large folders, consider adding server-side filtering using MS Graph's $filter=file ne null parameter to improve performance. This aligns with the PR objectives referencing $filter support from issue #19747.

🤖 Fix all issues with AI agents
In `@components/sharepoint/actions/get-file-by-id/get-file-by-id.mjs`:
- Around line 54-56: The params object passed to the Graph API call in
get-file-by-id.mjs uses the wrong OData parameter name; update the params entry
in the request (the object built where params: { select: this.select }) to use
the MS Graph OData key `$select` instead of `select` so the request uses
`$select: this.select` when calling the Graph API (locate the params
construction in the action that sends the request).

In `@components/sharepoint/actions/list-files-in-folder/list-files-in-folder.mjs`:
- Around line 53-59: The orderBy prop in list-files-in-folder (orderBy) is
defined inline while select reuses a shared propDefinition; add a reusable
orderBy propDefinition in sharepoint.app.mjs (e.g., export/orderByProp or
similar) that captures type, label, description, default, and optional settings,
then update the list-files-in-folder action to reference that shared
propDefinition instead of the inline orderBy to ensure consistency and easier
maintenance.
♻️ Duplicate comments (1)
components/sharepoint/actions/list-files-in-folder/list-files-in-folder.mjs (1)

62-65: MS Graph API query parameters require $ prefix.

The params object uses select and orderby keys, but MS Graph API requires $select and $orderby (with the $ prefix) for OData query parameters to be recognized. Without this prefix, the API will silently ignore these parameters.

♻️ Proposed fix
     const params = {
-      select: this.select,
-      orderby: this.orderBy,
+      $select: this.select,
+      $orderby: this.orderBy,
     };

lcaresia
lcaresia previously approved these changes Jan 22, 2026
Copy link
Collaborator

@lcaresia lcaresia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lcaresia lcaresia moved this from Ready for PR Review to Ready for QA in Component (Source and Action) Backlog Jan 22, 2026
@michelle0927 michelle0927 moved this from Ready for QA to High Priority - Ready for QA in Component (Source and Action) Backlog Jan 23, 2026
@vunguyenhung vunguyenhung moved this from High Priority - Ready for QA to Changes Required in Component (Source and Action) Backlog Jan 25, 2026
@vunguyenhung
Copy link
Contributor

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check test reports below for more information:

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@components/sharepoint/actions/search-files/search-files.mjs`:
- Around line 40-52: The optional boolean property descending currently has no
default, causing isDescending to be sent as undefined; either set a default
value (e.g., add default: false to the descending property alongside sortField)
or change the run method where sortProperties is built (look for sortProperties
and code that sets isDescending) to only include isDescending when descending
!== undefined (or explicitly coerce to Boolean) so the API receives a
deterministic true/false value; update whichever approach you choose and ensure
references to sortField, descending, and sortProperties are adjusted
accordingly.

In `@components/sharepoint/actions/select-files/select-files.mjs`:
- Around line 64-70: The resolveValue function's check uses truthiness
(prop?.value) which misclassifies legitimate falsy values (e.g., 0 or "") as
missing; update resolveValue to detect presence of the property instead: keep
the typeof prop === "object" guard and replace the truthy check with a
property-existence check (e.g., use 'value' in prop) so objects with a defined
but falsy value return that value correctly.

@michelle0927 michelle0927 moved this from Changes Required to Ready for QA in Component (Source and Action) Backlog Jan 26, 2026
@michelle0927 michelle0927 moved this from Ready for QA to High Priority - Ready for QA in Component (Source and Action) Backlog Jan 26, 2026
@vunguyenhung vunguyenhung moved this from High Priority - Ready for QA to Ready for QA in Component (Source and Action) Backlog Jan 28, 2026
@vunguyenhung vunguyenhung moved this from Ready for QA to Ready for Release in Component (Source and Action) Backlog Jan 29, 2026
@vunguyenhung
Copy link
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test reports

@vunguyenhung
Copy link
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test reports

1 similar comment
@vunguyenhung
Copy link
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test reports

@michelle0927
Copy link
Collaborator Author

/approve

@lcaresia lcaresia merged commit 92bb4ab into master Jan 29, 2026
9 checks passed
@lcaresia lcaresia deleted the issue-19743 branch January 29, 2026 19:04
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants