Skip to content

Add activity logging for partner enrollments group changes#3416

Closed
devkiran wants to merge 49 commits intomainfrom
activity-logs
Closed

Add activity logging for partner enrollments group changes#3416
devkiran wants to merge 49 commits intomainfrom
activity-logs

Conversation

@devkiran
Copy link
Collaborator

@devkiran devkiran commented Feb 4, 2026

No description provided.

- Implemented `updateReferralAction` to handle updating partner referral details.
- Created `EditReferralModal` component for editing referral information.
- Enhanced referral form data handling with new schema and type definitions.
- Updated referral details display to include edit functionality.
- Improved form data parsing and validation for custom fields.
- Introduced `updateReferralStatusAction` to manage referral status transitions.
- Created `ConfirmReferralStatusChangeModal` for user confirmation on status changes.
- Updated referral status dropdown to trigger the new modal for status updates.
- Enhanced referral status handling with new schemas and constants for validation.
- Consolidated existing status change logic for better maintainability.
- Introduced new actions for marking referrals as qualified and closed won.
- Updated `updateReferralStatusAction` to include additional validation and status transition logic.
- Enhanced notification system for referral status updates.
- Improved referral lead details component to support read-only and interactive modes.
- Refactored status dropdown to accommodate selected status handling.
- Updated email template to reflect accurate referral status in notifications.
- Integrated `addReferralEvent` function to log referral events during submission and status updates.
- Updated `submitReferralAction` to include event logging for referral creation.
- Enhanced `updateReferralStatusAction` to log events for referral status changes, including user context.
- Introduced new `PartnerReferralEvent` model in Prisma schema to support event tracking.
@vercel
Copy link
Contributor

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
dub Ready Ready Preview Feb 4, 2026 9:23am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch activity-logs

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.

@devkiran
Copy link
Collaborator Author

devkiran commented Feb 4, 2026

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devkiran devkiran requested a review from steven-tey February 4, 2026 09:16
Base automatically changed from partner-referral-improvements to main February 4, 2026 18:31
@steven-tey
Copy link
Collaborator

@coderabbitai I'm seeing a lot of merge conflicts here and I'm thinking of starting fresh with another PR, can you confirm that the majority of the changes are in apps/web/app/(ee)/api/groups/[groupIdOrSlug]/partners/route.ts?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Get the list of all files changed in this PR with their stats
echo "=== Files changed in this PR with stats ==="
git diff --stat origin/main...HEAD

echo -e "\n=== Detailed change counts per file ==="
git diff --numstat origin/main...HEAD | sort -k1 -rn

echo -e "\n=== Checking if the specific file exists and its changes ==="
if [ -f "apps/web/app/(ee)/api/groups/[groupIdOrSlug]/partners/route.ts" ]; then
    echo "File exists. Showing diff:"
    git diff origin/main...HEAD -- "apps/web/app/(ee)/api/groups/[groupIdOrSlug]/partners/route.ts"
else
    echo "File not found at that path"
fi

echo -e "\n=== Summary of total changes ==="
git diff --shortstat origin/main...HEAD

Length of output: 7811


@steven-tey, I can confirm that the majority of changes are NOT in that file. Here's the breakdown:

The file you mentioned:

  • apps/web/app/(ee)/api/groups/[groupIdOrSlug]/partners/route.ts: 63 additions (only ~2.3% of total changes)

Actual distribution across 38 files (2,795 total line changes):

Largest additions (new files/major changes):

  • ui/modals/confirm-referral-status-change-modal.tsx: +377 lines
  • ui/modals/edit-referral-modal.tsx: +320 lines
  • lib/actions/referrals/update-referral-status.ts: +126 lines
  • ui/referrals/referral-status-dropdown.tsx: +98 lines
  • ui/referrals/referral-lead-details.tsx: +92/-33 lines
  • lib/api/activity-log/get-resource-diff.ts: +76 lines
  • lib/api/referrals/mark-referral-qualified.ts: +74 lines
  • lib/actions/referrals/update-referral.ts: +64 lines

Largest deletions (removed files):

  • ui/modals/mark-referral-closed-won-modal.tsx: -245 lines
  • ui/modals/mark-referral-qualified-modal.tsx: -208 lines
  • lib/actions/referrals/mark-referral-qualified.ts: -136 lines
  • lib/actions/referrals/mark-referral-closed-won.ts: -91 lines

The changes are spread across UI components, API routes, actions, and database schema. Starting fresh might indeed be cleaner given the merge conflicts.

@devkiran devkiran closed this Feb 5, 2026
@devkiran devkiran deleted the activity-logs branch February 6, 2026 04:09
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.

2 participants