Sign in with a code, made-up data without Plaid, and easier everyday use

- Sign in with a code from your email (the link still works); setup item for the code email
- Use made-up data: a pretend bank with three months of spending, no Plaid account needed
- Is this your pay? when regular money in is filed as something else, with a one-press fix
- They look right: keep every bank-given category in one press
- Your week on Home, Plan in the main menu, history start per bank on Accounts
- A new version of broke is ready, in the sidebar and Settings
- Start skips the rebuild when nothing changed; country screen says it was guessed
- Fix: skipping banks no longer sends you back to setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minimus7andClaude Opus 5.5 committed 2026-11-09 10:54:31 -06:00
1 parent 37a97fe20a
commit 73208b79df
30 files changed
+496 -39

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
// Run: node src/lib/pay.test.ts
import assert from "node:assert/strict";
import { payGuess } from "./pay.ts";
const weekly = ["2026-10-03", "2026-10-10", "2026-10-17", "2026-10-24"].map((date) => ({ name: "Sweetgreen", date, amount: -810.5, kind: "spend" }));
assert.deepEqual(payGuess(weekly), { name: "Sweetgreen", typical: 811, every: "week", count: 4 });
assert.equal(payGuess(weekly.map((r) => ({ ...r, kind: "income" }))), null, "already income");
assert.equal(payGuess(weekly, ["Sweetgreen"]), null, "they said it isn't pay");
assert.equal(payGuess(weekly.slice(0, 1)), null, "one deposit isn't a pattern");
assert.equal(payGuess([{ name: "Refund", date: "2026-10-01", amount: -900, kind: "spend" }, { name: "Refund", date: "2026-10-20", amount: -40, kind: "spend" }]), null, "amounts too different");
assert.equal(payGuess(weekly.map((r) => ({ ...r, amount: -50 }))), null, "small amounts aren't pay");
const monthly = ["2026-08-01", "2026-09-01", "2026-10-01"].map((date) => ({ name: "Acme Payroll", date, amount: -4000, kind: "transfer" }));
assert.equal(payGuess(monthly), null, "transfers between own accounts aren't pay");
assert.equal(payGuess([...weekly, ...monthly.map((r) => ({ ...r, kind: "spend" }))])!.name, "Acme Payroll", "the bigger pay by month wins: $4,000 a month beats $811 a week");
console.log("pay: ok");