Skip to content

Conversation

@BiswaViraj
Copy link
Contributor

What changed? Why was the change needed?

image

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

@linear
Copy link

linear bot commented Apr 22, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the dashboard's digest filter logic and modifies the events object creation in the workflows module to incorporate a payload name.

  • Updated the SENTENCE_SUMMARY filter to use a payload property.
  • Changed the default events initialization to create objects with a payload name instead of filling with a static string.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/dashboard/src/components/variable/utils/digest-variables.tsx Updated the sentence summary filter to pass "payload.name" to the toSentence pipe.
apps/api/src/app/workflows-v2/usecases/create-variables-object/create-variables-object.usecase.ts Modified events initialization to construct objects with a payload name using Array.from.
Comments suppressed due to low confidence (2)

apps/dashboard/src/components/variable/utils/digest-variables.tsx:85

  • Verify that passing 'payload.name' as a string literal to toSentence is the intended behavior. If this change affects the extraction of the actual payload name, consider adding a clarifying comment.
[DIGEST_VARIABLES_ENUM.SENTENCE_SUMMARY]: "| toSentence: 'payload.name', 2, 'other',"

apps/api/src/app/workflows-v2/usecases/create-variables-object/create-variables-object.usecase.ts:69

  • Ensure that updating events from a string array to an array of objects with a payload name does not break downstream logic expecting event strings.
step.events = Array.isArray(step.events) ? step.events : Array.from({ length: DEFAULT_ARRAY_ELEMENTS }, (_, index) => {

@netlify
Copy link

netlify bot commented Apr 22, 2025

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 4dc76bd
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/6807a3c231257a0008548c93
😎 Deploy Preview https://deploy-preview-8175.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@LetItRock LetItRock merged commit 8fa6cc2 into next Apr 22, 2025
27 checks passed
@LetItRock LetItRock deleted the nv-5777-incorrect-preview-payload-structure branch April 22, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants