feat: add RIP tracking#20
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 12 minutes and 33 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
This PR adds a new “RIP” (Request for Improvement Proposal) tracking feature and integrates RIP linking into the existing ledger-entry classification flow so RIP-related spend can be tracked and surfaced in the UI.
Changes:
- Introduces a new
ripstable and linksledger_entriesto RIPs vialedger_entries.rip_id, plus a newledger_categoryvaluerip_expense. - Adds backend helpers and server actions to create/update/delete RIPs, plus listing APIs for RIP options and RIP spend totals.
- Updates admin transaction classification UI/logic to select and display RIP links for
rip_expense, and adds a member-facing/ripspage + nav entry.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/lib/transaction-classification.ts | Extends classification options and views to include ripId and RIP option lists. |
| src/lib/rips.ts | Adds RIP listing, totals aggregation, and RIP existence validation. |
| src/db/schema.ts | Adds rips table, ledger_entries.rip_id, indexes, and rip_expense category. |
| src/app/rips/page.tsx | Implements the member-facing RIP tracking page and UI for editing/deleting. |
| src/app/rips/actions.ts | Adds server actions for creating/updating/deleting RIPs with validation and audit logging. |
| src/app/page.tsx | Adds a “RIPs” navigation link for members. |
| src/app/admin/quarters/[id]/transactions/page.tsx | Adds RIP selection to classification form and displays linked RIPs on cards. |
| src/app/admin/quarters/[id]/transactions/actions.ts | Enforces RIP requirements for rip_expense and validates RIP availability when classifying. |
| drizzle/meta/0014_snapshot.json | Updates Drizzle snapshot metadata for the new schema. |
| drizzle/meta/_journal.json | Records the new migration in Drizzle’s migration journal. |
| drizzle/0014_freezing_peter_quill.sql | Adds SQL migration for enum value, rips table, and ledger_entries.rip_id FK/index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a new "RIP" (Request for Improvement Proposal) feature, integrating it into the ledger and transaction classification workflows. It includes database schema changes, backend logic for creating, updating, and deleting RIPs, and UI updates to support linking ledger entries to RIPs.
Database and Backend Enhancements:
ripstable with encrypted fields, indexes, and a foreign key fromledger_entriesto support linking transactions to RIPs. Also introduced a new ledger categoryrip_expense.Transaction Classification and Validation:
rip_expensetransactions, with validation to ensure a RIP is provided and available. (src/app/admin/quarters/[id]/transactions/actions.tsR36, src/app/admin/quarters/[id]/transactions/actions.tsR448, src/app/admin/quarters/[id]/transactions/actions.tsR469, src/app/admin/quarters/[id]/transactions/actions.tsR488-R504, src/app/admin/quarters/[id]/transactions/actions.tsR516, src/app/admin/quarters/[id]/transactions/actions.tsR556)User Interface Updates:
RipSelectcomponent and UI fields to select or display linked RIPs in the transaction classification form and transaction/ledger entry cards. Linked RIPs are shown as clickable links. (src/app/admin/quarters/[id]/transactions/page.tsxR271-R293, src/app/admin/quarters/[id]/transactions/page.tsxR445-R454, src/app/admin/quarters/[id]/transactions/page.tsxR495, src/app/admin/quarters/[id]/transactions/page.tsxR546-R558, src/app/admin/quarters/[id]/transactions/page.tsxR724, src/app/admin/quarters/[id]/transactions/page.tsxR771-R783)/ripspage for members.Migration and Metadata:
ripstable and related schema changes. [1] [2]