diff --git a/CHANGELOG.md b/CHANGELOG.md index 9002d3f..a41488d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --- +## [1.10.5] — 2026-11-02 + +### Fixed +- **Leaving Import Logs too quickly no longer throws an error.** The view fills its table from IndexedDB just after it renders. If you clicked to another screen before that finished, `#importLogsBody` was already gone and `renderImportLog()` threw `Cannot set properties of null (setting 'innerHTML')`. Nothing was lost, but the error reached the console every time. The fill now looks the element up again after the database read and stops if the view has been left (`views-data.js`). `renderImportLog()` also returns early when given no container. + - **Found by** a headless stress test that switches between every view with no pause: 7 errors in 6 rounds before the fix, none after. No other view showed the problem. The Data & Reset counts and the DB Inspector already handle it. + +--- + ## [1.10.4] — 2026-10-26 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index b30173f..d895c1b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,7 +59,7 @@ Until then, this section is the rule. FinLens is a **single-origin, zero-build, vanilla JavaScript personal finance dashboard** that runs entirely in the browser. There is no server, no npm, no bundler, no framework, and no TypeScript. The entry point is `index.html`; everything else is a plain `.js` file in the `js/` folder. -**Current version:** v1.10.4 (updated in `index.html` footer, `README.md`, and `CHANGELOG.md` on every release). +**Current version:** v1.10.5 (updated in `index.html` footer, `README.md`, and `CHANGELOG.md` on every release). **What it does:** Imports CSV exports from Ally Bank (Checking + Savings) and Chase credit cards, parses and normalizes them into a unified transaction model, and renders a multi-tab financial dashboard with budgeting, debt tracking, savings forecasting, investment planning, and Claude-powered AI analysis. @@ -798,7 +798,7 @@ Multiple Chase card files can be loaded simultaneously. Each gets a unique `acco --- -*Last updated: v1.10.4 — 2026-10-26 (§8, §13 single `~` is literal; §21 excerpts escape `~`; v1.10.3: §13 refusals; §21 declined runs; v1.10.2: §13 summary states its dates; §21 per-month derivations; v1.10.1: §13 `AI_MAX_TOKENS`, thinking and cut-off answers; v1.10.0: §21 AI Eval added; §13 `callClaude()` raw mode; v1.9.6: §14 folder access lasts until the last tab closes, not one page load; v1.9.5: §7 chart guard; v1.9.4: views-db.js changelog reads CRLF checkouts; v1.9.3: §14 folder permission: re-request on click, Reconnect banner, browser copy wins; v1.9.2: §0 branch, PR and approval workflow added; v1.9.1: §4.5 rehydrate transactions loaded from JSON; v1.9.0: §20 Data & Reset added; v1.8.1: §10 re-upload dedup rewritten for the occurrence-suffix fix; v1.8.0: AI Analysis restored with API-key and output hardening; `renderMarkdown()` added; `samples/` added; §1–3, §13, §14, §17 corrected to match the code)* +*Last updated: v1.10.5 — 2026-11-02 (no section changes: Import Logs race fix; v1.10.4: §8, §13 single `~` is literal; §21 excerpts escape `~`; v1.10.3: §13 refusals; §21 declined runs; v1.10.2: §13 summary states its dates; §21 per-month derivations; v1.10.1: §13 `AI_MAX_TOKENS`, thinking and cut-off answers; v1.10.0: §21 AI Eval added; §13 `callClaude()` raw mode; v1.9.6: §14 folder access lasts until the last tab closes, not one page load; v1.9.5: §7 chart guard; v1.9.4: views-db.js changelog reads CRLF checkouts; v1.9.3: §14 folder permission: re-request on click, Reconnect banner, browser copy wins; v1.9.2: §0 branch, PR and approval workflow added; v1.9.1: §4.5 rehydrate transactions loaded from JSON; v1.9.0: §20 Data & Reset added; v1.8.1: §10 re-upload dedup rewritten for the occurrence-suffix fix; v1.8.0: AI Analysis restored with API-key and output hardening; `renderMarkdown()` added; `samples/` added; §1–3, §13, §14, §17 corrected to match the code)* --- diff --git a/README.md b/README.md index 09f8641..1cd3fc5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > A zero-install, browser-native finance dashboard. Drop in your bank CSVs, get instant clarity on your money. -**Version:** v1.10.4  ·  **Stack:** Vanilla JS, HTML, CSS  ·  **Install:** None +**Version:** v1.10.5  ·  **Stack:** Vanilla JS, HTML, CSS  ·  **Install:** None --- @@ -260,4 +260,4 @@ See [CHANGELOG.md](CHANGELOG.md) for the full release history. --- -*FinLens v1.10.4 — Built for one person's finances, designed to be useful for anyone's.* +*FinLens v1.10.5 — Built for one person's finances, designed to be useful for anyone's.* diff --git a/index.html b/index.html index 52c1063..ee48405 100644 --- a/index.html +++ b/index.html @@ -326,7 +326,7 @@
⚙️ Settings
diff --git a/js/views-data.js b/js/views-data.js index 4163d05..d9947f9 100644 --- a/js/views-data.js +++ b/js/views-data.js @@ -193,6 +193,7 @@ registerView('import','Import',(root)=>{ /* ---- Render import log table ---- */ function renderImportLog(container) { + if (!container) return; // the view was left before the log loaded if (!_importLogCache.length) { container.innerHTML='
No imports recorded yet. Upload CSV files to populate the log.
'; return; @@ -689,12 +690,16 @@ registerView('db-logs','Import Logs',(root)=>{
`; root.appendChild(card); + // Fills in after the render, from IndexedDB. If you've left the view by then (a quick + // click elsewhere), #importLogsBody is gone: look it up again and stop if it's missing. setTimeout(async()=>{ + if (!$('#importLogsBody')) return; if (typeof DB==='undefined'||!DB._db) { $('#importLogsBody').innerHTML='
IndexedDB not available.
'; return; } _importLogCache=await DB.getImportLog(); - renderImportLog($('#importLogsBody')); + const body=$('#importLogsBody'); + if (body) renderImportLog(body); },0); }); diff --git a/js/views-settings.js b/js/views-settings.js index 067f655..6f7d389 100644 --- a/js/views-settings.js +++ b/js/views-settings.js @@ -49,7 +49,7 @@ function _renderGeneralSettings(root) { -
FinLens v1.10.4 ·${State.transactions.length} transactions loaded${State.lastRefresh?' · Refreshed '+dayjs(State.lastRefresh).format('MMM D, YYYY h:mm A'):''}
`; +
FinLens v1.10.5 ·${State.transactions.length} transactions loaded${State.lastRefresh?' · Refreshed '+dayjs(State.lastRefresh).format('MMM D, YYYY h:mm A'):''}
`; root.appendChild(displayCard); /* ---- Anthropic API Key ---- */