-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement recurring transactions system with virtual transaction projection #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jwaspin
merged 11 commits into
release/2-1-0
from
copilot/add-recurring-transactions-system
Dec 20, 2025
Merged
feat: implement recurring transactions system with virtual transaction projection #220
jwaspin
merged 11 commits into
release/2-1-0
from
copilot/add-recurring-transactions-system
Dec 20, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n projection - Add recurringTransactions and recurringOccurrences store slices - Add validation schemas for recurring transactions and occurrences - Create RecurringTransactionsPanel sidebar component - Create RecurringTransactionModal for add/edit - Add ActionCell component with Create/Schedule/Complete buttons - Integrate virtual transactions into LedgerTable with 15-month forecast - Implement deduplication via occurrence tracking - Update LedgerHeader to include Action column - Bump version to 2.1.0-rc.1 Co-authored-by: jwaspin <6432180+jwaspin@users.noreply.github.com>
…ove code duplication - Replace HTML td element with MUI TableCell in LedgerRow - Import generateOccurrenceDates from store generators instead of duplicating Co-authored-by: jwaspin <6432180+jwaspin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement recurring transactions management system
feat: implement recurring transactions system with virtual transaction projection
Dec 2, 2025
Deploying lucaledger with
|
| Latest commit: |
b129402
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://766084d2.lucaledger.pages.dev |
| Branch Preview URL: | https://copilot-add-recurring-transa.lucaledger.pages.dev |
Deploying beta-lucaledger with
|
| Latest commit: |
b129402
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2ebd3717.beta-lucaledger.pages.dev |
| Branch Preview URL: | https://copilot-add-recurring-transa.beta-lucaledger.pages.dev |
…der, database, and middleware
…ure years at 2100
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #219
Implements a recurring transactions system that generates virtual transactions projected 15 months into the future, with lifecycle management through Create → Schedule → Complete actions.
Data Model
recurringTransactionId + originalDate → realizedTransactionIdfor deduplicationStore
recurringTransactionsslice: CRUD for recurring rulesrecurringOccurrencesslice: Tracks realized occurrences to prevent duplicate virtual transactionsUI Components
Create(creates Planned transaction)ScheduleCompleteLedger Integration
Screenshots
Recurring Panel in Sidebar

Virtual Transactions in Ledger

Realized Transaction with Schedule Button

Original prompt
This section details on the original issue you should resolve
<issue_title>Recurring Transactions</issue_title>
<issue_description>Overview
Implement a "Recurring Transactions" system that allows users to define schedules for future income and expenses. These rules generate "virtual" transactions in the Ledger view, projecting the account status up to 15 months into the future. Users can interact with these virtual items to instantiate them into real transactions and move them through the standard lifecycle.
Functional Requirements
Location: Add a new sidebar to the Accounts view (similar to the existing Statements sidebar).
Functionality:
List all active recurring transaction rules for the currently selected account.
Provide an interface to Add, Edit, and Delete recurring rules.
Add/Edit Modal: Fields should mirror the existing transaction fields but include frequency settings (Daily, Weekly, Bi-Weekly, Monthly, Yearly) and an optional End Date.
Projection Logic:
The Ledger must calculate and display "virtual" transactions based on active recurring rules.
Forecast Range: Project transactions from Today up to 15 months into the future.
Future Only: Do not generate virtual transactions for dates in the past.
Display & Calculations:
Virtual transactions must be visually integrated into the Ledger table.
Balance: They must be included in the running balance calculations.
Statements: They must be included in statement groupings and dividers.
Deduplication:
A virtual transaction should not be displayed if it has already been "realized" (created) as a real transaction. This check must be performed using the Occurrence Tracking map (see Data Model below).
New UI Element: Add a new column to the LedgerTable, positioned to the right of the Status column.
Button Logic:
Status: Recurring (Virtual): Display button "Create".
Action: Creates a real transaction in the store with status Planned and records the occurrence.
Status: Planned: Display button "Schedule".
Action: Updates transaction status to Scheduled.
Status: Scheduled or Pending: Display button "Complete".
Action: Updates transaction status to Complete.
Status: Complete: Button should be Hidden (or replaced with a static indicator).
Technical Implementation Details
Data Model
RecurringTransaction Schema (New Store Slice)
Stores the rule definition.
Fields: id, accountId, description, amount, categoryId, frequency, startDate, endDate (optional).
RecurringTransactionOccurrence Schema (New Store Slice)
Purpose: Tracks which specific scheduled occurrences have been turned into real transactions. This allows the real transaction to be modified (e.g., date changed by a few days) without the system "forgetting" that the schedule for that month was already met.
Structure: Map or Table linking recurringTransactionId + originalDate → realizedTransactionId.
Cleanup: Implement logic to prune occurrence records for dates that have passed, as virtual transactions are only generated for the future.
Logic Flow
Render Ledger:
Fetch real transactions.
Fetch recurring rules.
Generate list of potential occurrence dates for the next 15 months.
Filter out any dates found in the RecurringTransactionOccurrence store.
Merge remaining "virtual" transactions with real transactions.
Sort by date and calculate running balance.
"Create" Action:
User clicks "Create" on a virtual row (e.g., Rent for Jan 1st).
System creates a new Transaction (Status: Planned).
System creates a RecurringTransactionOccurrence entry: [{ ruleId: 'rent-rule', originalDate: '2025-01-01', realizedId: 'new-tx-uuid' }](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workben...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.