-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - nuclino #16887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Components - nuclino #16887
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis update introduces a comprehensive Nuclino integration, adding a fully implemented app interface, three action modules (create, search, update), and two event source modules for polling new or updated items/collections. Supporting utilities for pagination, metadata, and event processing are included, along with test event fixtures and updated package metadata. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ActionModule
participant NuclinoApp
participant NuclinoAPI
User->>ActionModule: Trigger create/search/update action
ActionModule->>NuclinoApp: Call method (createItem, listItems, updateItem)
NuclinoApp->>NuclinoAPI: Make HTTP request with parameters
NuclinoAPI-->>NuclinoApp: Return response data
NuclinoApp-->>ActionModule: Return processed result
ActionModule-->>User: Output result/summary
sequenceDiagram
participant SourceModule
participant NuclinoApp
participant NuclinoAPI
participant EventConsumer
SourceModule->>NuclinoApp: Request items/collections (with timestamp filter)
NuclinoApp->>NuclinoAPI: GET /items
NuclinoAPI-->>NuclinoApp: Paginated response
NuclinoApp-->>SourceModule: Return items/collections
SourceModule->>EventConsumer: Emit new/updated events with metadata
Assessment against linked issues
Poem
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
components/nuclino/sources/new-item-or-collection-created/new-item-or-collection-created.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (4)
components/nuclino/sources/new-item-or-collection-updated/test-event.mjs (1)
1-16: Consider making the test data more realistic for an update scenario.The test event structure is correct, but it's identical to the "created" test event. For better testing differentiation, consider:
- Using different timestamps to show an actual update timeframe
- Modifying the title or content to reflect an updated state
- Perhaps showing different created vs. last updated user IDs
Example improvement:
- "title": "item1", + "title": "item1 (updated)", - "createdAt": "2025-05-29T16:53:27.059Z", + "createdAt": "2025-05-29T16:53:27.059Z", - "lastUpdatedAt": "2025-05-29T16:53:30.950Z", + "lastUpdatedAt": "2025-05-29T17:25:45.123Z",components/nuclino/sources/new-item-or-collection-created/new-item-or-collection-created.mjs (1)
7-7: Fix typo in component name.There's a missing space in the component name.
- name: "New Item or CollectionCreated", + name: "New Item or Collection Created",components/nuclino/nuclino.app.mjs (2)
74-79: Simplify the static options definition.Since the options are static, you can simplify this by removing the async function.
object: { type: "string", label: "Object", description: "The object type. Either `item` or `collection`.", - async options() { - return [ - "item", - "collection", - ]; - }, + options: [ + "item", + "collection", + ], },
144-144: Improve variable declaration clarity.Consider separating the variable declarations for better readability.
-let total, count = 0; +let total; +let count = 0;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
components/nuclino/actions/create-item-or-collection/create-item-or-collection.mjs(1 hunks)components/nuclino/actions/search-items-or-collections/search-items-or-collections.mjs(1 hunks)components/nuclino/actions/update-item-or-collection/update-item-or-collection.mjs(1 hunks)components/nuclino/nuclino.app.mjs(1 hunks)components/nuclino/package.json(2 hunks)components/nuclino/sources/common/base.mjs(1 hunks)components/nuclino/sources/new-item-or-collection-created/new-item-or-collection-created.mjs(1 hunks)components/nuclino/sources/new-item-or-collection-created/test-event.mjs(1 hunks)components/nuclino/sources/new-item-or-collection-updated/new-item-or-collection-updated.mjs(1 hunks)components/nuclino/sources/new-item-or-collection-updated/test-event.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (8)
components/nuclino/sources/new-item-or-collection-created/test-event.mjs (1)
1-16: LGTM! Well-structured test fixture.The test event data is well-formed with proper UUID formats, valid ISO timestamps, and a logical structure that accurately represents a Nuclino item creation event. The timestamps show a realistic progression (created at 16:53:27, updated at 16:53:30), and the data structure includes all necessary fields for testing.
components/nuclino/package.json (2)
3-3: Appropriate version bump for new feature release.The version increment from "0.0.1" to "0.1.0" correctly follows semantic versioning for a minor feature release introducing the Nuclino integration components.
15-17: LGTM! Proper dependency management.The addition of "@pipedream/platform" dependency is appropriate for the new integration components and follows standard package management practices.
components/nuclino/actions/search-items-or-collections/search-items-or-collections.mjs (2)
1-29: LGTM! Well-structured action component.The action is properly structured with:
- Correct imports and metadata
- Appropriate prop definitions using propDefinition
- Good default values and descriptions
- Proper typing for all properties
30-44: LGTM! Correct pagination implementation.The pagination logic is well-implemented using the Nuclino app's paginate method with appropriate parameters and async iteration.
components/nuclino/actions/create-item-or-collection/create-item-or-collection.mjs (1)
61-63:❓ Verification inconclusive
Verify the conditional workspace logic.
The conditional setting of
workspaceIdtoundefinedwhenparentIdis provided seems counterintuitive. Please verify this aligns with the Nuclino API requirements.
🏁 Script executed:
#!/bin/bash # Description: Check if there are API documentation comments or examples in the nuclino app file # that explain this conditional workspace logic. # Search for comments or documentation about workspace and parent relationship rg -A 5 -B 5 "workspaceId.*parentId|parentId.*workspaceId" rg -A 10 "createItem" components/nuclino/nuclino.app.mjsLength of output: 1532
Confirm conditional workspaceId logic
I couldn’t find any internal examples or comments in
components/nuclino/nuclino.app.mjsthat clarify whether omittingworkspaceIdwhenparentIdis provided is supported by the Nuclino HTTP API. Please verify against the official Nuclino API documentation that supplying onlyparentId(and leavingworkspaceIdasundefined) is the intended pattern so the workspace is correctly inferred.• File: components/nuclino/actions/create-item-or-collection/create-item-or-collection.mjs
Lines 61–63workspaceId: this.parentId ? undefined : this.workspaceId, parentId: this.parentId,components/nuclino/actions/update-item-or-collection/update-item-or-collection.mjs (1)
50-65: LGTM! Well-implemented validation and error handling.The validation logic properly ensures at least one field is provided for updates, and the error handling using
ConfigurationErrorfollows Pipedream best practices.components/nuclino/sources/new-item-or-collection-created/new-item-or-collection-created.mjs (1)
17-23: Good choice for creation event ID generation.Using just
item.idas the unique identifier is appropriate for creation events since each item can only be created once. This is actually better than the approach used in the updated source.
components/nuclino/actions/search-items-or-collections/search-items-or-collections.mjs
Outdated
Show resolved
Hide resolved
components/nuclino/actions/create-item-or-collection/create-item-or-collection.mjs
Outdated
Show resolved
Hide resolved
components/nuclino/sources/new-item-or-collection-updated/new-item-or-collection-updated.mjs
Show resolved
Hide resolved
luancazarine
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927, I just added a minor suggestion, but since it doesn't affect funcionality, I'm moving it to QA!
components/nuclino/sources/new-item-or-collection-created/new-item-or-collection-created.mjs
Outdated
Show resolved
Hide resolved
…item-or-collection-created.mjs Co-authored-by: Luan Cazarine <[email protected]>
|
/approve |
Resolves #16878
Summary by CodeRabbit