Conversation
Amazon mode now uses categories from config.yaml (fetched from Monarch/YNAB) when available, instead of always using built-in defaults. Changes: - AmazonBackend.__init__() accepts config_dir parameter - AmazonBackend.get_transaction_categories() uses get_effective_category_groups() - AmazonBackend.update_transaction() uses get_effective_category_groups() - CLI passes --config-dir to launch_amazon_mode() - launch_amazon_mode() passes config_dir to AmazonBackend Fixed misleading comments: - categories.py: Clarified NOT a merge (one or the other) - amazon.py: Clarified priority order (config.yaml > defaults) - cli.py: Fixed categories_dump docstring This allows Amazon mode to use the same category structure as your primary backend (Monarch/YNAB) when config.yaml exists. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
… settings Problem: Amazon mode was using built-in defaults instead of categories from config.yaml. Also, custom category settings in categories.yaml were not being migrated to config.yaml, causing them to be lost. Changes: 1. Amazon mode now uses config.yaml categories: - AmazonBackend accepts config_dir parameter - Uses get_effective_category_groups() instead of DEFAULT_CATEGORY_GROUPS - CLI passes --config-dir to Amazon mode 2. Auto-migrate legacy categories.yaml to config.yaml: - save_categories_to_config() now checks for categories.yaml - Migrates custom settings (rename_groups, add_to_groups, etc.) - Only migrates if not already in config.yaml 3. Fixed misleading comments: - Clarified get_effective_category_groups() is NOT a merge - Updated docstrings to be explicit about priority (config.yaml > defaults) This ensures Amazon mode uses the same category structure as your primary backend, and custom category settings are preserved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ation file Removed all legacy categories.yaml support per user request: - categories.yaml is deprecated, no migration path needed - config.yaml is the only way to configure categories - Amazon mode reads from config.yaml but never writes to it Changes: - categories.py: Removed legacy categories.yaml loading from load_custom_categories() - categories.py: Removed legacy migration code from save_categories_to_config() - cli.py: Removed legacy_path checks and references - data_manager.py: Updated docstrings to remove categories.yaml mentions - docs/config/advanced.md: Removed backward compatibility note - tests: Removed test_loads_legacy_categories_yaml and test_prefers_config_yaml_over_legacy - tests: All AmazonBackend tests now use temp_config_dir to isolate from user's real config Amazon mode behavior: - Reads categories from config.yaml (fetched_categories section) - Falls back to built-in defaults if config.yaml doesn't exist - NEVER writes to config.yaml All 893 tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ackend behavior Changes: - Removed incorrect "custom_categories" section (doesn't exist in code) - Added correct "categories" section format (rename_groups, add_to_groups, etc.) - Clearly documented which backends write vs read config.yaml: - Monarch/YNAB: Write fetched_categories on every startup - Amazon/Demo: Only read, never write - Clarified customizations are applied ON TOP of fetched_categories (merge) - Removed confusing "(Legacy)" label from Advanced section config.yaml is now the only configuration file. No categories.yaml support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Updated "Technical Details" to explicitly document: Step 1: Base categories (one or the other, NOT merged) - fetched_categories from config.yaml - OR built-in defaults Step 2: Custom overrides (merged on top of base) - categories section from config.yaml - Applied via rename_groups, add_to_groups, etc. This clarifies the distinction between fetched_categories (replaced) and custom overrides (overlaid). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added blank lines before lists to satisfy MD032 rule. All markdown checks now pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Deploying moneyflow with
|
| Latest commit: |
a95d667
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://143c62e2.moneyflow-6wi.pages.dev |
| Branch Preview URL: | https://fix-amazon-mode-categories.moneyflow-6wi.pages.dev |
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.
I ran into some minor issues when loading up Amazon mode that arose from recent changes. This normalizes behavior and makes sure that if you have synced Monarch or YNAB categories to config.yaml, that these will be used for categorization in Amazon mode, rather than the default/built-in categories which may be more limited.