Repository navigation
Conversation
Only a pair of legs is a transfer. A one-sided keyword match (a Zelle payment to a person) counts as spending or income, as "Money sent" / "Money received" when it has no better category. In samples/ this restores $230.00 of spending and the remaining transfers net to $0.00. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
They still count as spending or income, but each waits for an answer: Transfers -> To review lists them (Keep as spending/income, It's a transfer, Keep all), the Transfers pill shows the count and Transactions flags each row. The flag is worked out, never stored; answers are edits (type, or reviewed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
4 tasks
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
Bug: a transfer keyword alone (Zelle, ACH, Venmo, PayPal, "transfer"…) made a transaction a transfer even when it had no other leg. A transfer is left out of income and spending, so money sent to or received from other people went missing from your totals.
Cause:
detectTransfers()pass 2 (core.js) marked every unmatched keyword match as a transfer. A transfer only nets to zero when both legs are in your accounts. One leg alone is money that actually left (or arrived).Found by: the new browser test (#55). The 30 sample transfers netted to −$230.00. All of it was six
ZELLE TO M TORRESpayments (May–Oct, $25–$60 each).Fix (the option you chose: count as spending):
isSentReceived()→ownCategories()) before detecting again.Flagged for review (added in the second commit, your request)
Counting a one-sided match as spending or income is a guess, so each one also waits for your answer:
reviewed: truein the edit, so it isn't asked again. A type you set in the drawer answers it too; changing only the category doesn't.needsTransferReview()), so it survives a boot fromfinlens-state.json, which doesn't re-run detection. Clear transaction edits removes the answers, so the rows are asked about again.Version: v1.18.2 (both commits).
Effect on the samples
Finance trade-offs to be aware of
Related finding (not fixed here, one change per PR)
Keywords match anywhere in a word:
achmatches "BEACH", "COACH" and "TEACHER". Before this PR, a one-sided "BEACH CAFE" charge was a transfer and hidden from spending. After it, the only effect left is that such a row can pair with a matching opposite amount 2 days apart instead of 1, which is unlikely. A whole-word match would be its own small PR.AI Analysis — eval needs a re-run
The AI summary's spending, categories and monthly trend change with these payments. So
docs/EVAL.mdno longer matches the summary FinLens sends: the eval sandbox now sends "Spending: $17,025.07". Re-run the eval with your API key (showView('ai-eval')) and publish it per CLAUDE.md §21 before trusting its numbers. I couldn't run it, since it needs your key. The sample files are unchanged, so their hashes still verify.How it was tested (headless Chromium 153, locally)
smoke.cjs, run on this branch): 14 passed, 0 failed, only the known "-$0.00" bug. Every view renders with no errors, with and without data (25 views).debitwith Money sent, and the 24 remaining transfers net to $0.00.zellekeyword: they go back to their own category (Transfer label, debit). Adding it back: Money sent again.zellekeyword: the answers stay (still 0).How to reproduce the bug
Run this on the base branch,
add-mit-license.add-mit-licenseand openindex.htmlin Edge or Chrome.ZELLE TO M TORRESrows.What goes wrong:
ZELLE TO M TORRESpayments ($25–$60 each, May–Oct) are listed as transfers, though they have no other leg in your accounts.Manual testing (step by step)
index.htmlin Edge or Chrome.ZELLE TO M TORRESrows shouldn't be there. Read the note under Transfer keywords: it explains the new rule.Please check before merging
https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
Generated by Claude Code