Skip to content

v2.0.2: generic storage names (app_db, app-state.json…) + rename script - #58

Draft
gitluis wants to merge 5 commits into
add-mit-licensefrom
rename-app
Draft

gitluis wants to merge 5 commits into
add-mit-licensefrom
rename-app

Conversation

@gitluis

@gitluis gitluis commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #51 (add-mit-license, v1.18.1), merged in. You approved stacking in chat on 2026-11-04: "Stack #58 on #51 (Recommended)". On hold, draft on purpose: part of the v2.0 — Public launch milestone. Merge order: after the stack and #59, and after #54 and #55, but before #56 (Pages deploy).

Summary

Two parts, both so the app's name never ties down anyone's data:

  1. Generic storage names (new, your request): everything FinLens stores is renamed to a name that isn't the app's.
  2. Rename script for the name people see, run once the new name is picked.

1. Storage names

What Up to v1.18.x Now
IndexedDB (all data) finlens_db app_db
IndexedDB (connected folder) finlens_fs app_fs
localStorage keys finlens_* app_*
Backup file in your folder finlens-state.json app-state.json
Start over's backup copy finlens-state-backup-*.json app-state-backup-*.json
JSON export finlens-export-*.json app-export-*.json
Saved AI answer / history finlens-analysis-*.md, finlens-ai-history-*.md ai-analysis-*.md, ai-history-*.md
AI Eval results kind finlens-ai-eval ai-eval-results (old files still load, incl. the published runs)

Names only, as you decided: nothing is copied from the old names. FinLens never sees your data either way. The old copies stay where they are in your browser and folder, but the new version doesn't read them, so it opens empty after updating. See "Before you merge" below.

  • .gitignore lists only the new file names (your call). data/ is still ignored as a whole, but an old finlens-state.json or export sitting anywhere else in the repo folder no longer is, so don't leave those there.
  • Start over clears the new names. It doesn't touch the old ones; remove those by hand (steps below).
  • CLAUDE.md §20 documents the names, the old ones, and the start-fresh decision. All docs that named the old files now name the new ones.

2. Rename script

python3 .github/scripts/rename_app.py "NewName" lists every place the name "FinLens" / "FINLENS" appears (dry run), and --apply changes them: page title, app bar, footer, Settings, messages, README, current docs, and favicon letters if any. History stays as written (older CHANGELOG entries, published eval results, docs/archive/). The AI request doesn't contain the name, so a rename needs no eval re-run.

Version: v2.0.2.

Before you merge this (your data)

  1. On the version you use now: Settings → Data & reset → Export JSON. Keep the file (finlens-export-YYYYMMDD.json).
  2. Merge, then open FinLens. It shows the Welcome, with nothing loaded.
  3. Connect your folder (or import your CSVs), then Settings → Data & reset → Import JSON with the file from step 1. Your plans, edits, rules, account names and settings come back. The API key isn't in exports: enter it again in Settings → General.
  4. FinLens now writes app-state.json in your folder. Delete the old finlens-state.json (and any finlens-state-backup-*.json) when you're happy.
  5. Optional: remove the old browser storage. In Edge or Chrome: the lock/site icon → Cookies and site data → Manage on-device site data → delete, then repeat steps 2–3. Or leave it: it's not read.

How it was tested (headless Chromium 153, on this branch)

  • Storage: after importing the samples and saving a budget, the browser has only app_db and app_fs databases and app_* keys. An old finlens_theme key set before loading is ignored (theme stays light), as decided.
  • Export: downloads as app-export-20261104.json.
  • AI Eval: the published docs/eval-results.json (kind finlens-ai-eval) still loads.
  • Start over: clears every app_* key and both databases (the app recreates them empty when it reloads).
  • Smoke tests (v2.0.1: browser smoke tests in CI (Chromium + Edge) #55's): 14 passed, 0 failed, only the known "-$0.00" bug.
  • Rename script dry run ("Cuadre", used only to test): 171 changes in 20 files. 11 lowercase finlens are left, all on purpose: repo URLs and the old eval kind it still accepts.
  • Not tested: the File System Access API with a real folder (headless has none), so app-state.json being written and read in your folder is only checked by code review. Please test it (steps 3–4 above).

When the name is picked

  1. Check it's free: domain, GitHub repo name, USPTO trademark search.
  2. Update branch (merge the latest master). If v1.18.2: a transfer keyword alone no longer hides money sent or received; flag those for review #59 or anything else merged first, search the diff for finlens-state.json / finlens_: newer text may use the old storage names. Rename them as in the table.
  3. Run python3 .github/scripts/rename_app.py "NewName", read the list, then run it with --apply. Add a line about the name to this PR's CHANGELOG entry, commit and push.
  4. Rename the repo: Settings → General → Repository name. GitHub redirects old links; update your clone with git remote set-url origin https://github.com/gitluis/<new-name>.git.

Manual testing (step by step)

Do steps 1–5 in a separate browser profile (or after exporting, per "Before you merge"), so your real data isn't touched.

  1. Check out rename-app and open index.html in Edge or Chrome. The footer and Settings → General say v2.0.2.
  2. Starts empty: the Welcome shows, with nothing loaded, even if this profile used FinLens before (old finlens_* storage is ignored).
  3. Try it with sample data, then add a budget in Plan → Budget. Open DevTools → Application: IndexedDB lists only app_db and app_fs; Local storage keys start with app_, none with finlens_.
  4. Settings → Data & reset → Export JSON: the download is named app-export-YYYYMMDD.json.
  5. AI Eval (Settings → Database or the dev views): the published results still load.
  6. Real folder (headless couldn't test this): connect a test folder, then Settings → Import → Save Now. The folder gets app-state.json, not finlens-state.json. Reload, reconnect if asked: the budget from step 3 is still there.
  7. Start over: DevTools shows no app_* keys left, and the app reopens on the Welcome. Old finlens_* storage (if any) is untouched.
  8. (Optional) Rename script dry run: python3 .github/scripts/rename_app.py "TestName" lists the changes without editing anything; git status stays clean.

Please check before merging

  • JSON export made on the old version (step 1 above)
  • After merging: folder connected, JSON imported, Save Now writes app-state.json
  • Rename applied (or decided to ship the storage names first and rename later)
  • Version v2.0.2 isn't taken by anything merged before this (renumber if so)

https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV


Generated by Claude Code

@gitluis gitluis added this to the v2.0 — Public launch milestone Nov 4, 2026 — with Claude
@gitluis gitluis added chore Housekeeping: cleanup, dead code, licensing on-hold Ready, but intentionally left open until a later decision labels Nov 4, 2026 — with Claude
gitluis pushed a commit that referenced this pull request Nov 4, 2026
…low the merge order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
gitluis pushed a commit that referenced this pull request Nov 4, 2026
…low the merge order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
@gitluis
gitluis changed the base branch from master to add-mit-license November 4, 2026 13:45
Conflicts were the version lines and the top of the CHANGELOG: kept the
stack's content with v2.0.2 and this PR's entry on top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
Storage no longer carries the app's name, so a rename never touches data.
Names only, as decided: nothing is copied from the old finlens_* names, so
the app opens empty after updating (export JSON first, then re-import).
The old file names stay git-ignored; published AI Eval results still load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
@gitluis gitluis changed the title v2.0.2: rename script (renames what people see, keeps internal data names) v2.0.2: generic storage names (app_data, app-state.json…) + rename script Nov 4, 2026
@gitluis gitluis changed the title v2.0.2: generic storage names (app_data, app-state.json…) + rename script v2.0.2: generic storage names (app_db, app-state.json…) + rename script Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Housekeeping: cleanup, dead code, licensing on-hold Ready, but intentionally left open until a later decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants