Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces support for importing pending Monzo transactions (those with amount != 0 but settled = null) alongside settled ones, while keeping them excluded from report totals until they settle.
Changes:
- Domain/repository logic: Pending Monzo transactions are now imported with
postedAt = null; asettledOrNonMonzofilter (source != 'monzo' OR posted_at IS NOT NULL) is applied to all three report aggregates (monthly trends, category breakdown, monthly ledger); a newlistPendingMonzoInRangerepository method powers a reconciliation loop that deletes pending rows disappearing from the sync window. - UI updates: A
Pendingchip is shown in the Expenses list for Monzo rows withpostedAt = null; a clarification note is added below the Monthly Ledger card header. - Test and docs updates: New domain integration tests cover pending-to-settled settlement, disappearing-pending deletion, and report exclusion; PWA E2E tests cover the badge and ledger notice; AGENTS.md and README.md are updated to document the new behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/domain/src/services/monzo.service.ts |
Removes the isPendingTransaction filter so pending rows are imported; adds fetchedTransactionIds set and a reconciliation loop to delete pending rows missing from the window |
packages/domain/src/repositories/expenses.repository.ts |
Adds listPendingMonzoInRange method and interface for pending-row reconciliation |
packages/domain/src/repositories/reports.repository.ts |
Applies settledOrNonMonzo filter to monthlyTrends, categoryBreakdown, and monthlyLedger queries |
apps/pwa/src/pages/ExpensesPage.tsx |
Renders a warning Chip labeled "Pending" for Monzo rows where postedAt === null |
apps/pwa/src/features/home/components/MonthlyLedgerCard.tsx |
Adds a caption noting that pending Monzo transactions are excluded from totals |
tests/domain/monzo.spec.ts |
Adds test cases for pending import, settlement update, deletion reconciliation, and report exclusion |
tests/pwa/mobile.spec.ts |
Updates E2E test to verify the Pending badge and ledger disclaimer text |
README.md |
Documents the new pending import policy and report exclusion behavior |
AGENTS.md |
Documents the pending import, reconciliation, and report exclusion behaviors |
.agents/notes.md |
Increments version counter on the pnpm test targeting note |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
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.
Summary
Validation