Skip to content

Clickup - reconfigure props #17155

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

Merged
merged 4 commits into from
Jun 19, 2025
Merged

Clickup - reconfigure props #17155

merged 4 commits into from
Jun 19, 2025

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Jun 17, 2025

Resolves #17128

Summary by CodeRabbit

  • New Features

    • Enhanced property selection for ClickUp actions and sources with more detailed, hierarchical options for folders, lists, tasks, views, statuses, checklists, comments, and custom fields.
    • Added dynamic option loading with improved validation, including checks for custom task ID usage.
  • Refactor

    • Replaced combined listWithFolder properties with explicit, context-aware properties (folderId, listId, etc.) across all ClickUp components.
    • Removed external builder and fragment utilities, consolidating property definitions inline for clarity and maintainability.
  • Bug Fixes

    • Improved validation and error messaging related to custom task ID configurations.
  • Documentation

    • Updated and clarified descriptions with consistent phrasing and improved links to ClickUp documentation.
  • Chores

    • Incremented version numbers for all actions, sources, and the ClickUp package.
    • Updated dependencies to newer versions.

Copy link

vercel bot commented Jun 17, 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 Jun 18, 2025 3:45pm
pipedream-docs ⬜️ Ignored (Inspect) Jun 18, 2025 3:45pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 18, 2025 3:45pm

Copy link
Contributor

coderabbitai bot commented Jun 17, 2025

"""

Walkthrough

This change removes the use of the listWithFolder property and the builder/fragments pattern for prop definitions across ClickUp actions and sources. Instead, it introduces explicit, hierarchical prop definitions for entities like folderId, listId, taskId, etc., with dynamic dependencies and option loaders, simplifying and clarifying the component structure.

Changes

File(s) Change Summary
components/clickup/actions/common/comment-props.mjs, components/clickup/actions/common/thread-comment-props.mjs Removed builder/fragments imports; replaced additionalProps with explicit prop definitions for folderId, listId, taskId, commentId.
components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs, components/clickup/actions/create-checklist-item/create-checklist-item.mjs, components/clickup/actions/create-checklist/create-checklist.mjs, components/clickup/actions/create-list-comment/create-list-comment.mjs, components/clickup/actions/create-task-comment/create-task-comment.mjs, components/clickup/actions/create-task-from-template/create-task-from-template.mjs, components/clickup/actions/create-task/create-task.mjs, components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs, components/clickup/actions/create-view-comment/create-view-comment.mjs Refactored props: removed listWithFolder and additionalProps; added explicit folderId, listId, and related hierarchical props using propDefinition with context functions. Updated descriptions and versions.
components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs, components/clickup/actions/delete-checklist/delete-checklist.mjs, components/clickup/actions/delete-comment/delete-comment.mjs, components/clickup/actions/delete-list/delete-list.mjs, components/clickup/actions/delete-task/delete-task.mjs Refactored props: replaced listWithFolder with explicit hierarchical props (folderId, listId, taskId, etc.) and removed builder/fragments usage. Updated descriptions and versions.
components/clickup/actions/get-custom-fields/get-custom-fields.mjs, components/clickup/actions/get-list-comments/get-list-comments.mjs, components/clickup/actions/get-list-views/get-list-views.mjs, components/clickup/actions/get-list/get-list.mjs, components/clickup/actions/get-task-comments/get-task-comments.mjs, components/clickup/actions/get-task/get-task.mjs, components/clickup/actions/get-tasks/get-tasks.mjs, components/clickup/actions/get-view-comments/get-view-comments.mjs, components/clickup/actions/get-view-tasks/get-view-tasks.mjs, components/clickup/actions/get-view/get-view.mjs Refactored props: replaced listWithFolder and builder/fragments with explicit, context-aware prop definitions for folderId, listId, etc. Updated descriptions and versions.
components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs, components/clickup/actions/update-checklist-item/update-checklist-item.mjs, components/clickup/actions/update-checklist/update-checklist.mjs, components/clickup/actions/update-list/update-list.mjs, components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs, components/clickup/actions/update-task/update-task.mjs Refactored props: removed builder/fragments and listWithFolder; added explicit hierarchical prop definitions. Updated descriptions and versions.
components/clickup/actions/create-folder/create-folder.mjs, components/clickup/actions/create-list/create-list.mjs, components/clickup/actions/create-space/create-space.mjs, components/clickup/actions/delete-folder/delete-folder.mjs, components/clickup/actions/delete-space/delete-space.mjs, components/clickup/actions/get-folder-views/get-folder-views.mjs, components/clickup/actions/get-folder/get-folder.mjs, components/clickup/actions/get-folders/get-folders.mjs, components/clickup/actions/get-lists/get-lists.mjs, components/clickup/actions/get-space-views/get-space-views.mjs, components/clickup/actions/get-space/get-space.mjs, components/clickup/actions/get-spaces/get-spaces.mjs, components/clickup/actions/get-task-templates/get-task-templates.mjs, components/clickup/actions/stop-time-entry/stop-time-entry.mjs, components/clickup/actions/update-folder/update-folder.mjs, components/clickup/actions/update-space/update-space.mjs Updated only description and/or version metadata, no functional changes.
components/clickup/actions/start-time-entry/start-time-entry.mjs Refactored props: replaced listWithFolder with explicit folderId, listId, and taskId prop definitions. Updated version and description.
components/clickup/clickup.app.mjs Overhauled propDefinitions: removed listWithFolder; added granular props (folderId, listId, taskId, etc.) with async option loaders and validation.
components/clickup/common/builder.mjs, components/clickup/common/props-fragments.mjs Deleted files: removed builder and prop fragments utilities.
components/clickup/package.json Bumped package version and updated @pipedream/platform dependency.
components/clickup/sources/new-folder/new-folder.mjs, components/clickup/sources/new-list/new-list.mjs Incremented version only.
components/clickup/sources/new-task-advanced/new-task-advanced.mjs, components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs, components/clickup/sources/new-task-comment/new-task-comment.mjs, components/clickup/sources/new-task/new-task.mjs, components/clickup/sources/updated-task/updated-task.mjs Refactored props: replaced listWithFolder and builder/fragments with explicit folderId, listId, and related prop definitions. Updated version.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Action
    participant ClickUp API

    User->>Action: Provide props (e.g., spaceId, folderId, listId, taskId)
    Action->>ClickUp API: Fetch options for each prop as needed (dynamic loading)
    ClickUp API-->>Action: Return options (folders, lists, tasks, etc.)
    Action->>ClickUp API: Perform main action (e.g., create task, comment)
    ClickUp API-->>Action: Return result
    Action-->>User: Return result/output
Loading

Assessment against linked issues

Objective Addressed Explanation
Remove listWithFolder prop and simplify prop structure in ClickUp Create Task action (#17128)
Avoid hiding listId behind listWithFolder in Create Task action (#17128)
Refactor to use explicit, hierarchical prop definitions in Create Task action (#17128)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Refactoring of prop definitions and removal of listWithFolder in actions/sources other than create-task (multiple files) While the linked issue targets the Create Task action, similar refactors were applied project-wide. This is not strictly out of scope, but not required by the specific issue.
Removal of builder and props-fragments utility files (components/clickup/common/builder.mjs, components/clickup/common/props-fragments.mjs) These deletions are not required by the linked issue, which only targets the Create Task action, but are a logical consequence of the refactor.
Metadata-only changes (description/version bumps) in unrelated actions/sources These are not required by the linked issue, but do not affect functionality.

Possibly related PRs

  • PipedreamHQ/pipedream#13597: Refactored thread-comment-props.mjs to remove builder/fragments, directly related as this PR modifies the same file and approach.
  • PipedreamHQ/pipedream#13097: Introduced builder-based prop consolidation, which this PR now replaces with explicit definitions, making them directly related but opposite in implementation.

Suggested labels

refactor

Suggested reviewers

  • GTFalcao

Poem

A rabbit hopped through ClickUp code,
Where folders and lists once abode.
With builder and fragments now out of sight,
Explicit props make the future bright.
No more hiding, all IDs in view—
Simpler, clearer, and shiny new!
🐇✨
"""

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.

components/clickup/actions/common/thread-comment-props.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

components/clickup/actions/common/comment-props.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

components/clickup/clickup.app.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

  • 8 others
✨ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need 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)

  • @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 generate sequence diagram to generate a sequence diagram of the changes in 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: 26

🔭 Outside diff range comments (7)
components/clickup/sources/new-task-advanced/new-task-advanced.mjs (1)

65-71: Null-safety for tasks without a folder

task.folder can be null for lists that are not inside a folder. Accessing task.folder.id will throw in that scenario.

-  if (this.folderId && task.folder.id !== this.folderId) {
+  if (this.folderId && (task.folder?.id ?? null) !== this.folderId) {
     filter = false;
   }
components/clickup/actions/get-view-tasks/get-view-tasks.mjs (1)

58-64: Avoid sending page: undefined to the API

When page is left blank the ClickUp API receives "page": undefined, risking a 400. Build the params object conditionally:

-  const response = await this.clickup.getViewTasks({
-    $,
-    viewId,
-    params: {
-      page,
-    },
-  });
+  const params = page === undefined ? undefined : { page };
+  const response = await this.clickup.getViewTasks({
+    $,
+    viewId,
+    params,
+  });
components/clickup/actions/create-task-from-template/create-task-from-template.mjs (1)

54-61: Missing await – API call returns an unresolved Promise

The result of this.clickup.createTaskFromTemplate is assigned without awaiting, so the action exports a Promise instead of the API response.

-    const response = this.clickup.createTaskFromTemplate({
+    const response = await this.clickup.createTaskFromTemplate({
       $,
       listId,
       taskTemplateId,
       data: {
         name,
       },
     });
components/clickup/actions/start-time-entry/start-time-entry.mjs (1)

58-61: Double-check body key tid

The ClickUp “Start a time entry” endpoint expects task_id (per docs). Confirm whether tid is accepted; otherwise the API will ignore the field.

-        tid: this.taskId,
+        task_id: this.taskId,
components/clickup/actions/create-task/create-task.mjs (1)

126-142: Avoid sending NaN due_date

When dueDate is empty, new Date(undefined).getTime() returns NaN, triggering a 400. Only include due_date when a date is provided.

-    const due_date = (new Date(dueDate)).getTime();
+    const due_date = dueDate ? (new Date(dueDate)).getTime() : undefined;
components/clickup/actions/update-task/update-task.mjs (1)

128-135: priority is written to the wrong key

data[priority] = … uses the value (“urgent”, “high”, …) as the JSON key, producing payloads like { "urgent": 1 }.
ClickUp expects "priority": <number>.

-    if (priority) data[priority] = constants.PRIORITIES[priority];
+    if (priority) data.priority = constants.PRIORITIES[priority];

Without this fix the call silently ignores the priority change.
Unit tests covering priority updates would catch this.

Also applies to: 153-153

components/clickup/sources/updated-task/updated-task.mjs (1)

98-108: Guard against empty history_items to prevent runtime error

_getMeta blindly accesses historyItems[0], but run() keeps iterating even when history_items is empty.
A legitimate webhook with no history items (rare, but it happens) will throw Cannot read properties of undefined.

Minimal defensive fix:

-    if (isValidated) {
-      this.$emit(body, this._getMeta(body.history_items));
-    }
+    if (isValidated && body.history_items?.length) {
+      this.$emit(body, this._getMeta(body.history_items));
+    }
🧹 Nitpick comments (13)
components/clickup/actions/get-view-comments/get-view-comments.mjs (1)

7-7: Fix the description grammar

Prefer “Get view comments” or “Get comments from a view” – the current wording reads “Get a view comments”.

-  description: "Get a view comments. [See the documentation](https://clickup.com/api) in **Comments / Get Chat View Comments** section.",
+  description: "Get view comments. [See the documentation](https://clickup.com/api) in **Comments / Get Chat View Comments** section.",
components/clickup/sources/new-task/new-task.mjs (1)

23-43: Filtering ignores folderId

You added an optional folderId prop, but run() only filters on listId.
Selecting a folder without a list will emit all tasks from that folder (and every other), defeating the purpose.

-    const { listId } = this;
+    const { listId, folderId } = this;
...
-    if (listId) {
+    if (listId || folderId) {
       const { task_id: taskId } = body;
-      const { list: { id } } = await this.app.getTask({ taskId });
-      if (id !== listId) return;
+      const { list: { id: eventListId, folder: { id: eventFolderId } = {} } } =
+        await this.app.getTask({ taskId });
+      if (listId && eventListId !== listId) return;
+      if (folderId && eventFolderId !== folderId) return;
     }
components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs (1)

23-43: folderId prop is unused in filtering

Same issue as the “new-task” source: folderId can be selected but is never checked in run(), so it has no practical effect. Mirror the filtering logic or drop the prop.

components/clickup/actions/create-task-from-template/create-task-from-template.mjs (1)

27-35: folderId should be optional

folderId is used only for cascading list options and is not required by the API call itself. Making it optional aligns with other components and supports lists at space-root level.

     folderId: {
       propDefinition: [
         common.props.clickup,
         "folderId",
         (c) => ({
           spaceId: c.spaceId,
         }),
       ],
-    },
+      optional: true,
+    },
components/clickup/actions/delete-comment/delete-comment.mjs (1)

7-8: Typo in description (“Deleet”)

-  description: "Deletes a comment. [See the documentation](https://clickup.com/api) in **Comments / Deleet Comment** section.",
+  description: "Deletes a comment. [See the documentation](https://clickup.com/api) in **Comments / Delete Comment** section.",
components/clickup/actions/start-time-entry/start-time-entry.mjs (1)

7-8: Fix malformed documentation URL

https://clickup.com/api/clickupreference/operation/StartatimeEntry 404s.
Use the slug in the official docs (/operation/startTimeEntry) or drop the path entirely to avoid dead links.

-  description: "Start time entry. [See the documentation](https://clickup.com/api/clickupreference/operation/StartatimeEntry)",
+  description: "Start time entry. [See the documentation](https://clickup.com/api/clickupreference/operation/startTimeEntry)",
components/clickup/actions/get-task-comments/get-task-comments.mjs (1)

7-8: Grammar

"Get a task comments""Get task comments".

-  description: "Get a task comments. [See the documentation](https://clickup.com/api) in **Comments / Get Task Comments** section.",
+  description: "Get task comments. [See the documentation](https://clickup.com/api) in **Comments / Get Task Comments** section.",
components/clickup/actions/get-list-comments/get-list-comments.mjs (1)

7-8: Grammar

"Get a list comments""Get list comments".

-  description: "Get a list comments. [See the documentation](https://clickup.com/api) in **Comments / Get List Comments** section.",
+  description: "Get list comments. [See the documentation](https://clickup.com/api) in **Comments / Get List Comments** section.",
components/clickup/actions/create-task/create-task.mjs (1)

91-98: status should remain optional

ClickUp defaults the status when none is supplied. Making it required forces users to look it up every time.

-    },
+    },
+    optional: true,
components/clickup/actions/delete-task/delete-task.mjs (1)

31-42: Nit: tighten wording in description

Minor grammar fix.

-      description: "To show options please select a **List** first",
+      description: "Select a **List** first to load tasks.",
components/clickup/actions/get-task/get-task.mjs (1)

31-42: Align helper text

-      description: "To show options please select a **List** first",
+      description: "Select a **List** first to load tasks.",
components/clickup/actions/update-task/update-task.mjs (1)

88-110: Parent-task selector uses the generic taskId definition – consider a dedicated prop key

Re-using taskId’s propDefinition for the parent field works technically, but it overloads the meaning of an existing helper and may confuse maintainers (it fetches tasks to be used as parents, not the task being updated).
Creating a small wrapper in the ClickUp app called parentTaskId (or passing a label override here) will make intent crystal-clear and avoid accidental coupling if the taskId definition changes later.

No code change strictly required, but worth reconsidering for clarity.

components/clickup/actions/create-task-comment/create-task-comment.mjs (1)

53-62: Validate taskId when custom-task-ID mode is on

When useCustomTaskIds is true, taskId must be numeric or the API call fails.
Consider adding a simple pattern or pre-run check to give users immediate feedback instead of a 400 from ClickUp.

Example:

if (this.useCustomTaskIds && isNaN(Number(this.taskId))) {
  throw new ConfigurationError("When custom task IDs are enabled, Task ID must be numeric");
}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between feac320 and b8dc9fb.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (62)
  • components/clickup/actions/common/comment-props.mjs (1 hunks)
  • components/clickup/actions/common/thread-comment-props.mjs (1 hunks)
  • components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs (2 hunks)
  • components/clickup/actions/create-checklist-item/create-checklist-item.mjs (2 hunks)
  • components/clickup/actions/create-checklist/create-checklist.mjs (2 hunks)
  • components/clickup/actions/create-folder/create-folder.mjs (1 hunks)
  • components/clickup/actions/create-list-comment/create-list-comment.mjs (2 hunks)
  • components/clickup/actions/create-list/create-list.mjs (1 hunks)
  • components/clickup/actions/create-space/create-space.mjs (1 hunks)
  • components/clickup/actions/create-task-comment/create-task-comment.mjs (2 hunks)
  • components/clickup/actions/create-task-from-template/create-task-from-template.mjs (2 hunks)
  • components/clickup/actions/create-task/create-task.mjs (2 hunks)
  • components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs (2 hunks)
  • components/clickup/actions/create-view-comment/create-view-comment.mjs (2 hunks)
  • components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs (1 hunks)
  • components/clickup/actions/delete-checklist/delete-checklist.mjs (1 hunks)
  • components/clickup/actions/delete-comment/delete-comment.mjs (1 hunks)
  • components/clickup/actions/delete-folder/delete-folder.mjs (1 hunks)
  • components/clickup/actions/delete-list/delete-list.mjs (1 hunks)
  • components/clickup/actions/delete-space/delete-space.mjs (1 hunks)
  • components/clickup/actions/delete-task/delete-task.mjs (1 hunks)
  • components/clickup/actions/get-custom-fields/get-custom-fields.mjs (1 hunks)
  • components/clickup/actions/get-folder-views/get-folder-views.mjs (1 hunks)
  • components/clickup/actions/get-folder/get-folder.mjs (1 hunks)
  • components/clickup/actions/get-folders/get-folders.mjs (1 hunks)
  • components/clickup/actions/get-list-comments/get-list-comments.mjs (1 hunks)
  • components/clickup/actions/get-list-views/get-list-views.mjs (1 hunks)
  • components/clickup/actions/get-list/get-list.mjs (1 hunks)
  • components/clickup/actions/get-lists/get-lists.mjs (1 hunks)
  • components/clickup/actions/get-space-views/get-space-views.mjs (1 hunks)
  • components/clickup/actions/get-space/get-space.mjs (1 hunks)
  • components/clickup/actions/get-spaces/get-spaces.mjs (1 hunks)
  • components/clickup/actions/get-task-comments/get-task-comments.mjs (1 hunks)
  • components/clickup/actions/get-task-templates/get-task-templates.mjs (1 hunks)
  • components/clickup/actions/get-task/get-task.mjs (1 hunks)
  • components/clickup/actions/get-tasks/get-tasks.mjs (2 hunks)
  • components/clickup/actions/get-team-views/get-team-views.mjs (1 hunks)
  • components/clickup/actions/get-view-comments/get-view-comments.mjs (1 hunks)
  • components/clickup/actions/get-view-tasks/get-view-tasks.mjs (2 hunks)
  • components/clickup/actions/get-view/get-view.mjs (1 hunks)
  • components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs (1 hunks)
  • components/clickup/actions/start-time-entry/start-time-entry.mjs (2 hunks)
  • components/clickup/actions/stop-time-entry/stop-time-entry.mjs (1 hunks)
  • components/clickup/actions/update-checklist-item/update-checklist-item.mjs (2 hunks)
  • components/clickup/actions/update-checklist/update-checklist.mjs (2 hunks)
  • components/clickup/actions/update-comment/update-comment.mjs (2 hunks)
  • components/clickup/actions/update-folder/update-folder.mjs (1 hunks)
  • components/clickup/actions/update-list/update-list.mjs (2 hunks)
  • components/clickup/actions/update-space/update-space.mjs (1 hunks)
  • components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs (2 hunks)
  • components/clickup/actions/update-task/update-task.mjs (2 hunks)
  • components/clickup/clickup.app.mjs (2 hunks)
  • components/clickup/common/builder.mjs (0 hunks)
  • components/clickup/common/props-fragments.mjs (0 hunks)
  • components/clickup/package.json (2 hunks)
  • components/clickup/sources/new-folder/new-folder.mjs (1 hunks)
  • components/clickup/sources/new-list/new-list.mjs (1 hunks)
  • components/clickup/sources/new-task-advanced/new-task-advanced.mjs (2 hunks)
  • components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs (2 hunks)
  • components/clickup/sources/new-task-comment/new-task-comment.mjs (2 hunks)
  • components/clickup/sources/new-task/new-task.mjs (2 hunks)
  • components/clickup/sources/updated-task/updated-task.mjs (2 hunks)
💤 Files with no reviewable changes (2)
  • components/clickup/common/builder.mjs
  • components/clickup/common/props-fragments.mjs
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (39)
components/clickup/sources/new-folder/new-folder.mjs (1)

9-9: Bump source version
The source version has been updated to 0.0.9 to align with the PR’s overall versioning.

components/clickup/sources/new-list/new-list.mjs (1)

9-9: Bump source version
The source version has been updated to 0.0.9 to stay consistent with related components.

components/clickup/package.json (2)

3-3: Package version bump
The ClickUp package version has been updated to 0.3.1 following the integration refactor.


17-17: Verify updated dependency version
The @pipedream/platform dependency was bumped to ^3.1.0. Please confirm that version 3.1.0 is published and compatible with existing integrations.

#!/bin/bash
# Check that @pipedream/[email protected] exists on npm
npm view @pipedream/platform versions --json | grep '"3.1.0"'
components/clickup/actions/get-folder/get-folder.mjs (1)

7-8: Metadata update
The action’s description has been rephrased for clarity, and the version was bumped to 0.0.10 to match the other ClickUp components.

components/clickup/actions/get-team-views/get-team-views.mjs (1)

7-8: Metadata update
The action’s description has been rephrased for consistency, and the version was updated to 0.0.10 in line with the broader refactoring.

components/clickup/actions/update-space/update-space.mjs (1)

7-8: Approve metadata update.
Description rephrasing is clear and consistently formatted, and version bump to “0.0.10” follows the established pattern.

components/clickup/actions/create-folder/create-folder.mjs (1)

7-8: Approve metadata update.
Description rephrasing is clear, and version bump to “0.0.10” aligns with other ClickUp actions.

components/clickup/actions/delete-space/delete-space.mjs (1)

7-8: Approve metadata update.
The updated description and version bump to “0.0.10” are consistent and properly formatted.

components/clickup/actions/get-space/get-space.mjs (1)

7-8: Approve metadata update.
Updated description is concise, and version bump to “0.0.10” matches the PR’s conventions.

components/clickup/actions/stop-time-entry/stop-time-entry.mjs (1)

7-8: Approve metadata update.
Description tweak and version bump to “0.0.5” are correct and consistent with the changes across the ClickUp integration.

components/clickup/actions/get-lists/get-lists.mjs (2)

7-7: Refine documentation link formatting.

Updated the link text to "[See the documentation]" for clarity and consistency across ClickUp actions.


8-8: Increment action version.

Bumped version to "0.0.10" to align with the PR-wide metadata update.

components/clickup/actions/create-space/create-space.mjs (2)

6-6: Refine documentation link formatting.

Changed the link text to "[See the documentation]" to match the standardized style.


7-7: Increment action version.

Updated version to "0.0.10" in line with other ClickUp actions.

components/clickup/actions/create-list/create-list.mjs (2)

7-7: Refine documentation link formatting.

Rephrased link to "[See the documentation]" for consistency in metadata.


8-8: Increment action version.

Bumped version to "0.0.15" to reflect metadata changes.

components/clickup/actions/delete-folder/delete-folder.mjs (2)

7-7: Refine documentation link formatting.

Updated description link to "[See the documentation]" for uniformity.


8-8: Increment action version.

Version updated to "0.0.10" to keep in step with other actions.

components/clickup/actions/get-space-views/get-space-views.mjs (2)

7-7: Refine documentation link formatting.

Adjusted the link text to "[See the documentation]" to standardize across components.


8-8: Increment action version.

Bumped version to "0.0.10" consistent with the PR's version updates.

components/clickup/actions/update-folder/update-folder.mjs (1)

7-8: Metadata update: description rephrasing and version bump
The description has been standardized to use "[See the documentation]" and the version is correctly incremented to "0.0.10".

components/clickup/actions/get-spaces/get-spaces.mjs (1)

6-7: Metadata update: description rephrasing and version bump
The description link text now consistently reads "[See the documentation]" and the version is updated to "0.0.10".

components/clickup/actions/get-folder-views/get-folder-views.mjs (1)

7-8: Metadata update: description rephrasing and version bump
The documentation reference has been unified as "[See the documentation]" and the version is bumped to "0.0.10".

components/clickup/actions/get-folders/get-folders.mjs (1)

7-8: Metadata update: description rephrasing and version bump
The description now uses "[See the documentation]" for consistency, and the version number is correctly raised to "0.0.10".

components/clickup/actions/get-task-templates/get-task-templates.mjs (1)

6-7: Metadata update: description rephrasing and version bump
Description has been updated to "[See the documentation]" and the version is now "0.0.10", matching the rest of the integration.

components/clickup/actions/get-view-comments/get-view-comments.mjs (1)

12-33: Validate upstream-selection chain to avoid empty option loaders

Both folderId and listId are marked optional, yet viewId’s option loader depends on them.
If the user leaves both blank, the loader will be called with undefined values, likely returning an empty list or 400 from the API.

Consider:

  1. Making at least one of folderId / listId required, or
  2. Adding runtime validation before getViewComments is executed.

Please verify the intended UX.

components/clickup/actions/get-view/get-view.mjs (1)

34-41: Edge-case: loader chain when both folderId & listId are blank

viewId options rely on { folderId, listId }. If both remain undefined (e.g., the user wants a workspace-level view), verify that the options loader in clickup.app.mjs tolerates undefined without throwing. If not, guard in the loader or set sensible defaults.

components/clickup/actions/update-comment/update-comment.mjs (1)

36-54: ```shell
#!/bin/bash
set -e

Path to update-comment action

update_file="components/clickup/actions/update-comment/update-comment.mjs"

Ensure the file exists

if [ ! -f "$update_file" ]; then
echo "Error: $update_file not found"
exit 1
fi

echo "=== Snippet (lines 1–200) of update-comment.mjs ==="
sed -n '1,200p' "$update_file"
echo

echo "=== Snippet (lines 36–54) of update-comment.mjs ==="
sed -n '36,54p' "$update_file"
echo

echo "=== async run() definition and body ==="
start_line=$(grep -n "async run" -m1 "$update_file" | cut -d: -f1)
end_line=$(( start_line + 60 ))
sed -n "${start_line},${end_line}p" "$update_file"
echo

echo "=== References to folderId/listId in update-comment.mjs ==="
grep -nE "folderId|listId" "$update_file" || echo "None found"

echo
echo "=== Searching for comment-props.mjs ==="
comment_props=$(find components/clickup -type f -name "comment-props.mjs" | head -n1)
if [ -n "$comment_props" ]; then
echo "Found: $comment_props"
echo "=== Head of comment-props.mjs ==="
head -n 200 "$comment_props"
else
echo "comment-props.mjs not found under components/clickup"
fi


</details>
<details>
<summary>components/clickup/sources/new-task-comment/new-task-comment.mjs (1)</summary>

`23-42`: **Props look good**

`folderId` and `listId` are optional and correctly scoped, matching the filter logic later in `run()`. No issues spotted.

</details>
<details>
<summary>components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs (1)</summary>

`34-66`: **Possible prop duplication – double-check `folderId` / `listId`**

`list-props.mjs` is already spread into `...common.props`. If that common file defines `folderId` or `listId`, the re-declaration here will silently shadow it. Make sure either:

1. The common file no longer exports those keys, or  
2. You omit them here to avoid confusion.

No functional bug, but worth a quick grep.

</details>
<details>
<summary>components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs (1)</summary>

`31-41`: **Minor wording nit**

`description` already tells users to select a list first; no action needed, just noting that this is consistent with the option-loading sequence.

</details>
<details>
<summary>components/clickup/actions/start-time-entry/start-time-entry.mjs (1)</summary>

`28-37`: **`listId` marked optional but required to populate `taskId` options**

`taskId`’s option loader depends on `listId`, so leaving `listId` blank prevents any UI choices and forces the user to paste a raw task ID.  
Either:

1. Move `optional: true` to `taskId` and keep `listId` required, or  
2. Keep it optional but add clear docs that the user must supply a task ID manually when no list is selected.

</details>
<details>
<summary>components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs (1)</summary>

`26-35`: **Consider marking `listId` required**

`taskId` loader depends on `listId`; without it the options list is empty. Either make `listId` required or add similar guidance as suggested for the previous file.

</details>
<details>
<summary>components/clickup/actions/create-view-comment/create-view-comment.mjs (1)</summary>

`54-65`: **Confirm loader tolerates undefined dependencies**

`viewId`’s option loader depends on `folderId` and `listId`, yet both props are optional.  
Please confirm the loader short-circuits (returns `[]` or similar) when either dependency is `undefined`, otherwise the component will throw before the user can complete the form.

</details>
<details>
<summary>components/clickup/actions/update-checklist-item/update-checklist-item.mjs (1)</summary>

`7-104`: **Excellent refactor to explicit hierarchical props!**

The replacement of `listWithFolder` with individual props (`folderId`, `listId`, `taskId`, `checklistId`, `checklistItemId`, `parent`) provides better clarity and control over the component structure. The hierarchical dependencies are properly configured, ensuring each prop has access to its required parent context.

</details>
<details>
<summary>components/clickup/clickup.app.mjs (3)</summary>

`58-60`: **Good improvement to label and description clarity**

The updated label with proper capitalization and clearer description better explains the relationship between custom task IDs and the Authorized Team prop.

---

`205-231`: **Excellent validation for custom task IDs!**

The `taskId` prop implementation includes proper validation to ensure custom task IDs are enabled in ClickUp settings before allowing their use. This proactive error handling will prevent runtime issues and provide clear feedback to users.

---

`130-347`: **Well-structured hierarchical prop definitions**

The new prop definitions (`folderId`, `listId`, `viewId`, `taskId`, `checklistId`, `status`, `commentId`, `checklistItemId`, `customFieldId`) are well-organized with:
- Clear hierarchical dependencies
- Proper async option loaders
- Consistent error handling
- Helpful descriptions for better UX

This refactor significantly improves the modularity and maintainability of the ClickUp integration.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

jcortes
jcortes previously approved these changes Jun 17, 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!

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

🔭 Outside diff range comments (1)
components/clickup/clickup.app.mjs (1)

40-55: Duplicate “folder” selector causes UX confusion
Lines 40-55 expose a generic folders prop while 130-145 adds a second, nearly-identical folderId prop. Two different labels for the same concept will surface two dropdowns in the UI and diverge in future maintenance.

Either:

  1. Drop folderId and re-use folders, or
  2. Rename/remove folders and keep folderId (preferred—consistent with listId, taskId, …).

Failing to consolidate will break consumers that rely on one prop only.

Also applies to: 130-145

🧹 Nitpick comments (2)
components/clickup/clickup.app.mjs (2)

58-60: Nit – wording & casing of useCustomTaskIds description
Minor copy-editing to align with surrounding props and remove ambiguity.

-      label: "Use custom task IDs",
-      description: "Whether it should use custom task id instead of the ClickUp task ID. Should be used with `Authorized Team`",
+      label: "Use Custom Task IDs",
+      description: "Use the custom task identifier instead of the default ClickUp task ID. Requires **Authorized Team**.",

169-204: viewId option loader may emit duplicates
Collecting views from workspace, space, folder, and list scopes with concat can return the same view multiple times. Deduplicate before mapping.

-        let views = [];
+        let views = [];
@@
-        return views?.map((view) => ({
+        views = _.uniqBy(views, "id");
+        return views.map((view) => ({
           label: view.name,
           value: view.id,
         }));
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 74e9cff and d3487d6.

📒 Files selected for processing (11)
  • components/clickup/actions/common/comment-props.mjs (1 hunks)
  • components/clickup/actions/common/thread-comment-props.mjs (1 hunks)
  • components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs (1 hunks)
  • components/clickup/actions/delete-comment/delete-comment.mjs (1 hunks)
  • components/clickup/actions/update-comment/update-comment.mjs (1 hunks)
  • components/clickup/clickup.app.mjs (2 hunks)
  • components/clickup/sources/new-task-advanced/new-task-advanced.mjs (2 hunks)
  • components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs (2 hunks)
  • components/clickup/sources/new-task-comment/new-task-comment.mjs (2 hunks)
  • components/clickup/sources/new-task/new-task.mjs (2 hunks)
  • components/clickup/sources/updated-task/updated-task.mjs (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs
🚧 Files skipped from review as they are similar to previous changes (8)
  • components/clickup/actions/delete-comment/delete-comment.mjs
  • components/clickup/actions/common/comment-props.mjs
  • components/clickup/actions/update-comment/update-comment.mjs
  • components/clickup/sources/new-task-advanced/new-task-advanced.mjs
  • components/clickup/sources/new-task/new-task.mjs
  • components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs
  • components/clickup/sources/updated-task/updated-task.mjs
  • components/clickup/sources/new-task-comment/new-task-comment.mjs
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/clickup/actions/common/thread-comment-props.mjs (1)

15-55: Previous critical issues resolved – props now self-contained
folderId, listId, taskId, and commentId are now defined locally, so the past errors about missing viewId and listId dependencies are gone. Nice catch.

@michelle0927
Copy link
Collaborator Author

/approve

@michelle0927 michelle0927 merged commit 5f9b78b into master Jun 19, 2025
11 checks passed
@michelle0927 michelle0927 deleted the issue-17128 branch June 19, 2025 14:42
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.

[BUG] need to reconfigure the ClickUp Create Task action
2 participants