Skip to content

v1.16.27: Minor fixes — Rebuild button label, account arrow labels, range label on developer views, stale wording - #50

Open
gitluis wants to merge 2 commits into
fix-retyped-transfer-still-countedfrom
minor-ui-wording-fixes
Open

gitluis wants to merge 2 commits into
fix-retyped-transfer-still-countedfrom
minor-ui-wording-fixes

Conversation

@gitluis

@gitluis gitluis commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #49 (fix-retyped-transfer-still-counted). Merge order: #16, #17, #19, #20, #21, #24–#38, #39–#50, then #10, then #23.
These fixes don't use any earlier fix's code; they are stacked only so versions and the CHANGELOG merge cleanly.

Summary

This PR groups four minor fixes into one branch and one commit, as CLAUDE.md §0 allows for minor changes. None of them changes what an action does or what data is stored.

  • Data & reset: after Rebuild from your folder, the button now reads "Rebuilt", like the other actions show "Cleared".
  • Settings → Accounts: after a rename, the ▲▼ arrows' screen-reader labels use the new name straight away.
  • Developer views: the date-range label no longer shows under their title.
  • Wording: stale "data tab" and "Data & Reset" in code comments and CLAUDE.md.

Version v1.16.27 (§17): CHANGELOG.md, index.html footer, README (badge and footer), views-settings.js, and CLAUDE.md §1 and "Last updated".

What changed

1. Rebuild button label (js/views-cleanup.js)

  • Symptom: after a successful Rebuild, the button read "Rebuild" instead of "Rebuilt".
  • Cause (confirmed): the click handler sets DataCleanup.lastDone, and the next render of the tab uses it up. Rebuild's import renders the tab twice partway through: once in loadFiles() and once in reloadFromDirHandle(). The first of those renders used up lastDone, so the final render from _done() showed the button as if nothing had run. On ecfcab2 the button went "Rebuilt" (disabled, before the import had finished), then "Rebuild" (enabled, while the backup file was still being written), then "Rebuild".
  • Fix: DataCleanup.running names the action under way, and _done() clears it. While it's set, a render shows that button as "Working…", disabled, and leaves lastDone alone. The click handler's finally also clears running, in case an action ever returns without _done().
  • Other actions: none of them renders partway through, so they already showed "Cleared". They behave as before.
  • Unchanged: what Rebuild does, its messages and its checks.

2. Account order arrows (js/views-data.js)

  • Symptom: after renaming an account in Settings → Accounts, its arrows kept aria-label="Move <old name> up" / "… down" until the tab rendered again.
  • Cause (confirmed): the labels are set when the tab renders. Saving a name (setAccountName()) doesn't render it.
  • Fix: the name field's change handler sets the row's two arrow labels to the name now shown. It uses setAttribute, so quotes, < and & come out exactly as a render gives them. Clearing the name brings back the default name, in the field and in the labels.

3. Range label on developer views (js/ui.js)

  • Confirmed for each view: db-inspector, db-schema, changelog, ai-eval and db-logs all showed the range (for example "This Month") under their title. None of them reads the range: no filteredTx(), State.range or describeRange(), and the AI Eval works on the samples in its own All time sandbox.
  • Fix: all five are added to NO_RANGE_VIEWS, next to the Plan screens, Trends and Settings.
  • db-tools: this view doesn't exist on this base, so it isn't added.
  • CLAUDE.md §9 and §12 list the developer views. §12 also says a new view that ignores the range goes in that list.

4. Stale wording

  • js/init.js:
    • "File pickers → data tab" now says Settings → Import (handleFilePick()).
    • "mark so Data tab can show reconnect UI" now says that Settings → Import shows Reconnect.
  • "Data & Reset" → "Data & reset" (the tab's name) in comments in core.js, db.js, init.js, migrate.js, views-cleanup.js and views-data.js, and in CLAUDE.md §14.
  • CLAUDE.md §20: one new rule describes DataCleanup.running. It's in-memory UI state, so §20's storage table doesn't change.

Not changed

  • Item 5, the running-balance branch in periodEndBalance() (js/aggregation.js):
    • It is dead code. The t.balance != null branch never runs, because mkTx() and reconstituteTx() always set balance: null (§4.2).
    • Left out on purpose: another PR is changing periodEndBalance()'s override logic, and removing the branch here would conflict with it.
    • currentBalances() has the same dead branch (the withBal lookup). It's left too, so the three balance helpers stay on one rule (§18). Both can go in one follow-up after that PR merges.
  • Past history stays as written: earlier CHANGELOG entries, docs/archive/, docs/eval-runs/, and the version history inside CLAUDE.md's "Last updated" line, where "Data & Reset" was the tab's name at v1.9.0 and v1.13.0.
  • "Disconnected" never shows on Disconnect folder. Without a folder, the Disconnect and Rebuild rows are removed, so the row isn't there after the action. Its message still says what happened. That was already the case and isn't a bug, so it isn't changed.
  • The functions other PRs are changing weren't touched: the transaction drawer's Save, Settings → Import "Read as", the JSON import, periodEndBalance() and buildFinancialSummary().

Not verified

  • Real browsers: not tried in Edge or Chrome with a real folder. The folder is a fake FileSystemDirectoryHandle, as in the other suites.
  • Screen readers: the new arrow labels were read from the DOM, not with a screen reader.
  • Phone layouts: not checked, per the desktop-only decision.
Automated checks: earlier run, not re-run · d0c3382

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".

Light checks, by Luis's call to save usage: on this branch's final commit d0c3382 (chained on #49) only boot.js, race.js and this PR's own tests ran. Headless Chromium at 1280×900 against samples/, with the pinned CDN libraries served from npm; each script ran as NODE_PATH=$(npm root -g) node <script> <repo> <outdir>.

Script Result on d0c3382
boot.js 257 transactions, 24 views, 0 errors
race.js 24 views, 0 errors
test-minor-fixes.js (new in this PR) 35/35

Full set, once, on the top of the stack (#23, 819e809: every PR below it merged in): every base suite and every fix test from #24 to #50, plus #10's and #23's, each in its final variant. All pass: test-clarity.js 55/55, test-insights.js 137/137, test-finances.js 126/126, test-plan.js 127/127, boot.js 257 transactions and 0 errors, race.js 0 errors; #24–#38's tests (clear-edits 48/48, rebuild-folder 57/57, partial-import 47/47, json-import 28/28, new-browser-copy 10/10, json-export 31/31, plan-links 60/60, rule-flags 67/67, drawer-flags 36/36, start-balance 193/193, ai-summary-period 78/78, account-names 40/40, account-order 32/32, drawer-focus 167/167, cleanup 21/21); #39–#50's tests (drawer-fields 45/45, read-as 52/52, json-import-edits 29/29, overlapping-exports 46/46, override-balance 160/160, card-override 277/277, ai-summary-trend 91/91, transfer-user-type 39/39, untransfer-category 27/27, recategorize 55/55, retype-transfer 135/135, minor-fixes 34/34); test-dbtab.js 73/73, test-save-status.js 64/64, test-master-port.js 16/16. Three scripts needed a test-only change on that run, listed in #23 and in the PRs they belong to; the app code wasn't changed.

Measured before the chain

The numbers below are the PR author's, on the commit before it was chained (built on the old #38 tip ecfcab2, v1.16.15, or on the fix below it there; version numbers renumbered to the chain's).

Headless Chromium (Playwright) against samples/, with the pinned libraries served from npm (the CDNs are blocked here). The machine was shared with other agents, so the suites ran one at a time.

  • New test-minor-fixes.js (35 checks). Boot imports the samples from a fake connected folder.

    • Item 1: a Rebuild through the two-click button. It records the button after every render: "Working…" (disabled) partway through, "Rebuilt" (disabled) at the end, and "Rebuild" again on the next render.
    • Item 1, regressions:
      • Clear import log, Clear budgets, and Clear transactions and accounts still read "Cleared".
      • A failed rebuild (no CSV in the folder) reads "Rebuild", enabled.
      • A rebuild while import is paused reads "Rebuilt".
      • An action that throws leaves "Clear", enabled, and nothing marked as running.
      • Disconnect still reports and removes the folder rows.
    • Item 2: rename, rename with quotes, < and &, and clear the name. The labels match what a render gives, other rows are untouched, and the arrows still move the account.
    • Item 3: the five developer views hide the label. Overview, Transactions and Spending still show it. Budget, Trends and Settings still hide it.
    • No console errors.
    • On ecfcab2 (a temporary git worktree, removed afterwards): 23/35 passed. All 12 failures are item 1–3 checks: 4 Rebuild-label checks, 3 arrow-label checks and 5 range-label checks. Every regression check passes there too.
    • On this branch: 35/35 passed.
  • Every suite for this base (run-tip.sh 15: the base suites plus each fix test of v1.16.1: Fix "Clear transaction edits" wiping every transaction when the browser database is empty #24–v1.16.15: Cleanup — remove unused views-database.js, fix the in-app changelog, update stale wording #38), on the final commit 3718f1a, one at a time. All passed:

    Suite Passed
    test-clarity 55/55
    test-insights 137/137
    test-finances 126/126
    test-plan 127/127
    test-clear-edits 47/47
    test-rebuild-folder 57/57
    test-partial-import 47/47
    test-json-import 28/28
    test-new-browser-copy 10/10
    test-json-export 31/31
    test-plan-links 60/60
    test-rule-flags 67/67
    test-drawer-flags 36/36
    test-start-balance 193/193
    test-ai-summary-period 78/78
    test-account-names 40/40
    test-account-order 32/32
    test-drawer-focus 167/167
    test-cleanup 21/21
  • Suites changed: none. One comment in test-rebuild-folder.js (case D) says the button reads "Rebuild" after a rebuild. That comment is now out of date, but no check depends on it.

How to reproduce the bug

Run these on the base branch, fix-retyped-transfer-still-counted. Do the Setup from the testing steps below, but check out fix-retyped-transfer-still-counted instead of minor-ui-wording-fixes. Use the scratch folder with the samples only. The wording fixes (item 4) have nothing to reproduce.

1. Rebuild button label

  1. Go to Settings → Data & reset.
  2. In Clean up, click Rebuild next to Rebuild from your folder, then click it again to confirm.
  3. Watch the button until the message appears at the top of the tab.

What goes wrong: the button reads Rebuilt too early, while the import is still running. It then flips back to Rebuild (enabled) while the backup is still being written, and ends as Rebuild, not Rebuilt.

2. Account arrows keep the old name

  1. Go to Settings → Accounts.
  2. Press F12 → Elements. Use the inspector (Ctrl+Shift+C) on the ▲ arrow of the second account row and note its aria-label.
  3. In that row's Display name field, type Test & "Quote" <1> and press Tab.
  4. Look at the same arrow's aria-label again, with no reload and no tab switch.

What goes wrong: both arrows still read Move <old name> up / … down. They only pick up the new name after the tab renders again.

3. Range label on developer views

  1. Set the date range in the top bar to This month.
  2. Press F12 → Console and run showView('db-inspector').
  3. Repeat with showView('db-schema'), showView('changelog'), showView('ai-eval') and showView('db-logs').

What goes wrong: each of the five views shows This month under its title, though none of them uses the date range.

Manual QA steps

Setup

  1. git checkout minor-ui-wording-fixes.
  2. Copy the three CSVs from samples/ into a new scratch folder (e.g. C:\temp\finlens-50). Test 1 rebuilds from the folder, so never use your real folder.
  3. Open index.html in Edge. Settings (gear) → Import → Pick a folder, choose the scratch folder, allow read and write access.

1. Rebuild shows "Rebuilt" when it finishes

  1. Go to Settings → Data & reset.
  2. In Clean up, find Rebuild from your folder. Click Rebuild.
  3. Click it again to confirm.
  4. Watch the button until the page settles (a message appears at the top of the tab).

Expected:

  • While it runs, the button reads Working… and is disabled. It never flips back to Rebuild midway.
  • When it's done, the button reads Rebuilt and stays disabled.
  • The top message says the rebuild finished, and the transaction count on Transactions is the same as before (257 with All time).

Before this fix: the button went Rebuilt too early, then back to Rebuild (enabled) while the backup was still being written.

2. Regression: the other Clean up buttons still show "Cleared"

  1. On Data & reset, click Clear next to Clear import log, then click again to confirm.
  2. Click Clear next to Clear transaction edits, then again (works even with no edits).

Expected:

  • Each button reads Cleared, disabled, after its action.
  • Switching to another Settings tab and back shows the buttons as Clear again (the label shows once).

3. Account arrows use the new name right away

  1. Go to Settings → Accounts.
  2. Press F12 → Elements tab. Use the inspector (Ctrl+Shift+C) on the ▲ arrow of the second account row. Note its aria-label (e.g. Move <name> up).
  3. In that row's Display name field, type Test & "Quote" <1> and press Tab.
  4. Look at the same arrow's aria-label in Elements (no reload, no tab switch).
  5. Clear the Display name field and press Tab.

Expected:

  • After step 3, the status line says Saved the name “Test & "Quote" <1>”. and both arrows read Move Test & "Quote" <1> up / … down straight away.
  • After step 5, the field shows the default name again, the status says Using the default name “…”, and both arrow labels use the default name.
  • The arrows still move the row (click ▲: the row moves up).

Before this fix: the labels kept the old name until the tab was rendered again.

4. Developer views don't show the date range label

  1. Set the date range in the top bar to This month.
  2. Open Overview. Note the label under the title (This month).
  3. Press F12 → Console and run showView('db-inspector').
  4. Repeat with showView('db-schema'), showView('changelog'), showView('ai-eval') and showView('db-logs').

Expected:

  • On each of the five developer views, nothing shows under the page title.
  • No red errors in the Console.

5. Regression: range label still shows where it should, and hides where it did

  1. Open Overview, Transactions and AI Analysis.
  2. Open Trends, Plan → Budget and Settings.

Expected:

  • Overview, Transactions and AI Analysis show This month under the title.
  • Trends, Budget and Settings show no range label (as before).
  • Settings → General → Version reads FinLens v1.16.27.

Please check before merging

  • Run Rebuild from your folder once in Settings → Data & reset. The button should show "Working…", then "Rebuilt", and go back to "Rebuild" when you leave the tab and come back.
  • Rename an account in Settings → Accounts and check the ▲▼ arrows' labels, for example with the browser's accessibility inspector.
  • Open showView('changelog') from DevTools. There should be no range under the title, and the top entry should be 1.16.27.
  • The version is v1.16.27 after chaining (renumbered from v1.16.21). The number appears in CHANGELOG.md, index.html, README.md, views-settings.js and CLAUDE.md (§1, §9, §12, §20, Last updated). It also appears in comments in ui.js (v1.16.27) and views-cleanup.js ("Up to v1.16.26").
  • Remove the dead t.balance branches in periodEndBalance() and currentBalances() in a follow-up, once the periodEndBalance() PR has merged.
  • Manual QA passed in Edge/Chrome with a real folder

https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft


Generated by Claude Code

…on developer views, stale wording (v1.16.27)

Grouped minor changes (CLAUDE.md §0):
- Data & reset: after Rebuild from your folder the button reads "Rebuilt".
  loadFiles() renders the tab partway through and used up
  DataCleanup.lastDone. DataCleanup.running now names the action under way;
  a render meanwhile shows its button as "Working…" and leaves lastDone for
  _done()'s render. What Rebuild does is unchanged.
- Settings → Accounts: saving a name updates the row's ▲▼ aria-labels at once.
- NO_RANGE_VIEWS (ui.js) includes db-inspector, db-schema, changelog,
  ai-eval and db-logs, so they no longer show the date-range label.
- Comments: "data tab" (init.js) and "Data & Reset" (core.js, db.js,
  migrate.js, views-cleanup.js, views-data.js, init.js); CLAUDE.md §9, §12,
  §14, §20.
- Version v1.16.27 in CHANGELOG.md, index.html, README.md,
  views-settings.js and CLAUDE.md §1 / Last updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
This was referenced Nov 2, 2026
@gitluis gitluis added the bug Something isn't working label Nov 3, 2026 — with Claude
@gitluis gitluis added this to the Clarity stack (v1.12.0 → v1.18.1) milestone Nov 3, 2026 — with Claude
…13.0) into minor-ui-wording-fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUZo6LRYpLthSp2PRi

# Conflicts:
#	js/views-settings.js
@gitluis gitluis changed the title v1.16.27: minor fixes — Rebuild button label, account arrow labels, range label on developer views, stale wording v1.16.27: Minor fixes — Rebuild button label, account arrow labels, range label on developer views, stale wording Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants