Skip to content

feat: Link Amazon orders to Monarch transactions in info modal#59

Merged
wesm merged 3 commits intomainfrom
feature/amazon-txn-linking
Dec 15, 2025
Merged

feat: Link Amazon orders to Monarch transactions in info modal#59
wesm merged 3 commits intomainfrom
feature/amazon-txn-linking

Conversation

@wesm
Copy link
Owner

@wesm wesm commented Dec 15, 2025

When viewing a Monarch/YNAB transaction with an Amazon-like merchant name (contains "amazon" or "amzn"), pressing "I" now searches local Amazon profile databases for matching orders by amount and date.

Features:

  • New AmazonLinker service to find and match Amazon orders
  • Matches by order total (sum of items) within $0.02 tolerance
  • Matches by date within 7 days of transaction date
  • Shows matched orders at top of transaction detail modal
  • Displays order ID, date, items with quantities, and totals
  • Shows "No matching orders found" when searched but no matches

Bug fix:

  • Fixed Amazon mode failing with "encryption key not set" error
  • Cache manager now only created when encryption key is available

Tests (30 new tests):

  • AmazonLinker matching logic and edge cases
  • TransactionDetailScreen with Amazon matches
  • Regression tests for Amazon mode without encryption

🤖 Generated with Claude Code

wesm and others added 3 commits December 15, 2025 12:42
When viewing a Monarch/YNAB transaction with an Amazon-like merchant name
(contains "amazon" or "amzn"), pressing "I" now searches local Amazon
profile databases for matching orders by amount and date.

Features:
- New AmazonLinker service to find and match Amazon orders
- Matches by order total (sum of items) within $0.02 tolerance
- Matches by date within 7 days of transaction date
- Shows matched orders at top of transaction detail modal
- Displays order ID, date, items with quantities, and totals
- Shows "No matching orders found" when searched but no matches

Bug fix:
- Fixed Amazon mode failing with "encryption key not set" error
- Cache manager now only created when encryption key is available

Tests (30 new tests):
- AmazonLinker matching logic and edge cases
- TransactionDetailScreen with Amazon matches
- Regression tests for Amazon mode without encryption

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix ruff formatting issues in test_amazon_linker.py
- Add rule: AI must NEVER amend commits unless explicitly asked

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the new feature that links Monarch/YNAB transactions
to Amazon orders when pressing 'i' (Info) on Amazon-like merchants.
Includes matching criteria, example output, and requirements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@wesm wesm force-pushed the feature/amazon-txn-linking branch from 1416e2a to ab693d2 Compare December 15, 2025 18:46
@wesm wesm merged commit eec021c into main Dec 15, 2025
9 checks passed
@wesm wesm deleted the feature/amazon-txn-linking branch December 15, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant