diff --git a/CHANGELOG.md b/CHANGELOG.md index e3be6dd..c400454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --- +## [1.9.6] — 2026-10-25 + +### Docs +- **Folder access lasts until the last FinLens tab closes, not one page load.** CLAUDE.md §14 and comments in `core.js` and `init.js` said Chromium resets a stored folder's permission on every page load. Testing in Edge showed otherwise: a reload kept access, and only closing Edge dropped it. That matches Chrome's documented behavior. Access lasts until the last tab of the site closes, Chrome can revoke it after a tab sits in the background, and since Chrome 122 the prompt can offer **Allow on every visit**. The code already checks permission on every load and save, so it handles all of these. Only docs and comments changed. + +--- + ## [1.9.5] — 2026-10-25 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index 75d7828..266d3cd 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.9.5 (updated in `index.html` footer, `README.md`, and `CHANGELOG.md` on every release). +**Current version:** v1.9.6 (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. @@ -678,7 +678,7 @@ The handle lives in a separate `finlens_fs` database (distinct from `finlens_db` ### Folder permission (v1.9.3) -- **It lapses on every page load in Chromium** (Edge, Chrome): a stored handle's permission goes back to `prompt`. Only a click can ask again — `requestPermission()` throws without user activation. +- **It lasts until the last FinLens tab closes, not one page load** (Chromium: Edge, Chrome). A reload keeps access; closing the browser drops it, and a stored handle's permission goes back to `prompt` (confirmed in Edge, v1.9.6). Chromium can also revoke it after a tab sits in the background for a while, and since Chrome 122 the prompt can offer **Allow on every visit**, which keeps access until the user revokes it. Only a click can ask again — `requestPermission()` throws without user activation. Don't rely on any of these: check permission every time (next bullet). - **Check before touching files.** `loadStateFromFile()` and `saveStateToFile()` call `folderPermission(dir, mode)` (wraps `queryPermission`, never prompts) and skip quietly instead of throwing `NotAllowedError`. When access is missing they set `State._folderNeedsAccess`, which shows the **Reconnect folder** banner (`#folderBanner`, `updateFolderBanner()` in `views-data.js`). A successful save clears it. - **Always ask for `readwrite`**, not `read`: the folder picker, Reload and Reconnect all do, because the same folder holds `finlens-state.json`. - **Prompting code runs only in click handlers:** `saveNowClick()`, `reconnectFolderClick()`, `reloadDataFiles()`, and the Data & Reset actions via `folderWithWriteAccess()` / `saveStateNow()`. @@ -785,7 +785,7 @@ Multiple Chase card files can be loaded simultaneously. Each gets a unique `acco --- -*Last updated: v1.9.5 — 2026-10-25 (§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.9.6 — 2026-10-25 (§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 c825f15..e7438d3 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.9.5 · **Stack:** Vanilla JS, HTML, CSS · **Install:** None +**Version:** v1.9.6 · **Stack:** Vanilla JS, HTML, CSS · **Install:** None --- @@ -235,4 +235,4 @@ See [CHANGELOG.md](CHANGELOG.md) for the full release history. --- -*FinLens v1.9.5 — Built for one person's finances, designed to be useful for anyone's.* +*FinLens v1.9.6 — Built for one person's finances, designed to be useful for anyone's.* diff --git a/index.html b/index.html index 7e87f88..ae63bf4 100644 --- a/index.html +++ b/index.html @@ -326,7 +326,7 @@
diff --git a/js/core.js b/js/core.js index b1a3daa..6cdc5f2 100644 --- a/js/core.js +++ b/js/core.js @@ -92,8 +92,9 @@ const downloadFile = (name, content, mime) => { }; /* ---------- Filesystem state persistence (source of truth) ---------- */ -// Chromium browsers (Edge, Chrome) reset a stored folder's permission to "prompt" on -// every page load, and only a click can ask for it again. So the file functions check +// Chromium browsers (Edge, Chrome) keep a stored folder's permission only until the +// last FinLens tab closes: a reload keeps it, closing the browser resets it to "prompt", +// and only a click can ask for it again. So the file functions check // first (queryPermission never prompts) instead of letting getFileHandle() throw // NotAllowedError. When access has lapsed they set State._folderNeedsAccess, which // shows the "Reconnect folder" banner (updateFolderBanner() in views-data.js). @@ -160,7 +161,7 @@ async function saveStateToFile(state) { console.log('[FinLens] No backup folder selected; state not saved to file'); return false; } - // No write access (lapsed on reload, or only read was ever granted): skip quietly + // No write access (lapsed when the browser closed, or only read was granted): skip quietly // and show the banner, rather than throwing on every debounced save. if ((await folderPermission(dirHandle, 'readwrite')) !== 'granted') { State._lastSaveError = 'no write access to the folder'; diff --git a/js/init.js b/js/init.js index 7fd2fe9..bec5be1 100644 --- a/js/init.js +++ b/js/init.js @@ -132,7 +132,7 @@ setRange('month'); buildAccountFilter(); showView('overview'); - // Folder access lapsed (Chromium resets it on every load): offer Reconnect. + // Folder access lapsed (Chromium resets it once the last tab closes): offer Reconnect. updateFolderBanner(); })(); diff --git a/js/views-settings.js b/js/views-settings.js index 338309c..728050b 100644 --- a/js/views-settings.js +++ b/js/views-settings.js @@ -49,7 +49,7 @@ function _renderGeneralSettings(root) { -