✨ server: add card and installment position to activity#1154
Conversation
🦋 Changeset detectedLatest commit: 76a9dc4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe activity API now propagates card metadata, adds installment position and amount fields, tightens cryptomate maturity handling, derives PDF statement installments from normalized activity data, and adds related API coverage. ChangesActivity enrichment
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ActivityEndpoint
participant ActivityTransformers
participant PDFStatement
Client->>ActivityEndpoint: request activity or PDF statement
ActivityEndpoint->>ActivityTransformers: parse purchase transactions
ActivityTransformers-->>ActivityEndpoint: normalized activity with card metadata and installments
ActivityEndpoint->>PDFStatement: aggregate installments by card
PDFStatement-->>Client: activity response or PDF statement
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds cardId and lastFour properties to card activity responses (both for Panda and Cryptomate activities) and introduces a 1-based current index to track installment positions. It also updates the test suite to validate these new fields. The reviewer suggests a refactoring opportunity to simplify the PDF generation logic later in server/api/activity.ts by directly accessing cardId and lastFour from the activity items, which would allow removing the cardLookup map.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1154 +/- ##
==========================================
+ Coverage 72.95% 73.27% +0.31%
==========================================
Files 254 254
Lines 10753 10839 +86
Branches 3561 3598 +37
==========================================
+ Hits 7845 7942 +97
+ Misses 2624 2613 -11
Partials 284 284
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c3522076-3479-488d-9b3a-10c4cea16493
📒 Files selected for processing (3)
.changeset/plain-otters-group.mdserver/api/activity.tsserver/test/api/activity.test.ts
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9e61d978-a141-4172-b32d-0ebcd33e0454
📒 Files selected for processing (3)
.changeset/plain-otters-group.mdserver/api/activity.tsserver/test/api/activity.test.ts
Summary by CodeRabbit