Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

---

## [1.17.0] — 2026-11-02

### Settings → Database
DB Inspector and DB Schema are back in the UI, as a seventh Settings tab. Since the sidebar's Database section was removed, they could only be opened with `showView()` from DevTools. This is PR #10's tab rebuilt on the Clarity redesign; its v1.11.0 version predates the redesign and was never released.

- **Tab:** **Database**, last in the Settings tab bar, in plain text. It is part of the Settings tablist, so arrow keys, Home and End reach it, and it uses the same 1000px page as the other tabs.
- **Sub-tabs:** **DB Inspector** (opens first) and **DB Schema**, as a segmented tab control like Forecast's Savings / Investments (`.seg.tabs-seg`, `role="tab"`, `aria-selected`; arrow keys, Home and End). The one you picked is remembered for the session (`dbToolsTab`); nothing is saved.
- **How it's built:** the tab is the `db-tools` view in `views-db.js`. It renders the existing `db-inspector` or `db-schema` view into one `role="tabpanel"`. Both still open on their own with `showView()`, and so does `showView('changelog')`.
- **A Settings tab whose view isn't registered is hidden** instead of throwing when Settings opens. The Database tab lives in `views-db.js`, which v1.9.4 showed can stop loading partway through. The tab's code sits above the Changelog view's for the same reason.
- **Phones:** the Settings tab bar now scrolls the selected tab into view. Before, every render scrolled it back to the start, so a selected Data & reset or Database tab was off-screen at 390px.

### DB Inspector
- **Clarity layout:** a panel with the store picker, search, **Clear search**, **Refresh** and the record count ("257 records found (257 total in store)"). Below it, the records in a `.tbl` table that scrolls sideways, with the Transactions screen's pager. The store's key is the first column; field names keep their case. Values are colored by type through `.dv-*` classes (dates, numbers, lists, true/false, null) instead of hard-coded legacy colors.
- **Re-reads the store on every visit.** Before, a second visit redrew the rows cached from the first load, so imports or clears made in between didn't show, and the count line was blank. It keeps the chosen store, search and page, and moves back to the last page if the store got smaller.
- **Picking a store reads it right away, and the search filters as you type.** **Load** is now **Refresh** (read the store again). **Clear** is now **Clear search**: it shows the whole store again instead of emptying the table.
- **The API key isn't shown.** Its `app_state` row says "Hidden: an API key is saved", and the search ignores its value, so typing can't reveal it. Before, the inspector printed the key in full (CLAUDE.md §13: never expose it).

### DB Schema
- **One Clarity panel titled "Database schema".** It was titled "Database Schema & Inspector", from when one card held both; the inspector is its own sub-tab now. The legend is a `.legend` row in the same panel.
- **Colors come from the theme.** Each store's lines and text use a `.sch-*` class that reads the tokens (`--teal-2`/`--teal-text`, `--warn`/`--warn-text`, `--sky`/`--sky-text`, `--violet`/`--violet-text`). No hex, `rgba()`, `white` or legacy aliases, and no text faded with opacity. The diagram follows light and dark without a redraw.
- **Fits the 1000px Settings page** (872px wide). The relationship labels sit in the gaps between boxes, on a background, instead of over the boxes. The `app_state` key list wraps inside its box. Below 900px the diagram scrolls sideways inside its panel, and a note says so.
- **Text corrected:** the `app_state` key list matches the keys the code writes (`catRules`, not `categoryRules`; adds `recurring`, `cardDetails`, `sampleData`, `lastFolderName` and `csvAutoImportPaused`). `accounts.kind` gives the current kinds (`bank_checking|credit_card|…`). `import_log` lists `rowsRemoved` (leftover duplicate copies removed, since v1.8.1), which its records have.

### Docs
- **README:** a Tip for **Settings → Database**; the Project Structure line for `views-db.js`.
- **CLAUDE.md:** §1 version; §3 file roles; §6 the Database classes; §12 the seventh Settings tab, its sub-tabs, the hidden-tab guard and view registrations; §19 the database views.

---

## [1.16.27] — 2026-11-02

Minor fixes, grouped in one release (CLAUDE.md §0).
Expand Down
34 changes: 27 additions & 7 deletions CLAUDE.md

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> A zero-install, browser-native finance dashboard. Drop in your bank CSVs, get instant clarity on your money.

**Version:** v1.16.27  ·  **Stack:** Vanilla JS, HTML, CSS  ·  **Install:** None
**Version:** v1.17.0  ·  **Stack:** Vanilla JS, HTML, CSS  ·  **Install:** None

---

Expand Down Expand Up @@ -143,7 +143,7 @@ Reference lists for learning, not financial advice. Type your own % next to nine
Ask Claude about your finances: eight quick analyses (a monthly spending review, where to cut back, a subscription audit, a savings-rate check, a debt payoff plan, budget suggestions, a 12-month forecast and a summary) or your own question. Claude receives a text summary of your balances, income and spending by category for the dates on screen, the monthly trend up to their end, and your current debts and subscriptions, never your CSV files. Answers can be copied or saved as Markdown, and a cut-off answer says so. History keeps up to 50 answers in your browser; open any of them again, or export them all as Markdown. Requires your own [Anthropic API key](https://console.anthropic.com).

### Settings
Six tabs: **General** (theme and your API key), **Import** (your CSV folder, how each file is read and the import log), **Accounts** (names, display order and starting balances), **Credit cards** (balance, credit limit, APR and payment due day), **Categories** (add or delete; deleting moves a category's transactions to Other) and **Data & reset** (what's stored, clean up, JSON export and import, start over).
Seven tabs: **General** (theme and your API key), **Import** (your CSV folder, how each file is read and the import log), **Accounts** (names, display order and starting balances), **Credit cards** (balance, credit limit, APR and payment due day), **Categories** (add or delete; deleting moves a category's transactions to Other), **Data & reset** (what's stored, clean up, JSON export and import, start over) and **Database** (DB Inspector and DB Schema, for looking at the raw data).

---

Expand Down Expand Up @@ -226,7 +226,7 @@ FinLens/
├── views-data.js ← Settings tabs Import, Accounts, Credit cards, Categories; sample data; Import Logs
├── views-settings.js ← Settings shell + General tab (display, API key)
├── views-cleanup.js ← Settings → Data & reset (clean up data, export/import JSON, start over)
├── views-db.js ← DB Inspector, DB Schema diagram, Changelog views
├── views-db.js ← Settings → Database (DB Inspector, DB Schema diagram); Changelog view
├── views-eval.js ← AI Eval: grounding eval for AI Analysis (developer view)
└── init.js ← App boot and event wiring
```
Expand All @@ -251,6 +251,8 @@ FinLens/
- **Export or import JSON:** your plans, transaction edits and rules, account names, order and balances, card details, categories, transfer keywords and AI history in one file (no transactions, no API key). Older exports still import; anything they don't have stays as it is.
- **Start over from scratch:** type `RESET` to erase everything and reload. Your backup file is either kept as `finlens-state-backup-DDMMYYYY.json` or deleted, your choice. Your CSV files are never touched.

**Looking at the raw data** — **Settings → Database** has two sub-tabs. **DB Inspector** browses each IndexedDB store, read-only and searchable; your API key is never shown. **DB Schema** diagrams the five stores and how they link.

**Exporting** — the Transactions screen has an **Export CSV** button: it exports every transaction in the current date range and accounts. AI answers can be saved as Markdown from the AI Analysis tab, one at a time or the whole history.

---
Expand All @@ -261,4 +263,4 @@ See [CHANGELOG.md](CHANGELOG.md) for the full release history.

---

*FinLens v1.16.27 — Built for one person's finances, designed to be useful for anyone's.*
*FinLens v1.17.0 — Built for one person's finances, designed to be useful for anyone's.*
48 changes: 47 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,52 @@
.radio-set label{display:flex;align-items:center;gap:10px;min-height:36px;font-size:14px;cursor:pointer;overflow-wrap:anywhere}
.radio-set input{width:18px;height:18px;margin:0;flex-shrink:0;accent-color:var(--accent)}
.field .input.reset-in{width:200px;font-weight:600;letter-spacing:.08em}
/* Settings → Database (v1.17.0): DB Inspector table, DB Schema diagram */
.tbl.db-tbl{font-size:13px}
.tbl.db-tbl th,.tbl.db-tbl td{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:10px;text-transform:none;letter-spacing:0}
.form-row .field.insp-store{flex:0 1 200px}
.tbl.db-tbl thead th{text-transform:none;letter-spacing:0;font:500 12px 'DM Mono',ui-monospace,monospace;color:var(--text-2)}
.tbl.db-tbl tbody th{font:500 12.5px 'DM Mono',ui-monospace,monospace;color:var(--text);text-align:left;border-bottom:1px solid var(--divider)}
.tbl.db-tbl tr:hover th{background:var(--surface-2)}
.tbl.db-tbl tbody tr:last-child>*{border-bottom:0}
.tbl.db-tbl th:first-child,.tbl.db-tbl td:first-child{padding-left:24px}
.tbl.db-tbl th:last-child,.tbl.db-tbl td:last-child{padding-right:24px}
.dv-null,.dv-hidden{color:var(--text-3);font-style:italic}
.dv-date{color:var(--teal-text)} .dv-arr{color:var(--violet-text)} .dv-num{color:var(--sky-text);font-variant-numeric:tabular-nums}
.dv-obj{color:var(--text-2);font:12px 'DM Mono',ui-monospace,monospace}
.dv-true{color:var(--good-text)} .dv-false{color:var(--text-3)}
/* the schema: each store's .sch-* sets --c (lines, fills) and --ct (text) from the theme */
.sch-teal{--c:var(--teal-2);--ct:var(--teal-text)} .sch-warn{--c:var(--warn);--ct:var(--warn-strong-text)}
.sch-sky{--c:var(--sky);--ct:var(--sky-text)} .sch-violet{--c:var(--violet);--ct:var(--violet-text)}
.sch-neutral{--c:var(--text-3);--ct:var(--text-2)}
.sch-scroll{border-radius:var(--radius-sm)}
.sch-scroll:focus-visible{outline:2px solid var(--accent-border);outline-offset:2px}
svg.sch{display:block;font-family:'DM Mono',ui-monospace,Menlo,monospace}
.sch .box-bg{fill:var(--surface)}
.sch .box{fill:none;stroke:var(--c);stroke-width:1.5}
.sch .band{fill:color-mix(in srgb,var(--c) 12%,var(--surface))}
.sch .rule{stroke:var(--c);stroke-opacity:.5}
.sch .stripe{fill:var(--surface-2)}
.sch .st-name{fill:var(--ct);font-size:13px;font-weight:500}
.sch .st-kind{fill:var(--text-3);font-size:10px}
.sch .f-name{fill:var(--text);font-size:12px}
.sch .f-type{fill:var(--text-3);font-size:10.5px;font-style:italic}
.sch .f-note{fill:var(--ct);font-size:10px}
.sch .st-note{fill:var(--text-3);font-size:10px;font-style:italic}
.sch .badge{fill:var(--muted)}
.sch .badge.pk{fill:color-mix(in srgb,var(--c) 16%,var(--surface));stroke:var(--c)}
.sch .badge-t{fill:var(--text-2);font:700 9px 'Inter',system-ui,sans-serif}
.sch .badge-t.pk{fill:var(--ct)}
.sch .rel{fill:none;stroke:var(--c);stroke-width:1.5;stroke-dasharray:5 3}
.sch .rel-head{fill:var(--c)}
.sch .rel-bg{fill:var(--surface)}
.sch .rel-t{fill:var(--ct);font-size:10px}
.key-badge{display:inline-block;padding:1px 6px;border:1px solid transparent;border-radius:4px;background:var(--muted);color:var(--text-2);font-size:10px;font-weight:700;line-height:14px}
.key-badge.pk{background:color-mix(in srgb,var(--c) 16%,var(--surface));border-color:var(--c);color:var(--ct)}
.sch-opt{font:italic 11px 'DM Mono',ui-monospace,monospace;color:var(--text-3)}
.sch-hint{display:none}
@media (max-width:900px){.panel .sub.sch-hint{display:block;margin:0}}
@media (max-width:720px){.tbl.db-tbl th:first-child,.tbl.db-tbl td:first-child{padding-left:16px} .tbl.db-tbl th:last-child,.tbl.db-tbl td:last-child{padding-right:16px}}
/* Welcome */
.welcome{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center}
.welcome .lead{margin:0;max-width:620px;font-size:18px;line-height:1.55;color:var(--text-2)}
Expand Down Expand Up @@ -1164,7 +1210,7 @@
<div class="folder-banner-wrap" id="folderBanner" hidden></div>
<div class="content" id="content"></div>
</main>
<footer class="appfoot">v1.16.27 · FinLens</footer>
<footer class="appfoot">v1.17.0 · FinLens</footer>

<!-- side drawer: transaction detail, bill and plan forms (ui.js openDrawer) -->
<div class="drawer-scrim" id="drawerScrim" onclick="closeDrawer()" hidden></div>
Expand Down
Loading