Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Oct 31, 2025

Resolves #10927

Summary by CodeRabbit

  • New Features
    • Added Google Image, Google News, and Google Web search capabilities via Zenserp.
    • Added configurable search parameters: query, search engine, country, language, device, timeframe, result count, and pagination.
    • Added dynamic option lists for selecting search engines, countries, and languages and a working Zenserp integration for live searches.

@vercel
Copy link

vercel bot commented Oct 31, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Nov 3, 2025 2:47pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 3, 2025 2:47pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Walkthrough

Adds a Zenserp app implementation with HTTP helpers and propDefinitions, three new action modules for Google web/image/news searches that call the app's search method, and updates the component package version and dependency.

Changes

Cohort / File(s) Change Summary
Action Modules
components/zenserp/actions/google-search/google-search.mjs, components/zenserp/actions/google-image-search/google-image-search.mjs, components/zenserp/actions/google-news-search/google-news-search.mjs
Added three new action modules. Each exports a default action object (metadata, annotations, props wired to the zenserp app) and an async run that calls this.zenserp.search(...) with mapped params (images/news set tbm accordingly), calls $.export with a summary, and returns the API response.
App implementation
components/zenserp/zenserp.app.mjs
Implemented the zenserp app: added axios import, expanded propDefinitions (q, searchEngine, country, language, num, start, device, timeframe), and added methods _baseUrl(), _makeRequest({ path, ...opts }), listSearchEngines(), listCountries(), listLanguages(), and search(opts) that perform API requests using the configured api_key.
Package manifest
components/zenserp/package.json
Bumped package version from 0.0.1 to 0.1.0 and added dependency @pipedream/platform: ^3.1.0.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Action as Action Module
    participant App as zenserp.app
    participant HTTP as axios
    participant API as Zenserp API

    Action->>App: this.zenserp.search(params)
    App->>App: _makeRequest(path:"/search", params)
    App->>HTTP: HTTP request (api_key + params)
    HTTP->>API: request
    API-->>HTTP: response
    HTTP-->>App: response data
    App-->>Action: return response
    Action->>Action: $.export(summary)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay extra attention to:
    • Correct mapping of action props to search parameters (tbm, search_engine, gl, lr, num, start, device, timeframe).
    • Behavior and edge cases of dynamic option methods: listSearchEngines, listCountries, listLanguages.
    • _makeRequest usage of this.$auth.api_key, HTTP method, headers, and error handling.
    • package.json version and dependency change.

Poem

🐇 I hopped through code with curious cheer,
New searches bloom both far and near,
Web, images, news — each query sings,
Requests on tiny API wings,
A rabbit claps for these new things.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is minimal, containing only 'Resolves #10927', which references the linked issue. However, it does not follow the provided template structure that requires a 'WHY' section explaining the rationale for changes. The description lacks substantive details about what was implemented or why these components were added. Expand the pull request description to follow the template format and include a 'WHY' section explaining the motivation for adding these Zenserp components. Provide context about what these new actions enable and any relevant implementation details.
Linked Issues check ❓ Inconclusive The linked issue #10927 provides minimal guidance with just the title '[Components] zenserp' and no detailed requirements. While the changeset implements three Google search actions (Image, News, Standard) and updates the Zenserp app component with propDefinitions and methods, there is insufficient specification in the linked issue to definitively validate that all coding requirements have been met. Review the linked issue #10927 more thoroughly or contact the issue author to clarify specific requirements for the Zenserp components. Additionally, refer to the Notion link mentioned in the PR comments ('Components-zenserp-Actions-Batch-1-1') for detailed test requirements and acceptance criteria to ensure full compliance.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Zenserp - new components' is clear and directly related to the changeset, which adds three new action modules (Google Image Search, Google News Search, Google Search) and updates the Zenserp app configuration. The title accurately describes the primary change of introducing new components for the Zenserp integration.
Out of Scope Changes check ✅ Passed The changeset introduces three new action modules (google-image-search, google-news-search, google-search), updates the zenserp.app.mjs with propDefinitions and methods, and bumps the package version with a new dependency. All changes appear directly related to implementing Zenserp components and do not introduce unrelated modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-10927

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0bb0b4 and 8f04121.

📒 Files selected for processing (1)
  • components/zenserp/actions/google-image-search/google-image-search.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/zenserp/actions/google-image-search/google-image-search.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base

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.

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cdb1ef4 and 9c4b99b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • components/zenserp/actions/google-image-search/google-image-search.mjs (1 hunks)
  • components/zenserp/actions/google-news-search/google-news-search.mjs (1 hunks)
  • components/zenserp/actions/google-search/google-search.mjs (1 hunks)
  • components/zenserp/package.json (2 hunks)
  • components/zenserp/zenserp.app.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/zenserp/package.json
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.

Applied to files:

  • components/zenserp/zenserp.app.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/zenserp/zenserp.app.mjs
🧬 Code graph analysis (3)
components/zenserp/actions/google-news-search/google-news-search.mjs (2)
components/zenserp/actions/google-image-search/google-image-search.mjs (1)
  • response (66-79)
components/zenserp/actions/google-search/google-search.mjs (1)
  • response (66-78)
components/zenserp/actions/google-search/google-search.mjs (2)
components/zenserp/actions/google-image-search/google-image-search.mjs (1)
  • response (66-79)
components/zenserp/actions/google-news-search/google-news-search.mjs (1)
  • response (66-79)
components/zenserp/actions/google-image-search/google-image-search.mjs (2)
components/zenserp/actions/google-news-search/google-news-search.mjs (1)
  • response (66-79)
components/zenserp/actions/google-search/google-search.mjs (1)
  • response (66-78)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (8)
components/zenserp/package.json (1)

3-3: LGTM! Version bump and dependency addition are appropriate.

The version bump to 0.1.0 and the addition of the @pipedream/platform dependency align well with the new features being introduced in this PR.

Also applies to: 15-16

components/zenserp/zenserp.app.mjs (4)

1-1: LGTM! Correct import pattern.

The axios import from @pipedream/platform is the standard approach for Pipedream components.


6-110: Well-structured propDefinitions.

The propDefinitions are comprehensive and well-organized, with appropriate labels, descriptions, and dynamic options providers. The structure enables good reusability across actions.


126-149: LGTM! Clean API wrapper methods.

The list and search methods follow a consistent pattern and delegate properly to _makeRequest.


115-125: No issues found. The Zenserp API uses an HTTP header named "apikey" for authentication, which matches the implementation in the code at line 121. The header format is correct.

components/zenserp/actions/google-news-search/google-news-search.mjs (1)

1-83: LGTM! Clean action implementation.

The Google News Search action follows Pipedream patterns correctly:

  • Metadata and annotations are appropriate
  • Props are properly wired via propDefinition
  • The tbm: "nws" parameter correctly specifies news search
  • Summary message is clear and informative
components/zenserp/actions/google-search/google-search.mjs (1)

1-82: LGTM! Standard search implementation is correct.

The Google Search action properly implements standard web search by omitting the tbm parameter. The structure is consistent with the other search actions.

components/zenserp/actions/google-image-search/google-image-search.mjs (1)

1-83: LGTM! Image search implementation is correct.

The Google Image Search action correctly uses tbm: "isch" for image search. The consistent structure across all three search actions (image, news, standard) makes the codebase predictable and maintainable.

jcortes
jcortes previously approved these changes Oct 31, 2025
Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

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

Hi @michelle0927 lgtm! Ready for QA!

@vunguyenhung
Copy link
Collaborator

@vunguyenhung
Copy link
Collaborator

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c4b99b and b0bb0b4.

📒 Files selected for processing (1)
  • components/zenserp/actions/google-image-search/google-image-search.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/zenserp/actions/google-image-search/google-image-search.mjs (2)
components/zenserp/actions/google-search/google-search.mjs (1)
  • response (66-78)
components/zenserp/actions/google-news-search/google-news-search.mjs (1)
  • response (66-79)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
🔇 Additional comments (2)
components/zenserp/actions/google-image-search/google-image-search.mjs (2)

3-13: LGTM!

The action metadata is properly configured with appropriate annotations for a read-only image search action.


54-69: Correct use of tbm: "isch" for image search.

The action correctly sets the tbm parameter to "isch" to specify Google Image Search, and the API call structure follows the established pattern from the other Zenserp actions.

@vunguyenhung
Copy link
Collaborator

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

Test reports

@michelle0927
Copy link
Collaborator Author

/approve

@michelle0927 michelle0927 merged commit 718ed0b into master Nov 4, 2025
10 checks passed
@michelle0927 michelle0927 deleted the issue-10927 branch November 4, 2025 15:06
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.

[Components] zenserp

4 participants