Skip to content

Conversation

GTFalcao
Copy link
Collaborator

@GTFalcao GTFalcao commented Mar 13, 2025

Adding the query functionality to search for pages, instead of listing them all at once

Summary by CodeRabbit

  • New Features

    • Enhanced Notion integration: Users can now leverage search queries when selecting pages, making the page lookup process more intuitive.
  • Chores

    • Updated internal versions across several Notion modules to maintain improved stability and compatibility.

Copy link

vercel bot commented Mar 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2025 7:58pm
pipedream-docs ⬜️ Ignored (Inspect) Mar 13, 2025 7:58pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Mar 13, 2025 7:58pm

Copy link
Contributor

coderabbitai bot commented Mar 13, 2025

Walkthrough

This pull request updates version numbers for multiple Notion component modules across both actions and sources, along with a package.json version bump. Additionally, the notion.app.mjs file has been modified to enhance its configuration by accepting a query parameter in the options functions for pageId and pageIdInDatabase, and by adding a new useQuery flag. No changes have been made to the functionality or control flow beyond these version and parameter updates.

Changes

File(s) Change Summary
components/notion/actions/.../*.mjs (append-block, create-comment, create-page-from-database, create-page, duplicate-page, query-database, retrieve-block, retrieve-database-content, retrieve-database-schema, retrieve-page-property-item, retrieve-page, search, update-page) Updated version numbers (e.g., 0.3.0 → 0.3.1, 0.0.2 → 0.0.3, etc.) without altering functionality.
components/notion/notion.app.mjs Modified the options functions for pageId and pageIdInDatabase to include a query parameter; added a new property useQuery: true.
components/notion/package.json Updated package version from "0.4.0" to "0.4.1".
components/notion/sources/.../*.mjs (new-comment-created, new-database, new-page, page-or-subpage-updated, updated-page-id, updated-page) Updated version numbers across all source modules (e.g., 0.0.2 → 0.0.3, 0.0.9 → 0.0.10, etc.) without affecting module behavior.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NotionApp
    participant SearchService
    participant DatabaseService

    User->>NotionApp: Request options with query for pageId
    NotionApp->>SearchService: Invoke search(query) with filter "page"
    SearchService-->>NotionApp: Return page search results

    User->>NotionApp: Request options with query for pageIdInDatabase
    NotionApp->>DatabaseService: Call queryDatabase(query)
    DatabaseService-->>NotionApp: Return database query results
Loading

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • michelle0927

Poem

I'm a little bunny, hopping with delight,
Version bumps and query tweaks shine ever so bright.
Code carrots crunch with a rhythm so sweet,
Updates and changes making our workflow complete.
With a joyful hop and a cheerful cheer,
I celebrate the changes, bringing smiles near!
🥕🐇 Happy coding!

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

Scope: all 2 workspace projects
 ERR_PNPM_OPTIONAL_DEPS_REQUIRE_PROD_DEPS  Optional dependencies cannot be installed without production dependencies

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🧹 Nitpick comments (2)
components/notion/actions/query-database/query-database.mjs (1)

8-9: Version Increment and Filter Parameter Enhancement.
The action’s version is updated to "0.0.10" and the filter parameter is now defined as a JSON-stringified object, which is parsed with utils.parseStringToJSON(). To improve robustness, consider implementing error handling for cases where the provided JSON is invalid.

components/notion/actions/search/search.mjs (1)

12-16: Enhanced Search Query Parameter

The introduction of the "title" property—with the label "Query (Title)"—provides a direct way for users to pass search terms. For clarity, consider renaming this property to "query" so that its purpose is immediately evident.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5482e2 and a8c50f0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • components/notion/actions/append-block/append-block.mjs (1 hunks)
  • components/notion/actions/create-comment/create-comment.mjs (1 hunks)
  • components/notion/actions/create-page-from-database/create-page-from-database.mjs (1 hunks)
  • components/notion/actions/create-page/create-page.mjs (1 hunks)
  • components/notion/actions/duplicate-page/duplicate-page.mjs (1 hunks)
  • components/notion/actions/query-database/query-database.mjs (1 hunks)
  • components/notion/actions/retrieve-block/retrieve-block.mjs (1 hunks)
  • components/notion/actions/retrieve-database-content/retrieve-database-content.mjs (1 hunks)
  • components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs (1 hunks)
  • components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs (1 hunks)
  • components/notion/actions/retrieve-page/retrieve-page.mjs (1 hunks)
  • components/notion/actions/search/search.mjs (1 hunks)
  • components/notion/actions/update-page/update-page.mjs (1 hunks)
  • components/notion/notion.app.mjs (2 hunks)
  • components/notion/package.json (1 hunks)
  • components/notion/sources/new-comment-created/new-comment-created.mjs (1 hunks)
  • components/notion/sources/new-database/new-database.mjs (1 hunks)
  • components/notion/sources/new-page/new-page.mjs (1 hunks)
  • components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs (1 hunks)
  • components/notion/sources/updated-page-id/updated-page-id.mjs (1 hunks)
  • components/notion/sources/updated-page/updated-page.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (23)
components/notion/package.json (1)

3-3: Version Bump Approved.
The package version is updated to "0.4.1", which aligns with the coordinated versioning updates across the Notion modules.

components/notion/sources/updated-page/updated-page.mjs (1)

12-12: Version Number Update.
The module’s version has been updated to "0.1.6", ensuring consistency with other related Notion components.

components/notion/sources/new-page/new-page.mjs (1)

11-11: Version Update Check.
The version has been incremented to "0.0.12", which is consistent with the suite-wide version bumps.

components/notion/sources/updated-page-id/updated-page-id.mjs (1)

10-10: Version Update Consistency.
The version number is updated to "0.0.7", which maintains consistency across the Notion components.

components/notion/sources/new-database/new-database.mjs (1)

10-10: Version Bump Update
The version is updated to "0.0.10", which is consistent with the coordinated versioning effort across Notion components. No functionality or logic changes were introduced via this modification.

components/notion/sources/new-comment-created/new-comment-created.mjs (1)

8-8: Version Update
The version change to "0.0.3" is a straightforward metadata update. This aligns well with the overall release strategy without altering any operation or control flow in this module.

components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs (1)

10-10: Version Bump
Updating the version to "0.0.8" is a simple metadata revision. The rest of the module (including the search call and event emission logic) remains unchanged.

components/notion/actions/retrieve-page/retrieve-page.mjs (1)

7-7: Consistent Version Update
The version is bumped to "0.0.6" in line 7. This change is solely for version tracking and does not impact the existing functionality of the retrieve-page action.

components/notion/actions/append-block/append-block.mjs (1)

10-10: Metadata Update: Version Bump
The module’s version is incremented to "0.3.1" as shown on line 10. This update is purely administrative and does not affect the logic in the append-block action.

components/notion/actions/duplicate-page/duplicate-page.mjs (1)

10-10: Version Bump Verification

The version update to "0.0.11" is clearly reflected here and is in line with the coordinated updates seen across Notion components.

components/notion/actions/retrieve-block/retrieve-block.mjs (1)

7-7: Version Bump Verification

The module’s version has been successfully updated to "0.0.6". Please ensure that any integration tests or downstream dependencies referencing this version are updated accordingly.

components/notion/actions/search/search.mjs (1)

8-8: Version Bump Verification

The version change to "0.0.6" is applied correctly and aligns with the overall versioning strategy of the Notion components.

components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs (1)

7-7: Version Bump Verification

The version update to "0.0.7" is consistent with the coordinated version incrementation across the Notion modules.

components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)

10-10: Version Bump Verification

The module’s version is now "0.1.17", which aligns with the similar updates made in other parts of the integration.

components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs (1)

7-7: Version Bump Update in Retrieve Page Property Item Module
The version has been updated from "0.0.5" to "0.0.6". This change follows the overall versioning consistency and does not affect functionality.

components/notion/actions/create-comment/create-comment.mjs (1)

8-8: Version Bump Update in Create Comment Module
The module’s version has been incremented from "0.0.2" to "0.0.3". There are no functional changes beyond this version bump.

components/notion/actions/create-page/create-page.mjs (1)

10-10: Version Bump Update in Create Page Module
The version has been updated from "0.2.14" to "0.2.15". This is a straightforward version update that aligns with the coordinated versioning strategy across components.

components/notion/actions/update-page/update-page.mjs (1)

10-10: Version Bump Update in Update Page Module
The version is bumped from "1.1.4" to "1.1.5". No changes in logic or behavior are observed—this maintains consistency with other modules.

components/notion/actions/retrieve-database-content/retrieve-database-content.mjs (1)

7-7: Version Bump Update in Retrieve Database Content Module
The module’s version update from "0.0.4" to "0.0.5" is correctly applied, with no alterations to functionality or execution flow.

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

24-28: Good improvement to the user experience!

The addition of search functionality to the page selection UI is a valuable enhancement. Updating the description to clarify that users can search for pages and adding the useQuery flag enables a more streamlined experience, allowing users to find specific pages quickly instead of browsing through the entire list.


29-35: Well-implemented search with appropriate filters

Good implementation of the search functionality. The code properly handles the case where no query is provided by defaulting to undefined, and the addition of a filter to restrict results to only "page" type objects ensures that users get relevant results.


43-47: Consistent implementation for database pages

Excellent consistency in implementing the same search functionality for pages within databases. The description update and useQuery flag addition maintain a uniform approach across similar components.


50-51: Proper query parameter passing

The query parameter is correctly passed to the queryDatabase method, enabling filtering within a specific database. This completes the search functionality implementation.

@lcaresia lcaresia moved this from Ready for PR Review to Ready for QA in Component (Source and Action) Backlog Mar 13, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Mar 14, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for Release in Component (Source and Action) Backlog Mar 14, 2025
@vunguyenhung
Copy link
Collaborator

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

Test report
https://vunguyenhung.notion.site/Notion-search-improvement-1b5bf548bb5e81ec9fedf8b1a167deba

@vunguyenhung vunguyenhung merged commit 00033fe into master Mar 14, 2025
11 checks passed
@vunguyenhung vunguyenhung deleted the notion-search-improvement branch March 14, 2025 01:37
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants