Skip to content

[WIP] Fix incorrect category display in report for same merchant names#8

Merged
terryaney merged 2 commits into
issue/88-merchant-category-displayfrom
copilot/fix-category-display-report
Apr 25, 2026
Merged

[WIP] Fix incorrect category display in report for same merchant names#8
terryaney merged 2 commits into
issue/88-merchant-category-displayfrom
copilot/fix-category-display-report

Conversation

Copilot AI commented Apr 24, 2026

Copy link
Copy Markdown
  • Fix analyze_transactions to use (merchant, category, subcategory) composite key in by_merchant, store name in data dict
  • Update classify_by_sections to use data.get('name', '') instead of tuple key for merchant name
  • Update export_json, export_markdown, export_csv, print_summary in analyzer.py to use data.get('name', '') for display
  • Update report.py build_section_merchants to use data.get('name', merchant_key) for display name and composite ID for uniqueness; update build_category_view
  • Update explain.py to search by_merchant by data['name'] instead of dict key; update _print_classification_summary and _print_explain_summary
  • Add tests for same-merchant-name-different-category behavior
  • Run tests to validate fix

Agent-Logs-Url: https://github.com/terryaney/OpenSource.tally/sessions/89caf5f7-59df-4bb4-b1bc-5fe0f382feff

Co-authored-by: terryaney <6237247+terryaney@users.noreply.github.com>
@terryaney

Copy link
Copy Markdown
Owner

@copilot What am I supposed to do next? The code looks ok. I want to test it, but you also threw a rate limiting exception so I'm not sure if you are done or not.

@terryaney terryaney merged commit 86110da into issue/88-merchant-category-display Apr 25, 2026
0 of 3 checks passed
@terryaney terryaney deleted the copilot/fix-category-display-report branch April 28, 2026 17:03
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.

Same merchant name with different categories causes incorrect category display in report

2 participants