Skip to content

v1.13.0: Clarity redesign, part 1 — one-row app bar, theme in Settings, Clarity visual system - #17

Open
gitluis wants to merge 3 commits into
bank-neutral-namesfrom
clarity-redesign
Open

gitluis wants to merge 3 commits into
bank-neutral-namesfrom
clarity-redesign

Conversation

@gitluis

@gitluis gitluis commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #16 (bank-neutral-names). Merge #16 first; GitHub should then retarget this PR to master.
Version: v1.13.0, numbered after the open PRs (#10 v1.11.0, #16 v1.12.0). If they merge in a different order, this gets renumbered.

Summary

Part 1 of the Clarity redesign from the design canvas: the app shell and the visual system. Screen layouts are unchanged. Rebuilding individual screens to match the mockups (Overview, Bills, Budget, Debt, Forecast and so on) comes in follow-up PRs.

  • One-row app bar replaces the sidebar: FinLens · Overview · Transactions · Plan ▾ · Trends · AI Analysis, then the sync badge, date and account icon pickers, and the Settings gear.
  • "Synced" / "Not synced" badge tied to the real folder state.
  • Light only for now. The dark theme is taken out (Luis, 2026-11-04): no ◐ toggle, no theme setting, no dark tokens. It comes back later in its own PR.
  • Clarity tokens, Inter type, restyled components, and charts that read their colors from the tokens.
  • ☰ menu on phones and narrow windows.

What changed

App bar (index.html, ui.js, init.js)

  • Plan menu: Budget, Buckets, Debt, Investments and Forecast, each with a one-line description. Plan stays underlined on those screens, and the menu marks the current one.
  • Closing menus: a click outside, Escape (focus returns to the button) or picking an item closes them. toggleAppBarPopup() and closeAppBarPopups().
  • Date range popover: replaces the <select>. The dot appears when the range isn't the default (This month). Custom range shows From / To inside the popover. setRange() now calls updateRangeUI().
  • Accounts popover: checkboxes, so accounts can be combined (inAccount() already handled arrays). The last checked account can't be unchecked, and the dot shows while filtered. buildAccountFilter() was rewritten for the popover.
  • Re-rendering keeps a popover open. showView() closes menus only when the screen changes. Without this, the first checkbox click closed the Accounts popover.
  • Below 1000px the nav moves into a ☰ menu, and below 720px the gear does too.
  • A page title row (title + active range) replaces the old top-bar crumb. The version string moved to a footer.

Sync badge (views-data.js, core.js)

  • States: "Synced" when a stored folder handle exists, access is granted and the last save worked. Otherwise "Not synced", with a tooltip giving the reason (no folder / access lapsed / save failed, with the error).
  • Click: reconnects when access lapsed (the click allows the permission prompt). Otherwise it opens Settings → Import.
  • New State._folderLinked (in memory only, not persisted, so §20 doesn't change). A folder chosen with the Safari/Firefox file picker sets lastFolderName but has no handle, so nothing is written back to it. Without the flag the badge would have said "Synced" there.
  • Updated on every render, every save (success or failure) and every banner update.

Theme: light only (ui.js, views-settings.js, index.html)

  • Removed: the ◐ button and its wiring, the [data-theme="dark"] tokens (master's and the Clarity set), and the Light / Dark / Match system control. setTheme(), resolvedTheme() and the prefers-color-scheme listener are gone. The dark token set is in commit ff459fe for when it comes back.
  • applyTheme() now only points Chart.js labels, grid lines and font at the tokens.
  • State.theme is still saved and loaded (storage key unchanged), but nothing reads it. Anyone who had Dark on master opens in Light.

Visual system (index.html)

  • Tokens: surfaces, text, accent, status pairs, hues, chart and heatmap tokens (CLAUDE.md §6).
    • Contrast: every text token is ≥ 4.5:1 on every surface. --text-3 is #5d6a7e, because the mockup's #64748b is 4.44:1 on the page background.
  • Legacy names (--teal, --amber, --red, --blue, --purple) are aliases, so existing inline styles keep working without touching every view.
  • Components: buttons, pills, chips, tables, inputs, progress, callouts (tinted boxes, no left border), drawer, heatmap, calendar, Settings tabs (.tabs) and the segmented control (.seg, kept for later use).
  • Charts: cssVar() and chartColor('--token', alpha) read the tokens when a chart draws. The hex literals in the Overview, Income, Spending, Trends, Forecast and Investments charts, the sparklines and the transfer-flow SVG are replaced. applyTheme() also sets the Chart.js grid color and font. CHART_PALETTE uses mid-tone hues.
  • Emojis removed from Settings tabs and the Reconnect / Data & Reset buttons. Emojis inside screens stay until those screens are redesigned.

Docs

  • CHANGELOG: v1.13.0.
  • README: navigation instructions; dark mode instructions removed.
  • CLAUDE.md:
    • §6 tokens and components.
    • §7 rule 6: chart colors from the theme.
    • §9 chart-color and app-bar helpers (theme helpers removed).
    • §12 App Bar Navigation replaces the sidebar section, and a plain-text nav rule replaces the emoji rule.
    • §17 footer location.
    • §20 Data & Reset name; finlens_navCollapsed is no longer written.
  • Versions: all four version strings and §1.

Not verified

  • The real folder flow. Headless Chromium can't grant File System Access, so "Synced" after an actual folder pick and Reconnect from the badge were simulated by setting State, not done end to end.
  • Safari and Firefox. Not run.
Automated checks: earlier run, not re-run · commit not recorded

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) against samples/ at 1280px, 1024px and 390px (phone). 54/54 checks passed.

The sandbox can't reach the CDNs, so the harness served the same pinned library versions from npm and Inter from @fontsource. The marked and DOMPurify files match the SRI hashes in index.html, so the integrity checks ran.

  • App bar: one row (65px) at 1280 and 1024; no sidebar or theme toggle left.
  • Plan menu: open/close by click, Escape (focus returns) and outside click; navigating via the menu; Plan underlined on Plan screens; current item marked.
  • Date popover: This month checked by default with no dot; All time closes it and updates the page subtitle and dot; Custom shows From/To and applies.
  • Accounts popover: lists all 3 accounts; unchecking filters filteredTx(); dot; All accounts resets; the last account can't be unchecked; outside click closes.
  • Settings: gear opens it and highlights; plain-text tabs.
  • Light only (re-run after the dark theme was taken out): with the OS emulated in dark mode and theme stored as 'dark', the app still boots light (#f6f7f9 background, no data-theme), setTheme is undefined, there's no theme button or setting, and no page errors. Also on v1.16.0: Clarity redesign, part 4 — Trends, AI Analysis, Settings, Welcome #21, v1.18.0: Backup status in the sync badge; save before leaving #23, v2.0.2: Generic storage names (app_db, app-state.json…) + rename script #58 and v1.18.2: A transfer keyword alone no longer hides money sent or received; flag those for review #59.
  • Sync badge:
    • "Not synced" with no folder, and after a file-chooser import (no handle).
    • Synced state with last-save time.
    • Access lapsed shows "Not synced" plus the banner, and clicking calls Reconnect.
    • A failed save shows the reason.
    • When synced, clicking opens Settings → Import.
  • Every registered view (24) + all 6 Settings tabs render with no page errors (original run, light and dark).
  • Phone (390px):
    • nav and gear hidden, ☰ shown, one-row bar, no horizontal scroll;
    • the menu opens with the scrim, its links navigate and close it, it marks the current screen, and tapping the scrim closes it.
  • No console errors at boot or during any of the above (desktop and phone).
  • Visual check of screenshots: Overview, Transactions, Settings General, Import, Plan menu, phone menu (original run).

Not verified:

  • The real folder flow. Headless Chromium can't grant File System Access, so "Synced" after an actual folder pick and Reconnect from the badge were simulated by setting State, not done end to end.
  • Safari and Firefox. Not run.

Found, not fixed here (also on master and #16): the Import Logs view fills its table from IndexedDB in a setTimeout. If you leave the view before that runs, renderImportLog() throws Cannot set properties of null (views-data.js). It's a separate bug, so per §0 it gets its own PR: fixed in #18 (v1.10.5, on master). The test here pauses 60 ms between screens to stay clear of it.

Manual QA steps

Setup

  1. Run git checkout clarity-redesign.
  2. Copy samples/checking_sample.csv, savings_sample.csv and credit_card_sample.csv into a scratch folder, e.g. Desktop\finlens-test. Tests 6–7 pick a folder and save to it, so never use your real folder.
  3. Use an Edge InPrivate window (Ctrl+Shift+N) so your real FinLens data in the normal profile is not touched.
  4. Open index.html from disk. Press F12 and keep the Console tab open throughout.

1. The app bar replaces the sidebar

  1. Look at the top of the page.
  2. Look at the bottom of the page.

Expected:

  • One row at the top: FinLens, Overview, Transactions, Plan ▾, Trends, AI Analysis, then a Not synced badge, a calendar icon, a bank icon and a gear.
  • No left sidebar. No ◐ theme button.
  • Under the bar: the page title Overview with the range next to it ("This Month").
  • The footer reads v1.13.0 · FinLens.
  • No errors in the Console.

2. Plan menu

  1. Click Plan.
  2. Read the five items.
  3. Press Escape.
  4. Click Plan again, then click an empty part of the page.
  5. Click Plan, then Debt.
  6. Click Plan again.
  7. Click Trends.

Expected:

  • The menu lists Budget, Buckets, Debt, Investments, Forecast, each with a one-line description (e.g. "Balances and a payoff plan").
  • Escape closes it, and focus returns to the Plan button (focus ring visible).
  • A click outside closes it.
  • Picking Debt opens the Debt Tracker. Plan stays underlined, and the open menu marks Debt as current.
  • On Trends, Plan is no longer underlined and Trends is.

3. Import data and the date range popover

  1. Click the gear. Settings opens on General, and the gear is highlighted.
  2. Click the Import tab, then 📁 Pick a Folder. Choose finlens-test and allow edit access.
  3. Click Overview. Click the calendar icon.
  4. Click All time.
  5. Click the calendar icon again, then Custom range….
  6. Set From to 2026-09-01 and To to 2026-09-30.
  7. Click outside the popover.
  8. Click the calendar icon, then This month.

Expected:

  • The Data Source card says ✓ 257 transactions loaded.
  • The popover starts with This month checked, and the icon has no dot.
  • After All time: the popover closes, the subtitle reads All time, and a dot appears on the calendar icon.
  • Custom range… keeps the popover open and shows From / To. After both dates, the subtitle reads Sep 1, 2026 – Sep 30, 2026, and the figures change to September only.
  • After This month the dot disappears.

4. Accounts popover

  1. Set the range to All time. Click Transactions and note the row count shown.
  2. Click the bank icon. Three accounts are listed, all checked.
  3. Uncheck Bank Credit Card (credit_card_sample).
  4. Without closing, also uncheck Bank Savings.
  5. Try to uncheck Bank Checking too.
  6. Click All accounts.
  7. Click outside the popover.
  8. Open the bank icon again, uncheck only the card, click outside, and click Overview.

Expected:

  • The popover stays open while you click checkboxes, and the table behind updates each time.
  • With only Bank Checking checked, Transactions lists only checking rows (no card or savings rows). A dot shows on the bank icon.
  • The last checked account can't be unchecked (the box stays ticked).
  • All accounts re-checks all three, restores the row count from step 1, and removes the dot.
  • Hovering the bank icon shows a tooltip such as "Accounts: Bank Checking, Bank Savings".
  • On Overview with checking + savings combined, Cash Flow changes from its all-accounts value (card spending is left out). The Total Cash / Total Debt cards and the account cards always show every account; that is unchanged from before this PR.

5. Light only: no dark theme

  1. Click the gear → General.
  2. In Windows, open Settings → Personalization → Colors and set Choose your mode to Dark. Watch FinLens.
  3. Press F5.
  4. Set Windows back to your usual mode.

Expected:

  • General shows About (the version) and the API key. There's no Theme row and no Light / Dark / Match system control.
  • FinLens stays light with Windows in Dark, before and after F5.
  • If you used Dark on master before, FinLens now opens in Light.

6. Sync badge: Synced and Not synced

  1. After the folder pick in test 3, look at the badge.
  2. Hover over it.
  3. Click it.
  4. Open Settings → Data & Reset. Under CSV folder & backup file, click Disconnect.
  5. Hover over the badge, then click it.

Expected:

  • After the pick: Synced (green). The tooltip reads "Synced to finlens-state.json in “finlens-test”, last saved …".
  • Clicking it opens Settings → Import.
  • After Disconnect: Not synced. The tooltip says no folder is connected, and a click opens Settings → Import.

7. Sync badge after access lapses (Reconnect)

  1. On Settings → Import, click 📁 Pick a Folder and choose finlens-test again. The badge shows Synced.
  2. Close the InPrivate window completely.
  3. Open a new InPrivate window and open index.html again. (F5 is not enough: access only lapses when the tab is closed.)

Note: InPrivate may drop all saved data when closed. If FinLens opens empty with no folder, do this test in a separate Edge profile (profile picture → Other profiles → Add profile) instead, closing and reopening that profile's window.

  1. Look at the badge and the banner above the page.
  2. Hover over the badge.
  3. Click the badge. Allow edit access when Edge asks.

Expected:

  • On reopen: Not synced, plus a banner "Backups paused. FinLens needs your permission again to use “finlens-test”…" with a Reconnect folder button.
  • The tooltip says "FinLens needs your permission again… Click to reconnect."
  • Clicking the badge brings up the permission prompt. After allowing, the badge turns Synced and the banner clears.

8. Narrow window: ☰ menu

  1. Restore the window and drag its edge until it is narrower than about 1000px.
  2. Click the ☰ button.
  3. Click Budget.
  4. Open ☰ again, then click the dimmed area outside the menu.
  5. Narrow below about 720px.

Expected:

  • Below 1000px the nav links are replaced by ☰. The bar stays one row.
  • The menu lists Overview, Transactions, a Plan group (Budget … Forecast), Trends, AI Analysis and Settings, and marks the current screen.
  • Clicking Budget opens it and closes the menu. Clicking the dimmed area closes it.
  • Below 720px the gear also moves into the menu.
  • No horizontal scrollbar.

9. Regression: every screen still renders

  1. Set the window back to full width. Set the range to All time.
  2. Visit Overview, Transactions, all five Plan screens, Trends and AI Analysis.
  3. Open each Settings tab: General, Import, Accounts, Credit Cards, Categories, Data & Reset.
  4. On Transactions, click a row. The detail drawer opens. Press Escape.

Expected:

  • Every screen renders. No red errors in the Console.
  • Text is readable everywhere in the older screens.
  • Settings tabs are plain text (no emojis). The drawer closes on Escape.
  • Overview's account sparklines and the Income/Spending/Transfers chart use the new colors (indigo/teal), not the old green.

Please check before merging

  • Pick your real folder in Edge/Chrome: the badge turns Synced, and its tooltip shows the folder and last-save time.
  • Close and reopen the browser: the badge says Not synced, and clicking it reconnects.
  • Settings → General has no Theme row, and FinLens stays light with Windows set to Dark.
  • Narrow the window below 1000px and use the ☰ menu.
  • Combine two accounts in the accounts popover and check Overview totals.
  • Skim each screen for anything that looks off (colors in screens not yet redesigned).
  • Manual QA passed in Edge/Chrome with a real folder

Generated by Claude Code


https://claude.ai/code/session_013Z8iBUZo6LRYpLthSp2PRi


Generated by Claude Code

… visual system (v1.13.0)

- One-row app bar replaces the sidebar: Overview · Transactions · Plan menu
  (Budget, Buckets, Debt, Investments, Forecast) · Trends · AI Analysis.
- Sync badge ("Synced" / "Not synced") tied to the folder state; clicking
  reconnects when access lapsed, otherwise opens Settings → Import.
- Date range and accounts become icon buttons with popovers; accounts can be
  combined; a dot shows when a filter is narrowing the data.
- ☰ menu below 1000px, gear moves into it below 720px.
- Theme moves to Settings → General: Light (default), Dark, Match system.
- Clarity tokens for light and dark (AA contrast on every surface), Inter,
  restyled components; charts read their colors from the theme.
- Screen layouts unchanged; per-screen redesigns follow in later PRs.

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 pushed a commit that referenced this pull request Nov 2, 2026
…ty redesign (#16-#21)

Brings the Clarity redesign (#16 -> #17 -> #19 -> #20 -> #21, v1.12.0 to
v1.16.0) into #10 so the Settings -> Database tab can be rebuilt on it.

Conflicts in CHANGELOG.md, CLAUDE.md, README.md, index.html and
js/views-settings.js were resolved by taking the redesign's version of
each file. #10's changes to them (the 1.11.0 entry and version strings,
the Database tab in SETTINGS_TABS, the unregistered-tab guard, README
tips, CLAUDE.md notes) are rebuilt on the new design in the next commit.

js/views-db.js merged cleanly: the redesign's file plus #10's db-tools
view and DB Inspector re-read fix. Both are restyled next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
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).

One conflict: CLAUDE.md's "Last updated" line. Kept this branch's
1.13.0 line and added the v1.10.3-v1.10.5 history. Versions stay 1.13.0;
the CHANGELOG merged cleanly (1.13.0, 1.12.0, 1.10.5, 1.10.4, 1.10.3 ...).
renderImportLog() keeps #18's guards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBXzUjiQbYziDZ8CZft
- Remove the [data-theme="dark"] token set, the Light/Dark/Match system
  choice in Settings → General, and setTheme()/resolvedTheme() and the
  prefers-color-scheme listener. applyTheme() now only points Chart.js
  defaults at the tokens.
- State.theme is still saved and loaded (storage key unchanged), but
  nothing reads it, so anyone who had Dark opens in Light.
- CHANGELOG v1.13.0, README and CLAUDE.md updated. The dark theme comes
  back later in its own PR; the removed token set is in ff459fe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUZo6LRYpLthSp2PRi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request redesign Part of the Clarity redesign

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants