Skip to content

Conversation

@djabarovgeorge
Copy link
Contributor

What changed? Why was the change needed?

EE-PR

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

Hey there and thank you for opening this pull request! 👋

We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted.

Your PR title is: feat(api-service): enhance platform notification usage with caching and detailed diagnostics

Requirements:

  1. Follow the Conventional Commits specification
  2. As a team member, include Linear ticket ID at the end: fixes TICKET-ID or include it in your branch name

Expected format: feat(scope): Add fancy new feature fixes NOV-123

Details:

PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for dashboard-v2-novu-staging canceled.

Name Link
🔨 Latest commit 1781e92
🔍 Latest deploy log https://app.netlify.com/projects/dashboard-v2-novu-staging/deploys/696f7d9321118a0008292c28

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Caution

Review failed

The head commit changed during the review from 9acd9ab to 1781e92.

Walkthrough

Submodule reference updated from 0f71416217e50b7a0343b980e458a96df149b93b to e082770e39cdd875f525bff32c055d56019ae8fa. Refactored logger calls in libs/application-generic/src/services/analytic-logs/workflow-run/workflow-run.repository.ts to structured two-argument logging and added post-query debug entries (including totalCount, start/end timestamps, result counts, and a sample) for findWithCursor and getPlatformUsageByDateRange. Added a new feature flag key IS_BILLING_USAGE_DETAILED_DIAGNOSTICS_ENABLED to FeatureFlagsKeysEnum. Updated GetPlatformNotificationUsage usage in tests to pass a new cacheService dependency.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the PR, which adds caching and detailed diagnostics to platform notification usage handling across multiple files.
Description check ✅ Passed The description references the related enterprise PR and acknowledges the changes, though it lacks specific implementation details about what was modified in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

🤖 Fix all issues with AI agents
In
`@libs/application-generic/src/services/analytic-logs/workflow-run/workflow-run.repository.ts`:
- Around line 830-846: The current logging block computes totalCount and passes
sampleResults to this.logger.debug even for platform-wide queries, risking
cross-tenant leakage; modify the logging so that when organizationId is
undefined you either omit sampleResults or redact tenant identifiers before
including them (keep totalCount and resultCount intact), e.g., conditionally set
sampleResults = organizationId ? result.data.slice(0,5) : [] or map result.data
to remove/blur tenant fields; update the invocation around totalCount,
this.logger.debug, sampleResults, and any use of result.data to ensure only
org-scoped samples (or redacted entries) are logged.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 20, 2026

Open in StackBlitz

npm i https://pkg.pr.new/novuhq/novu@9859
npm i https://pkg.pr.new/novuhq/novu/@novu/providers@9859
npm i https://pkg.pr.new/novuhq/novu/@novu/shared@9859

commit: 1781e92

@github-actions
Copy link
Contributor

LaunchDarkly flag references

🔍 1 flag added or modified

Name Key Aliases found Info
Billing Usage Detailed Diagnostics IS_BILLING_USAGE_DETAILED_DIAGNOSTICS_ENABLED

@djabarovgeorge djabarovgeorge merged commit 0581c10 into next Jan 20, 2026
33 checks passed
@djabarovgeorge djabarovgeorge deleted the add-debug-logs-for-get-usage-usecase branch January 20, 2026 13:17
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