Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Oct 20, 2025

Resolves #13401

Summary by CodeRabbit

  • New Features

    • Added document actions (Create, Update, Delete) and task actions (Create, Update, Find-or-Create).
    • New app-level methods for tasks/docs (create/update/delete) and new fields (tags, priority, size, status, type, startAt, title, folder, text, customProperties).
  • Enhancements

    • Improved task payloads and assignee handling; added parsing for complex fields.
    • Increased default list limit from 50 to 100.
  • Bug Fixes

    • Updated Dart API base URL.
  • Chores

    • Bumped package/component/source versions; minor formatting fixes.

…date, and delete functionalities. Add new properties for document management and update package version to 0.2.0. Enhance existing actions for task management with version updates.
@luancazarine luancazarine linked an issue Oct 20, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Walkthrough

Adds doc CRUD actions and corresponding Dart client methods; refactors task actions to use flat create/update/list APIs with expanded props and parseObject utility; increases DEFAULT_LIMIT, removes TASK_PRIORITIES export, bumps package and several source versions, and makes minor formatting changes.

Changes

Cohort / File(s) Summary
Doc Actions
components/dart/actions/create-doc/create-doc.mjs, components/dart/actions/update-doc/update-doc.mjs, components/dart/actions/delete-doc/delete-doc.mjs
New action modules for creating, updating, and deleting docs. Each exports action metadata, props (including dart and doc-specific fields) and a run method that calls the matching this.dart client method, exports a summary, and returns the API response.
Task Actions (refactor & props expansion)
components/dart/actions/create-task/create-task.mjs, components/dart/actions/find-or-create-task/find-or-create-task.mjs, components/dart/actions/update-task/update-task.mjs
Refactored to use createTask/updateTask/listTasks with flat item payloads instead of transactional ops; props reshaped/expanded (e.g., dartboard, parentId, assignees, tags, priority, startAt, dueAt, size, customProperties); added parseObject use; versions and descriptions updated.
Dart App Client
components/dart/dart.app.mjs
Client updates: base URL changed to https://app.dartai.com/api/v0; added/updated methods createTask, updateTask, getConfig, getDartboard, createDoc, updateDoc, deleteDoc; new/renamed public props (e.g., dartboard, taskId, docId, title, folder, text, tags, priority, size, status, type, startAt, customProperties); request paths adjusted for tasks/docs; deleteDoc signature updated.
Common utilities & constants
components/dart/common/utils.mjs, components/dart/common/constants.mjs
Added parseObject(obj) util to parse JSON strings/arrays safely with graceful fallbacks; increased DEFAULT_LIMIT from 50 → 100 and removed TASK_PRIORITIES from the module export.
Sources version bumps
components/dart/sources/new-doc-created/new-doc-created.mjs, components/dart/sources/new-doc-updated/new-doc-updated.mjs, components/dart/sources/new-task-created/new-task-created.mjs
Bumped exported source versions from 0.0.10.0.3. No behavioral changes.
Package & minor formatting
components/dart/package.json, components/configcat/configcat.app.mjs
package.json: version 0.1.00.2.0; bumped @pipedream/platform to ^3.1.0. configcat.app.mjs: added trailing newline.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Action
    participant DartApp as Dart App Client
    participant DartAPI as Dart API

    User->>Action: invoke create-doc / update-doc / delete-doc
    Action->>Action: read props (dart, title/folder/text/docId)
    alt Create Doc
        Action->>DartApp: createDoc({ $, title, folder, text })
        DartApp->>DartAPI: POST /public/docs
    else Update Doc
        Action->>DartApp: updateDoc({ $, data: { item: { id, title, folder, text } } })
        DartApp->>DartAPI: PUT /public/docs/{id}
    else Delete Doc
        Action->>DartApp: deleteDoc({ $, docId })
        DartApp->>DartAPI: DELETE /public/docs/{docId}
    end
    DartAPI-->>DartApp: API response
    DartApp-->>Action: response
    Action->>Action: $.export("$summary", ...)
    Action-->>User: return response
Loading
sequenceDiagram
    participant User
    participant Action
    participant DartApp as Dart App Client
    participant DartAPI as Dart API

    User->>Action: invoke create-task / update-task / find-or-create-task
    Action->>Action: read expanded props (title, dartboard, parentId, assignees, tags, ...)
    alt Find existing
        Action->>DartApp: listTasks({ $, dartboard, title, ... })
        DartApp->>DartAPI: GET /public/tasks?...
        DartAPI-->>DartApp: results[]
        DartApp-->>Action: results
        Action->>Action: export found summary (results[0].id)
    else Create or Update
        Action->>DartApp: createTask / updateTask({ $, item: { id?, title, parentId, dartboard, type, status, ... } })
        DartApp->>DartAPI: POST /public/tasks or PUT /public/tasks/{id}
        DartAPI-->>DartApp: { item }
        DartApp-->>Action: response
        Action->>Action: $.export("$summary", ...)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • components/dart/dart.app.mjs (API endpoint and method changes, request/response shapes)
    • Task action files (prop mappings, parseObject usage, response handling)
    • components/dart/common/utils.mjs (edge cases for parseObject)
    • components/dart/common/constants.mjs (impact of removing TASK_PRIORITIES)
    • Summaries and version bumps (watch for typos like "wiht")

Poem

🐇
I hopped through code with nimble paws,
Added docs and fixed the laws.
Tasks reborn with props anew,
Small bumps of versions, tidy too.
A carrot for each passing test.

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings, 2 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The PR includes substantial changes that extend beyond the stated requirements in issue #13401. While the requirements specify implementing only three doc actions (create-doc, delete-doc, update-doc) and three webhook sources, the PR also contains significant modifications to existing task-related actions (create-task, update-task, find-or-create-task) with restructured payloads and new properties. Additionally, the PR includes an API migration from https://app.itsdart.com/api/v0 to https://app.dartai.com/api/v0, modifications to common utilities and constants, package version updates, and dependency changes. These changes go beyond the documented scope for implementing doc management functionality.
Description Check ⚠️ Warning The pull request description is incomplete and missing the required template structure. It contains only "Resolves #13401" without any explanation of the changes or rationale. The repository's description template requires a WHY section to explain the context and motivation for the changes, but this is entirely absent. There is no substantive description of what is being implemented or why these changes are necessary beyond the issue reference.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "13401 components dart" reads more like a ticket reference or branch name than a descriptive summary of the changeset. While it is technically related to the changes (which do implement Dart components), it provides minimal clarity about what has actually changed. A teammate scanning the commit history would not understand from this title alone that the PR adds doc management actions (create, update, delete) and webhook sources for doc and task events. The title lacks specificity about the primary contribution.
Linked Issues Check ❓ Inconclusive The PR implements the three required doc actions (create-doc, delete-doc, update-doc) and includes source entries for the three required webhook sources (new-doc-created, new-doc-updated, new-task-created). However, the summaries provided lack sufficient detail to verify compliance with all requirements. The source summaries only show version bumps without detailing the webhook implementation specifics, and it cannot be confirmed whether the "-instant" suffix was properly applied or whether required properties (document ID, creator ID, etc.) are correctly implemented. The core doc actions appear to align with requirements, but the webhook implementation details cannot be verified from the available summaries.
✨ 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 13401-components-dart

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

🧹 Nitpick comments (2)
components/dart/actions/create-doc/create-doc.mjs (1)

35-49: Add defensive null check for response structure.

The code assumes response.item.id exists at line 47 without validation. If the API returns an unexpected response structure, this will cause a runtime error.

Apply this diff to add a defensive check:

-    $.export("$summary", `New doc successfully created with ID: ${response.item.id}`);
+    $.export("$summary", `New doc successfully created with ID: ${response?.item?.id || 'unknown'}`);
     return response;

Alternatively, if the response structure is guaranteed by the API contract, consider verifying the response format:

     const response = await this.dart.createDoc({
       $,
       data: {
         item: {
           title: this.title,
           folder: this.folder,
           text: this.text,
         },
       },
     });
+    
+    if (!response?.item?.id) {
+      throw new Error("Unexpected response format from createDoc API");
+    }

     $.export("$summary", `New doc successfully created with ID: ${response.item.id}`);
     return response;
components/dart/dart.app.mjs (1)

183-189: Consider refactoring for consistency and reduced coupling.

The updateDoc method accesses opts.data.item.id to construct the path, which tightly couples it to the caller's data structure. In contrast, deleteDoc (lines 190-198) uses a destructured docId parameter, which is cleaner and more flexible.

Consider refactoring updateDoc to match deleteDoc's approach:

-updateDoc(opts = {}) {
+updateDoc({
+  docId, ...opts
+}) {
   return this._makeRequest({
     method: "PUT",
-    path: `/docs/${opts.data.item.id}`,
+    path: `/docs/${docId}`,
     ...opts,
   });
 },

Then update the caller in components/dart/actions/update-doc/update-doc.mjs (line 43):

 const response = await this.dart.updateDoc({
+  docId: this.docId,
   $,
   data: {
     item: {
-      id: this.docId,
       title: this.title,
       folder: this.folder,
       text: this.text,
     },
   },
 });
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ffab7aa and 31bcfa6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • components/dart/actions/create-doc/create-doc.mjs (1 hunks)
  • components/dart/actions/create-task/create-task.mjs (1 hunks)
  • components/dart/actions/delete-doc/delete-doc.mjs (1 hunks)
  • components/dart/actions/find-or-create-task/find-or-create-task.mjs (1 hunks)
  • components/dart/actions/update-doc/update-doc.mjs (1 hunks)
  • components/dart/actions/update-task/update-task.mjs (1 hunks)
  • components/dart/dart.app.mjs (4 hunks)
  • components/dart/package.json (2 hunks)
  • components/dart/sources/new-doc-created/new-doc-created.mjs (1 hunks)
  • components/dart/sources/new-doc-updated/new-doc-updated.mjs (1 hunks)
  • components/dart/sources/new-task-created/new-task-created.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
components/dart/actions/update-doc/update-doc.mjs (2)
components/dart/actions/create-doc/create-doc.mjs (1)
  • response (36-45)
components/dart/actions/delete-doc/delete-doc.mjs (1)
  • response (24-27)
components/dart/actions/create-doc/create-doc.mjs (2)
components/dart/actions/delete-doc/delete-doc.mjs (1)
  • response (24-27)
components/dart/actions/update-doc/update-doc.mjs (1)
  • response (43-53)
components/dart/actions/delete-doc/delete-doc.mjs (2)
components/dart/actions/create-doc/create-doc.mjs (1)
  • response (36-45)
components/dart/actions/update-doc/update-doc.mjs (1)
  • response (43-53)
⏰ 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: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (16)
components/dart/package.json (1)

3-3: LGTM! Version bumps are appropriate.

The package version bump from 0.1.0 to 0.2.0 aligns with the addition of new doc-related actions (create-doc, update-doc, delete-doc) and the dependency update is appropriate.

Also applies to: 16-16

components/dart/actions/find-or-create-task/find-or-create-task.mjs (1)

7-7: LGTM! Version bump for consistency.

The version increment aligns with the broader package updates in this PR.

components/dart/actions/update-task/update-task.mjs (1)

7-7: LGTM! Version bump for consistency.

The version increment aligns with the broader package updates in this PR.

components/dart/sources/new-doc-updated/new-doc-updated.mjs (2)

10-10: LGTM! Version bump aligns with new doc features.

The version increment is appropriate for this source update.


20-27: Remove this review comment—the complete doc object is already emitted as the event payload.

The processEvent() method in common/base.mjs (line 29) calls this.$emit(item, meta), emitting the full doc object as the event payload. Consumers already have access to all doc fields including updatedByClientDuid (visible in test-event.mjs). The generateMeta() method correctly creates only deduplication metadata (ID and timestamp), which is its intended purpose—not to duplicate the full payload.

Likely an incorrect or invalid review comment.

components/dart/sources/new-task-created/new-task-created.mjs (2)

9-9: LGTM! Version bump aligns with package updates.

The version increment is appropriate for this source update.


20-26: Creator ID is available in the emitted task object; verify if metadata inclusion is needed.

The task object returned by listTasks contains the creator ID as createdByDuid. Since the base class (base.mjs) already emits the full task object via this.$emit(item, meta), the complete creator information is accessible in the event payload. However, if explicit inclusion in metadata is a requirement per PR objectives, consider adding createdByDuid to the generateMeta() method for easier access.

components/dart/sources/new-doc-created/new-doc-created.mjs (2)

9-9: LGTM! Version bump aligns with new doc features.

The version increment is appropriate for this source update.


20-26: Review comment cannot be definitively verified without access to the PR objectives and full Dart API documentation.

Based on examination of the codebase:

  • The test event payload (components/dart/sources/new-doc-created/test-event.mjs) contains duid, createdAt, drafterDuid, and editorDuids fields, but no explicit creator, creatorId, createdBy, or authorId field.
  • The generateMeta method currently uses available fields: doc.duid and doc.createdAt.
  • Potentially related fields are drafterDuid (nullable) or editorDuids (array of user IDs).

The review comment references "PR objectives" stating a required "creator id" prop should be included, but without access to the PR description or Dart API documentation, this claim cannot be confirmed. The test event structure suggests no dedicated creator field exists in the current API response.

Verify the PR objectives and Dart API response to confirm whether:

  1. A creator field exists in the full API documentation
  2. drafterDuid or editorDuids[0] should be treated as the creator
  3. The requirement to include creator information is actually mandated
components/dart/actions/create-task/create-task.mjs (1)

7-7: LGTM! Version bump for consistency.

The version increment aligns with the broader package updates in this PR.

components/dart/actions/create-doc/create-doc.mjs (1)

1-34: LGTM! Clean action structure.

The action properly implements the create-doc functionality per PR objectives:

  • Configurable doc name (title prop)
  • Target folder specification (folder prop)
  • Additional text content for doc body

The use of propDefinitions ensures consistency with the dart.app.mjs definitions.

components/dart/dart.app.mjs (2)

66-84: LGTM! Prop definition follows established patterns.

The docId propDefinition correctly maps API response fields (idvalue, titlelabel) and follows the same pattern as other prop definitions in the file.


129-129: Verify the base URL and listDocs endpoint changes against Dart's current API.

The endpoint changes cannot be conclusively verified from available documentation. While the base URL (https://app.dartai.com/api/v0/public) appears consistent across the codebase, Dart's API structure uses OpenAPI and MCP specifications rather than traditional REST paths. Confirm that the listDocs path change from /docs to /docs/list and the createDoc path (/docs) match Dart's current API specification before merging, as these are breaking changes to the integration.

components/dart/actions/delete-doc/delete-doc.mjs (1)

14-31: LGTM! Implementation is clean and follows established patterns.

The action correctly uses the deleteDoc method from the Dart app, properly passes parameters, and provides a clear success message.

components/dart/actions/update-doc/update-doc.mjs (2)

14-41: LGTM! Props correctly configured for partial updates.

All update properties (title, folder, text) are optional, which aligns with the description stating "Any properties that are not specified will not be changed." The title override to optional: true is appropriate since the base definition doesn't mark it optional, and this action supports partial updates.


42-57: I found the Dart AI service integration. Now let me check how the API client handles undefined values:

Let me check how the API client handles undefined values when making requests:

Based on my verification, the original review comment about undefined/null handling can be resolved:

When JavaScript serializes objects to JSON, properties with undefined values are automatically omitted from the output. This means the current implementation in update-doc.mjs (lines 48-50) correctly handles optional fields. When title, folder, or text are undefined, they are completely omitted from the JSON, which aligns with the API's documented behavior: "Any properties that are not specified will not be changed."

The implementation is correct as-is. No changes are needed.

lcaresia
lcaresia previously approved these changes Oct 21, 2025
@vercel
Copy link

vercel bot commented Oct 22, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 27, 2025 10:44pm

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 31bcfa6 and 99c1c03.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/configcat/configcat.app.mjs (1 hunks)
  • components/dart/actions/create-task/create-task.mjs (1 hunks)
  • components/dart/actions/find-or-create-task/find-or-create-task.mjs (1 hunks)
  • components/dart/actions/update-task/update-task.mjs (1 hunks)
  • components/dart/dart.app.mjs (3 hunks)
  • components/dart/sources/new-doc-created/new-doc-created.mjs (1 hunks)
  • components/dart/sources/new-doc-updated/new-doc-updated.mjs (1 hunks)
  • components/dart/sources/new-task-created/new-task-created.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • components/configcat/configcat.app.mjs
🚧 Files skipped from review as they are similar to previous changes (5)
  • components/dart/sources/new-doc-created/new-doc-created.mjs
  • components/dart/actions/create-task/create-task.mjs
  • components/dart/sources/new-doc-updated/new-doc-updated.mjs
  • components/dart/sources/new-task-created/new-task-created.mjs
  • components/dart/actions/update-task/update-task.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). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (7)
components/dart/dart.app.mjs (6)

109-125: LGTM! New doc propDefinitions are well-defined.

The new propDefinitions for title, folder, and text are clear, follow standard patterns, and have appropriate optional/required flags for doc operations.


176-182: LGTM! The createDoc method follows standard patterns.

The createDoc method is implemented correctly with appropriate HTTP method and path.


190-198: LGTM! The deleteDoc method is well-implemented.

The deleteDoc method uses clean destructuring and follows RESTful patterns correctly.


183-189: Remove the refactoring suggestion—the current implementation is correct.

The nested opts.data.item.id structure is intentional and matches the actual calling convention. The action file (components/dart/actions/update-doc/update-doc.mjs lines 43-46) calls updateDoc with the nested structure: { $, data: { item: { ... } } }. Refactoring to destructured docId would break this existing call site. The deleteDoc method has a different API contract and is not a valid comparison.

Likely an incorrect or invalid review comment.


172-175: Path is consistent with established API design; no issues found.

The createTransaction endpoint at /public/transactions/create follows the correct pattern. Analysis of the codebase shows this is intentional API design:

  • Read operations (listDocs, listTasks): /docs, /tasks — no /public prefix
  • Write operations (createTransaction, createDoc, updateDoc, deleteDoc): /public/* — all use /public prefix

This is consistent, not an inconsistency. The /public prefix distinguishes mutation endpoints from read endpoints. Additionally, createTransaction has no existing usages in the codebase, so there are no breaking changes to address.


129-129: The initial search returned results for the official Dart programming language APIs. However, the review context indicates this is a proprietary third-party service (based on the domain names app.itsdart.com and app.dartai.com, and endpoints like "tasks", "dartboards", "users"). Let me search for information about this specific service:

Confirm API migration timeline and update endpoint accordingly.

The domain change from itsdart.com to dartai.com reflects Dart's rebranding. API documentation is accessible at the new domain, and recent changelog entries confirm ongoing API improvements.

Before merging:

  • Verify clients and integrations have been notified of the domain change
  • Check if app.itsdart.com redirects to app.dartai.com or if both need support
  • Confirm this aligns with the official Dart migration plan
components/dart/actions/find-or-create-task/find-or-create-task.mjs (1)

7-7: No action required—the path refactoring maintains functional compatibility.

The commit refactored the base URL structure, moving /public from the base URL to individual method paths. The final API endpoint URL for createTransaction remains identical, so the existing action will continue to work without modification. The version bump appropriately documents this internal restructuring.

- Renamed and updated prop definitions for better clarity, including changing `dartboardId` to `dartboard`.
- Introduced new optional properties: `tags`, `priority`, `size`, `status`, `type`, and `customProperties` to support enhanced task attributes.
- Updated task creation and update methods to reflect new property structure and improved API paths.
- Added utility function `parseObject` for better handling of input data formats.
- Incremented version numbers for task-related actions to reflect 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

♻️ Duplicate comments (1)
components/dart/dart.app.mjs (1)

70-70: Correct the field name in docId propDefinition from id to duid.

As flagged in a previous review, the docId propDefinition should destructure duid: value instead of id: value to match the actual API response format (consistent with taskId on line 51).

Apply this diff:

         return results?.map(({
-          id: value, title: label,
+          duid: value, title: label,
         }) => ({
🧹 Nitpick comments (1)
components/dart/dart.app.mjs (1)

124-124: Consider adding fallback for consistency.

Unlike other similar prop definitions (lines 84, 94, 104, 114), the type options don't include a fallback || []. While this might work if types is always defined, adding the fallback would make the code more defensive and consistent.

Apply this diff:

-        return types.map((type) => type);
+        return types?.map((type) => type) || [];
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99c1c03 and e04aeed.

📒 Files selected for processing (6)
  • components/dart/actions/create-task/create-task.mjs (2 hunks)
  • components/dart/actions/find-or-create-task/find-or-create-task.mjs (2 hunks)
  • components/dart/actions/update-task/update-task.mjs (2 hunks)
  • components/dart/common/constants.mjs (1 hunks)
  • components/dart/common/utils.mjs (1 hunks)
  • components/dart/dart.app.mjs (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
components/dart/actions/find-or-create-task/find-or-create-task.mjs (2)
components/dart/actions/create-task/create-task.mjs (1)
  • response (117-137)
components/dart/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/dart/actions/update-task/update-task.mjs (3)
components/dart/actions/create-task/create-task.mjs (1)
  • response (117-137)
components/dart/actions/find-or-create-task/find-or-create-task.mjs (1)
  • response (129-149)
components/dart/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/dart/actions/create-task/create-task.mjs (3)
components/dart/actions/find-or-create-task/find-or-create-task.mjs (1)
  • response (129-149)
components/dart/actions/update-task/update-task.mjs (1)
  • response (124-145)
components/dart/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
⏰ 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: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (6)
components/dart/common/constants.mjs (1)

1-5: LGTM!

The increase in DEFAULT_LIMIT from 50 to 100 and the removal of TASK_PRIORITIES align with the broader refactoring of task-related logic across the Dart actions.

components/dart/common/utils.mjs (1)

1-24: LGTM!

The parseObject utility provides robust handling for parsing JSON strings in various input formats (arrays, strings, objects) with graceful fallback on parse errors. This is used consistently across task actions to handle complex fields like assignees, tags, and custom properties.

components/dart/actions/update-task/update-task.mjs (1)

1-148: LGTM!

The refactoring from a transaction-based payload to a direct item-based payload is implemented correctly. The use of parseObject for complex fields (assignees, tags, customProperties) is consistent with the pattern used in other task actions.

components/dart/actions/find-or-create-task/find-or-create-task.mjs (1)

1-154: Otherwise, the refactoring looks good.

Apart from the property reference issue, the migration to an item-based payload and the use of parseObject for complex fields are consistent with other task actions.

components/dart/actions/create-task/create-task.mjs (1)

1-141: Otherwise, LGTM!

The refactoring to an item-based payload and the use of parseObject for complex fields are implemented correctly and consistently with other task actions.

components/dart/dart.app.mjs (1)

1-283: The broader API refactoring looks solid.

The addition of new methods (createTask, updateTask, getConfig, getDartboard, createDoc, updateDoc, deleteDoc) and expanded prop definitions provide comprehensive support for the new Dart AI API. The base URL change and new public endpoints align well with the updated action modules.

luancazarine and others added 2 commits October 27, 2025 19:44
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…k.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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 e04aeed and 033f60f.

📒 Files selected for processing (2)
  • components/dart/actions/create-task/create-task.mjs (2 hunks)
  • components/dart/actions/find-or-create-task/find-or-create-task.mjs (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/dart/actions/find-or-create-task/find-or-create-task.mjs (3)
components/dart/actions/create-task/create-task.mjs (1)
  • response (117-137)
components/dart/actions/update-task/update-task.mjs (1)
  • response (124-145)
components/dart/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
components/dart/actions/create-task/create-task.mjs (3)
components/dart/actions/find-or-create-task/find-or-create-task.mjs (1)
  • response (129-149)
components/dart/actions/update-task/update-task.mjs (1)
  • response (124-145)
components/dart/common/utils.mjs (2)
  • parseObject (1-24)
  • parseObject (1-24)
⏰ 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: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (5)
components/dart/actions/find-or-create-task/find-or-create-task.mjs (2)

1-1: LGTM!

The import of parseObject is correctly used throughout the file for handling complex fields like assignees, tags, and customProperties.


24-29: Property reference issue has been resolved.

The past review comment about the property reference mismatch has been addressed. The prop is now correctly named title and is properly referenced as this.title at line 119.

components/dart/actions/create-task/create-task.mjs (3)

1-8: LGTM!

The import, description, and version updates are consistent with the refactored API structure across task actions.


138-138: Typo fix confirmed, but verify ID field consistency.

The typo "wiht" has been correctly fixed to "with". However, this line uses response.id while find-or-create-task.mjs (line 151) uses response.duid || response.id. Both files call the same createTask method and should handle the response consistently.

Consider aligning the ID extraction logic:

-    $.export("$summary", `Successfully created task with ID: ${response.id}`);
+    $.export("$summary", `Successfully created task with ID: ${response.duid || response.id}`);

Or verify that response.id is the correct field and update find-or-create-task.mjs accordingly.


117-137: LGTM!

The task creation payload is well-structured with proper use of parseObject for complex fields (assignees, tags, customProperties). The structure is consistent with other task actions in the PR.

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] dart

3 participants