Skip to content

Format AI payout amounts as USD instead of cents - #4384

Open
pepeladeira wants to merge 1 commit into
mainfrom
fix-ai-payout-cents
Open

Format AI payout amounts as USD instead of cents#4384
pepeladeira wants to merge 1 commit into
mainfrom
fix-ai-payout-cents

Conversation

@pepeladeira

@pepeladeira pepeladeira commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Improvements
    • Partner performance and payout information now displays monetary values as clearly formatted USD amounts.
    • Improved minimum payout formatting by removing unnecessary trailing zeros.
    • Updated payout guidance to ensure preformatted USD values are interpreted correctly.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
dub Ready Ready Preview Aug 21, 2026 7:52pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 028cc67d-595c-4150-bd29-28b5f04d86f6

📥 Commits

Reviewing files that changed from the base of the PR and between 58edd02 and 9a552eb.

📒 Files selected for processing (3)
  • apps/web/lib/ai/build-system-prompt.ts
  • apps/web/lib/ai/create-support-ticket.ts
  • apps/web/lib/ai/get-program-performance.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Program performance monetary fields now return preformatted USD strings. Prompt guidance states that these values must not be converted from cents. Support-ticket metadata uses the same currency formatting.

Changes

Payout value formatting

Layer / File(s) Summary
Format program performance values
apps/web/lib/ai/get-program-performance.ts
The schema and execution mapping now return formatted USD strings for minimum payouts, commission earnings, and payout amounts.
Align payout consumers
apps/web/lib/ai/build-system-prompt.ts, apps/web/lib/ai/create-support-ticket.ts
Prompt guidance identifies performance values as preformatted USD strings. Program minimum payout metadata uses the shared currency formatter.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9a552

This PR formats AI payout amounts as USD instead of cents; no actionable merge-blocking risk remains.

Suggested reviewers: devkiran

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: formatting AI payout amounts as USD strings instead of cents.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ai-payout-cents

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.

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.

1 participant