Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Nov 25, 2025

WHY

Resolves #19174

Summary by CodeRabbit

  • New Features

    • Added action to retrieve all conversation properties from Freshchat
  • Chores

    • Updated versions for multiple Freshchat actions and sources
    • Bumped package version from 0.2.0 to 0.3.0

✏️ Tip: You can customize this high-level summary in your review settings.

@jcortes jcortes self-assigned this Nov 25, 2025
@vercel
Copy link

vercel bot commented Nov 25, 2025

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

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

This PR introduces a new action to retrieve Freshchat conversation properties via the /conversations/fields API endpoint. A corresponding method is added to the Freshchat app client. The package version is incremented to 0.3.0, with synchronized version bumps across multiple actions and sources.

Changes

Cohort / File(s) Summary
New Freshchat conversation properties feature
components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs, components/freshchat/freshchat.app.mjs
New action module to list all conversation properties with metadata (key, name, description, version, type). New listConversationProperties(opts = {}) method added to Freshchat app client delegating to _makeRequest with path /conversations/fields.
Action version bumps
components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs, components/freshchat/actions/list-agents/list-agents.mjs, components/freshchat/actions/list-channels/list-channels.mjs, components/freshchat/actions/list-messages/list-messages.mjs, components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs, components/freshchat/actions/update-conversation-status/update-conversation-status.mjs
Version increments across six action modules (0.0.1→0.0.2 or 0.0.2→0.0.3 or 0.0.3→0.0.4). No logic or behavior changes.
Source version bumps
components/freshchat/sources/new-conversation-started/new-conversation-started.mjs, components/freshchat/sources/new-message-received/new-message-received.mjs
Version increments from 0.0.1 to 0.0.2 in both source modules. No functional changes.
Package version
components/freshchat/package.json
Package version bumped from 0.2.0 to 0.3.0.

Sequence Diagram

sequenceDiagram
    participant User
    participant Action as list-all-conversation-<br/>properties Action
    participant App as Freshchat<br/>App Client
    participant API as Freshchat API

    User->>Action: Invoke action
    Action->>App: this.freshchat.listConversationProperties({ $ })
    App->>API: GET /conversations/fields
    API-->>App: Properties list (JSON)
    App-->>Action: Response data
    Action->>Action: $.export("$summary", count)
    Action-->>User: Return properties + summary
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • New action module (list-all-conversation-properties.mjs) requires verification that the Freshchat API integration is correct and follows existing patterns
  • New method in freshchat.app.mjs should be reviewed for consistency with the existing _makeRequest delegation pattern
  • Six action version bumps are trivial and repetitive
  • Two source version bumps are trivial and repetitive
  • Package version bump is trivial

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title '[ACTION] Freshchat - properties' clearly reflects the main change: adding a new Freshchat action for conversation properties.
Description check ✅ Passed The description includes the required WHY section with a linked issue reference (#19174), meeting the template requirements.
Linked Issues check ✅ Passed The PR implements the linked issue #19174 requirements: adds a new Freshchat action 'list-all-conversation-properties' that calls GET /conversations/fields via the Freshchat API.
Out of Scope Changes check ✅ Passed All changes are scoped to adding the new action and supporting infrastructure; version bumps across related components are appropriate for a feature addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 freshchat-new-component-list-conversation-properties

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 64f3488 and 650699d.

📒 Files selected for processing (11)
  • components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs (1 hunks)
  • components/freshchat/actions/list-agents/list-agents.mjs (1 hunks)
  • components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs (1 hunks)
  • components/freshchat/actions/list-channels/list-channels.mjs (1 hunks)
  • components/freshchat/actions/list-messages/list-messages.mjs (1 hunks)
  • components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs (1 hunks)
  • components/freshchat/actions/update-conversation-status/update-conversation-status.mjs (1 hunks)
  • components/freshchat/freshchat.app.mjs (1 hunks)
  • components/freshchat/package.json (1 hunks)
  • components/freshchat/sources/new-conversation-started/new-conversation-started.mjs (1 hunks)
  • components/freshchat/sources/new-message-received/new-message-received.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/freshchat/freshchat.app.mjs
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs
  • components/freshchat/sources/new-message-received/new-message-received.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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (11)
components/freshchat/sources/new-conversation-started/new-conversation-started.mjs (1)

9-9: Source version bump is consistent and low‑risk

Only the version field changed to "0.0.2" with no runtime modifications, which keeps this source aligned with the Freshchat package and other components.

components/freshchat/package.json (1)

3-3: Freshchat package version bump to 0.3.0 looks appropriate

The package version update aligns with the component/action/source version bumps in this PR, with no dependency changes, so this is a safe metadata change.

components/freshchat/sources/new-message-received/new-message-received.mjs (1)

9-9: New‑message source version bump is fine

Updating the source version to "0.0.2" without code changes keeps it in sync with the rest of the Freshchat package and doesn’t affect runtime behavior.

components/freshchat/actions/fetch-conversation-details/fetch-conversation-details.mjs (1)

7-7: Fetch‑conversation‑details action version bump is consistent

Raising the action version to "0.0.3" with unchanged logic is appropriate and keeps this action aligned with the package’s new minor version.

components/freshchat/actions/list-messages/list-messages.mjs (1)

8-8: List‑messages action version bump is appropriate

Changing the action version to "0.0.2" without altering the implementation is a safe metadata update and consistent with the broader Freshchat versioning changes.

components/freshchat/actions/update-conversation-status/update-conversation-status.mjs (1)

8-8: Update‑conversation‑status action version bump is safe

The version increase to "0.0.3" reflects a public metadata change only; existing validation and update logic remain intact.

components/freshchat/actions/list-channels/list-channels.mjs (1)

7-7: List‑channels action version bump matches overall release

Incrementing the action version to "0.0.3" with unchanged behavior keeps this action aligned with the new Freshchat package version.

components/freshchat/actions/list-agents/list-agents.mjs (1)

8-8: List‑agents action version bump is consistent and low‑risk

Updating the action version to "0.0.3" without touching the request, pagination, or error‑handling logic is a straightforward, consistent change.

components/freshchat/actions/send-message-in-chat/send-message-in-chat.mjs (1)

8-8: LGTM! Routine version bump.

The version increment is consistent with the broader package versioning updates in this PR.

components/freshchat/actions/list-all-conversation-properties/list-all-conversation-properties.mjs (1)

17-25: I'll verify the response structure of the listConversationProperties method in the Freshchat app integration to confirm whether the code correctly handles the API response.
<function_calls>


#!/bin/bash

Find the freshchat.app.mjs file

fd -t f "freshchat.app.mjs"


</function_calls>
<function_calls>


#!/bin/bash

Search for listConversationProperties in freshchat app file

rg -n "listConversationProperties" --type=js -A 10


</function_calls>

<function_calls>


#!/bin/bash

Get the freshchat app file path first

FRESHCHAT_APP=$(fd -t f "freshchat.app.mjs")
echo "File found: $FRESHCHAT_APP"

Check file size

wc -l "$FRESHCHAT_APP"


</function_calls>

Let me examine the freshchat app implementation and related list methods:
<function_calls>


#!/bin/bash

Find and display freshchat.app.mjs content with focus on list methods

FRESHCHAT_APP=$(fd -t f "freshchat.app.mjs")
if [ ! -z "$FRESHCHAT_APP" ]; then

First, let's see the structure and find list methods

rg -n "list(Users|Conversations|Agents|Groups|Channels|ConversationProperties)" "$FRESHCHAT_APP" -A 15
else
echo "File not found"
fi


</function_calls>

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

186-191: Verify the API response structure — Issue CONFIRMED.

The consuming action correctly expects an array (Freshchat's /conversations/fields endpoint returns a direct array, unlike other endpoints that return objects with nested arrays). However, the listConversationProperties method returns the raw axios response object via _makeRequest, not the array. The consuming action's response.length check will fail or behave incorrectly on the axios response object.

The consuming action should use getPaginatedResults with the appropriate resourceKey (likely "fields"), or the method should extract and return the actual array data, matching the pattern of other list methods like listAgents and listChannels.

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

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
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

LGTM!

@vunguyenhung
Copy link
Collaborator

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

Test reports

@jcortes jcortes merged commit a77314f into master Nov 26, 2025
10 checks passed
@jcortes jcortes deleted the freshchat-new-component-list-conversation-properties branch November 26, 2025 14:34
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.

[ACTION] Freshchat - properties

4 participants