Modify EditCard page to:
- Accept optional accountId parameter to pre-select account for new cards
- Redirect to AccountDetails page after save (if card has linked account)
- Update navigation to go back to Accounts instead of Cards page
This integrates card management into the account-centric workflow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Make account rows clickable and add View button to navigate to the new AccountDetails page where users can see account info and manage linked cards.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Create a new AccountDetails page that shows account information and all linked cards. This replaces the standalone Cards page and nests card management under accounts, as cards are always linked to accounts.
Features:
- View account details (institution, type, owner, etc.)
- List all cards linked to the account
- Add new cards directly from the account page
- Edit and delete cards within the account context
- Click-through navigation from Accounts list
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Optimize duplicate detection to only query existing transactions within the date range of the uploaded CSV file (plus 1-day buffer). This prevents loading the entire transaction history into memory when checking duplicates.
For example, uploading 2800 transactions from Jan-Mar 2024 will now only load existing transactions from that period rather than all historical transactions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extend session IOTimeout to 5 minutes to accommodate serialization and storage of large transaction preview datasets (e.g., 2800+ transactions).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
When uploading files with more than 100 transactions, the preview now displays transactions in pages of 100 rows at a time. This prevents browser freezing when rendering thousands of form inputs and dramatically improves page load performance.
- Show first 100 transactions by default with pagination controls
- All transactions remain in DOM but hidden for instant page switching
- Update counters and form submission to work across all pages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Improve performance when uploading thousands of transactions by loading all existing transactions into memory once for duplicate detection, rather than running individual database queries for each transaction. This reduces database calls from O(n) to O(1) for n transactions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated EditTransaction to handle account selection and card filtering
- Added Transfers link to navigation menu
- Updated Transactions page to properly display account labels
- Refined Upload preview UI for account/card selection
These changes support the new account-centric model where every
transaction belongs to an account and optionally uses a card.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added TransferToAccountId to Transaction model for linking transfers
- Created CreateTransfer page for recording account-to-account transfers
- Migration adds the new foreign key relationship
- Transfers are created as paired transactions (debit and credit)
This enables tracking of money movement between bank accounts while
maintaining proper accounting with matching transaction pairs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed Transaction.AccountId from optional to required, reflecting that
every transaction must belong to an account (the source of the CSV file).
Cards remain optional as they represent the payment method used.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added account linking functionality to cards with dropdown selector
- Added optional nickname field for easier card identification
- Updated Cards list page to show linked accounts with badges
- Reorganized card display to show issuer and last4 together
- Include account relationship when loading cards
This allows cards to be properly associated with their bank accounts,
which is essential for the transaction import and categorization flow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Condensed the verbose payment method labels to show only the essential
information:
- Card transactions: Show just the card name (e.g., "AJ's Debit Card")
- Direct account transactions: Show just the account name
- Transfers: Show "Transfer → [Destination]"
Removed duplicate display of account information since cards are
already linked to accounts. This makes the Payment/Account column
much less crowded and easier to read.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed the card resolution logic to check transaction memos first
before falling back to the CSV filename. This enables per-transaction
card detection when account CSVs contain card identifiers in memos
(e.g., "usbank.com.2765").
Also prioritize card matches over account matches in TryResolveByLast4
to ensure cards are correctly identified even when they share the same
last4 digits as their linked account.
This fixes the issue where card dropdowns showed "none / direct debit"
even when card information was present in transaction memos.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added automatic seeding of default category mappings to ensure the
transaction categorizer has patterns to match against. This fixes the
issue where all transactions appeared as uncategorized during preview
because the CategoryMappings table was empty.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Model Changes:
- Add Card.AccountId (nullable FK to Account)
- Add Card.Nickname field for friendly names
- Add Card.DisplayLabel computed property
- Add Account.Cards navigation property
- Add Account.DisplayLabel computed property
DbContext Updates:
- Configure Card → Account relationship (optional, restrict delete)
- Add index on Card.AccountId
- Set Card.Owner as required
Migration:
- Add LinkCardsToAccounts migration
- Adds AccountId and Nickname columns to Cards table
- Creates FK constraint from Cards to Accounts
This properly models the real-world relationship where payment cards
are linked to bank accounts (e.g., a Visa card draws from a checking
account, or a credit card is paid from a savings account).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Schema Changes:
- Add Account model (Institution, AccountType enum, Last4, Owner, Nickname)
- Add Transfer model for tracking money movement between accounts
- Update Transaction to support both CardId and AccountId (nullable FKs)
- Rename Transaction.CardLast4 → Last4 (works for both cards and accounts)
- Add PaymentMethodLabel computed property to Transaction
- Create EF Core migration: SplitCardsAndAccounts
Data Model Improvements:
- Accounts: Checking, Savings, Other types
- Transfers: Source/Destination accounts, optional link to original transaction
- Transactions can now link to either a Card OR an Account
- Transfer categories excluded from spending reports via TransactionFilters
UI Pages:
- Add Accounts.cshtml - List all bank accounts with transaction counts
- Add EditAccount.cshtml - Create/edit bank accounts
- Add Accounts link to navigation
- Update all references from CardLast4 to Last4
Service Layer Updates:
- Update CardResolutionResult to use nullable CardId and renamed Last4
- Update TransactionKey record to include AccountId
- Update IsDuplicate check to include both CardId and AccountId
- Update all PaymentMethodLabel usage across pages
This architecture allows proper separation of credit cards from bank
accounts and enables tracking of transfers between accounts without
double-counting in spending reports.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Transaction Filtering:
- Add TransactionFilters helper class to exclude transfer categories from spending reports
- Exclude "Credit Card Payment" and "Banking" categories from dashboard top spending
- Add ExcludeTransfers() extension method for reusable filtering
- Update dashboard header to indicate transfers are excluded
Category Mappings Refactor:
- Split form models into separate AddMappingModel and UpdateMappingModel
- Remove [BindProperty] attributes and use parameter binding instead
- Eliminate cross-validation issues between add/edit forms
- Simplify validation logic by removing manual ModelState cleanup
This fixes the issue where credit card payments were counted as spending
even though they're just transfers between accounts, causing inflated
spending totals on the dashboard.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Features added:
- Cards page with list/create/edit/delete functionality
- EditCard page for modifying card details
- Enhanced CategoryMappings UI with inline add/edit/delete modals
- Category dropdown autocomplete in mapping forms
- Priority badges and visual indicators for high-priority mappings
- Click-to-edit functionality on patterns
Improvements:
- TransactionCategorizer: Add TARGET.COM to online shopping patterns
- TransactionCategorizer: Set Credit Card Payment to priority 200 to catch before Banking
- TransactionCategorizer: Add database migration comments
- Layout: Add Cards link to navigation
- Layout: Fix Bootstrap JS path
- ValidationScriptsPartial: Use Url.Content for script paths
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Created AGENTS.md with detailed documentation covering:
- Project overview and technology stack
- Architecture patterns and service layer design
- Complete domain model documentation
- Service implementations (TransactionImporter, CardResolver, TransactionCategorizer, DashboardService, ReceiptManager, OpenAIReceiptParser)
- Database schema and EF Core configuration
- Key workflows and design patterns
- Security considerations and performance optimizations
- Testing strategies and deployment guidance
Removed unused Privacy.cshtml and Privacy.cshtml.cs pages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>