Repository navigation
Conversation
Clearing a name typed in Settings -> Accounts removed the label, but the old name kept showing: the typed name had also been copied into the account's own name (on rename, CSV import and reload), and acctName() fell back to that copy. On the Overview an empty name kept the old one. - An account's name is always its default; typed names live only in State.accountLabels. importParsedCsv() writes the default back; DB.loadAll() no longer copies the label in, and neither does a JSON import (the copy loop in _applyImportedSettings(), v1.16.6, is removed). - acctName() shows the typed name, else defaultAccountName() (new, in core.js), worked out from kind + file, so data saved by older versions shows the default too. - Settings -> Accounts and the Overview cards both save through setAccountName(): an empty name, or the default itself, removes the label; an unchanged name on the Overview saves nothing. - The accounts filter, its tooltip, the import log, the Last import card and the AI summary's account list use acctName(). The summary is unchanged for accounts with no typed name (eval requests identical). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
This was referenced Nov 2, 2026
v1.16.2: Fix Rebuild from your folder clearing everything when the folder has no CSV it can read
#25
Open
…-account-name-reset Carries master's v1.10.3-v1.10.5 up the stack: declined answers (#14), literal single "~" (#15) and the Import Logs race fix (#18), with clarity-insights' port of #14 to the rebuilt AI tab. One conflict: CLAUDE.md's "Last updated" line. Kept this branch's line and added the v1.10.3-v1.10.5 history. The CHANGELOG merged cleanly. Versions stay 1.16.12. renderImportLog() keeps #18's guards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
…) into fix-account-name-reset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z8iBUZo6LRYpLthSp2PRi # Conflicts: # js/views-settings.js
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
Clearing a name you gave an account now brings back its default name:
Bank Checking,Bank Savings,Bank Credit Card (<file>), or the file name. This works in Settings → Accounts and on the Overview cards, and it lasts after a reload and a re-import. Before, the old name kept showing.Cause
State.accountLabels, and it was also copied into the account's ownname:setAccountName(),wireAccountRename());parseCsvFile(); in this stack the account set-up is inimportParsedCsv(), where v1.16.2: Fix Rebuild from your folder clearing everything when the folder has no CSV it can read #25 moved it), which also wrote it to the browser database;DB.loadAll());_applyImportedSettings()copied each imported label intoState.accounts[id].name.acctName()then fell back toaccount.name, which still held the typed name.inp.value.trim() || cur).origin/master(9ba3e79, v1.10.4), both places that rename (the Overview KPI title and the Data tab's "Save Names") treat an empty name as "keep the current name", so a typed name can't be cleared at all. The copy intoaccount.nameinparseCsvFile()andDB.loadAll()is on master too. The Settings → Accounts row that removes the label, and so shows the stale copy, came with v1.16.0 (PR v1.16.0: Clarity redesign, part 4 — Trends, AI Analysis, Settings, Welcome #21).What changed
nameis always its default.importParsedCsv()writes the default back, including to the browser database.DB.loadAll()no longer copies the label in. A name you type lives only inState.accountLabels._applyImportedSettings()that setState.accounts[id].namefrom the imported labels is removed, soaccount.namestays the default there too. Imported names still show at once:acctName()readsState.accountLabels, and the accounts filter is still rebuilt. The CHANGELOG entry and commit message say so.parseCsvFile()intoimportParsedCsv(), so the cherry-pick conflicted there. The chained commit keeps v1.16.2: Fix Rebuild from your folder clearing everything when the folder has no CSV it can read #25's structure and re-applies the change:parseCsvFile()gets the default name fromdefaultAccountName(), andimportParsedCsv()setsnameto it instead of copying the label. Two more conflicts: the Last import card keeps v1.16.2: Fix Rebuild from your folder clearing everything when the folder has no CSV it can read #25's "Not imported" line and showsacctName(); the AI summary's Accounts line keeps v1.16.11: Fix the AI summary sending today's balances for a past date range #34's period-end note and listsacctName().defaultAccountName(a)(new, core.js) works out the default from the account's kind and file.parseCsvFile()uses it.acctName()shows the name you typed, elsedefaultAccountName(). Data saved by older versions, wherenamecan still hold a cleared name, shows the default too.setAccountName(): Settings → Accounts and the Overview cards (double-click, or Enter on a focused name). An empty name, or the default name itself, removes the label.acctName(): the accounts filter and its tooltip, the import log, the Last import card, and the account list in the AI summary (buildFinancialSummary()).accountLabelsto{}, so its requests are byte-identical.Not verified
finlens-state.jsonwas loaded through a stubbed folder handle, not the File System Access API.migrate.jsis unchanged.test-json-export.jspasses on this branch's commit; a JSON import with names wasn't checked beyond it.Automated checks: earlier run, not re-run · 85db2d4
Moved unchanged from this PR's "Test results" comment on 2026-11-04; not re-run, so not in the new table format. Originally a description section titled "How it was tested".
Headless Chromium (Playwright) at 1280×900 against
samples/(257 transactions), with the pinned CDN libraries served from npm, on this branch's final commit85db2d4, chained on #34. Each script ran asNODE_PATH=$(npm root -g) node <script> <repo> <outdir>, from one harness shared by every branch in the stack: the base suites, plus every test added by this PR or by a PR below it (cumulative regression).85db2d4test-clarity.jstest-insights.jstest-finances.jstest-plan.jsboot.jsrace.jsrenderImportLog(the race #18 fixes on master; not in this stack)test-clear-edits.js(from #24)test-rebuild-folder.js(from #25)test-partial-import.js(from #26)test-json-import.js(from #27)test-new-browser-copy.js(from #28)test-json-export.js(from #29)test-plan-links.js(from #30)test-rule-flags.js(from #31, as updated by #32)test-drawer-flags.js(from #32)test-start-balance.js(from #33, as updated by #34)test-ai-summary-period.js(from #34)test-account-names.js(new in this PR)test-insights.js's "General: version line" check reads the version from theindex.htmlfooter, andtest-plan.js's "Budget: Save adds it" accepts a new budget with or without anid, requiring thebud_+ 10 base-36 format once it has one (v1.16.7: Fix transaction links to budgets, buckets and debts pointing at the wrong item after a delete #30 adds ids). Nothing else in the base suites changed.test-rule-flags.jsstopped with a Playwright error ("Clicking the checkbox did not change its state", unticking Bill in the transaction drawer) while two suite runs shared the 2-CPU machine. Three reruns on this commit gave 67/67 each; the table shows the first rerun. The same script passes on every other branch from v1.16.9: Fix the edit drawer freezing a transaction's flags when you only change its category #32 up.Measured before the chain
By the agent that wrote the fix, on
be87cd8(built on70c7125, v1.16.0; then numbered v1.16.8), before the label-copy loop and the conflicts above.Headless Chromium (Playwright) at 1280px, against
samples/, in light and dark. CDNs are blocked in the sandbox, so the harness serves the pinned libraries from npm.New test,
test-account-names.js(40 checks):finlens-state.json, through a stubbed folder handle). It reads the name from the Overview card, the Settings field, the accounts filter, Settings → Credit cards and the AI summary.70c7125(base): 18/40. The 22 failures (11 per theme) are the bug:Existing suites on this branch (
run-all.sh), the same counts as on base:70c7125test-clarity.jstest-finances.jstest-plan.jstest-insights.jsboot.jsrace.jsrace.jserrors: all of them arerenderImportLog/importLogsBody(Cannot set properties of null), which PR v1.10.5: fix Import Logs throwing when the view is left before it loads #18 fixes. None come from this change.AI summary:
probe-evalsum.jshashes the AI Eval sandbox summary and the live summary after importing the samples. Both hashes are identical on base and on this branch.How to reproduce the bug
Run this on the base branch,
fix-ai-summary-period-balances(#34). Master has it in its own form: there an empty name keeps the current name, so a typed name can't be cleared at all.fix-ai-summary-period-balancesinstead offix-account-name-reset.Main checking. Press Tab.What goes wrong: the field goes blank, but the Overview card and the Accounts list still show Main checking instead of Bank Checking. It comes back after F5 and Reload CSVs too.
Manual QA steps
Setup
samples/into a new scratch folder (for exampleFinLens-test-35). Do not use your real folder: this PR changes what import and reload save for account names.git checkout fix-account-name-reset, then openindex.htmlin Edge.RESETand click Erase and start over.The default names on the samples are Bank Checking, Bank Savings and Bank Credit Card (credit_card_sample).
1. Clearing a name in Settings → Accounts brings the default back (the main fix)
Main checking. Press Tab.Expected:
Bank Checking.Before this fix: the field went blank and every screen kept showing Main checking.
2. Clearing a name on the Overview card
Rainy dayand press Enter.Expected:
Before this fix: an empty name kept Rainy day.
3. A typed name you keep survives a reload and a re-import (regression)
Visa. Press Tab.Expected:
4. A cleared name stays cleared after a reload and a re-import
index.htmlin a new tab, and click Reconnect folder in Settings → Import if asked.Expected:
finlens_db→accounts: the card'snameisBank Credit Card (credit_card_sample).Before this fix: Visa came back after a reload or re-import, and the IndexedDB
accountsrow keptVisa.5. Small cases in the rename
Bank Checkingexactly (the default) and press Tab.Test, press Escape.file://→finlens_accountLabels.Expected:
finlens_accountLabelshas nobank_checkingentry.6. The AI summary uses the shown name
Rainy day.buildFinancialSummary(). Read line 2.Expected:
Rainy day (…), thenBank Savings (…)after clearing.7. Data saved by an older version shows the default
git checkout fix-ai-summary-period-balances(the base branch). Press F5.Old name, press Tab. Then clear it and press Tab. It still shows Old name (the bug).finlens-state.jsonis saved.git checkout fix-account-name-reset. Press F5.Expected:
8. JSON import with names
Rainy day. Go to Settings → Data & reset and click Export JSON.Expected:
Please check before merging
account.namealways holds the default, and typed names live only inState.accountLabels.State.accounts[id].name, done here as part of this fix, is what you want.https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
Generated by Claude Code