fix: use transactionsHub endpoint so re-categorizations appear in CSV…#9
Open
CarterDunn wants to merge 1 commit into
Open
fix: use transactionsHub endpoint so re-categorizations appear in CSV…#9CarterDunn wants to merge 1 commit into
CarterDunn wants to merge 1 commit into
Conversation
… export GetTransactionsList returns stale categories - it serves Credit Karma's ML-inferred defaults and ignores any manual re-categorizations made in the CK UI. Verified with a raw API dump: the same transaction URN returned Transfer from the list endpoint and the user-corrected category from the hub endpoint. Changes: - content.js: fetchTransactionsViaAPI() now uses fetchHistoricalTransactions() (transactionsHub/GetTransactions - same endpoint CK's own page uses) as primary source for the full date range. fetchRecentTransactions() (list endpoint) demoted to fallback with a console warning. Page delay reduced 800ms to 400ms to partially offset slower pagination. - popup.js: Added sendMessageWithInjection() - auto-injects content.js if the content script is stale/missing, then retries. Eliminates most cases of the reload-the-page connection error. Added debug button handler. - popup.html: Added Debug Export Raw API JSON button that dumps raw responses from both GraphQL endpoints for diagnosing future issues.
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.
Problem
GetTransactionsList(the fast bulk endpoint) returns stale categories — it serves Credit Karma's ML-inferred defaults and ignores any manual re-categorizations made in the CK UI.Verified with a raw API dump: the same transaction URN returned
"Transfer"from the list endpoint and"Travel & vacation"(the user's actual re-categorization) from the hub endpoint. The two endpoints returned differentcategory.namevalues for the same transaction ID.Fix
content.js—fetchTransactionsViaAPI()now usesfetchHistoricalTransactions()(thetransactionsHub/GetTransactionsendpoint — the same one CK's own transactions page uses) as primary source for the full date range.fetchRecentTransactions()(list endpoint) is demoted to a fallback with a console warning if the hub returns nothing.popup.js— AddedsendMessageWithInjection(): if the content script doesn't respond (page was open before the extension was installed/reloaded), it auto-injectscontent.jsthen retries. Eliminates the "make sure you are on Credit Karma and reload" error for most users.popup.html— Added a "🔧 Debug: Export Raw API JSON" button that dumps raw responses from both GraphQL endpoints to a.jsonfile — useful for diagnosing future category or field issues without reading network logs.Trade-offs
Testing
Confirmed a known re-categorized transaction exports with the correct user-set category rather than the ML-inferred default.