The dev changelog gains four entries: the keyless lookup, the damaged-key log line, the stored-form comparisons and the non-empty default guard. It also now gives the numeric-cell precision, and names exactly which omitted fields no longer fail with a 500. The plan doc says how JS comparisons agree with D1 on text that UTF-8 cannot carry. It also lists the one orphan case that delete-first leaves: a D1 delete that commits but whose answer is lost. The sweep that would collect such objects is not built; it deletes user files, so it gets its own review.
285 KiB
Developer changelog (detailed)
Full technical detail of every change, for developers and self-hosters. The concise, user-facing summary — and what the app shows in-product — lives in CHANGELOG.md.
All notable changes to Token Circles are documented here. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
- Field encryption at rest — server-side, per-user keys, shipping dark. Nothing changes on a
deployment until it is given a master key (
DATA_KEK_1, a Workers Secret: base64 of 32 random bytes, one per environment). With one,transactions.description/beneficiary/payor/notes,recurring_transactions.description/notes,bills.name/notes, the notes on accounts, goals, housing, holdings and loan prepayments, learned category patterns, tag-rule criteria and receipt files in R2 are sealed with AES-256-GCM under a per-user data key (users.dek_wrapped), itself wrapped by the master key. The Worker decrypts to compute, so every feature keeps working: this protects a leakedd1 exportor bucket, not the data from the operator. It is not end-to-end encryption, which was dropped. Design, threat model and rollout:docs/plans/field-encryption.md.worker/src/field-crypto.ts— the pure primitives. A text value istc1.<iv>.<ct>, with additional data binding table, column and owner, so a value copied into another column or another user's row fails authentication instead of decrypting. Receipts use a chunked format (TCE1, 1 MiB chunks, index and final flag in every chunk's additional data, so a truncated or reordered object fails to open), streamed through aTransformStream: a 50 MB receipt never sits in a 128 MB Worker beside its own ciphertext.TextDecoderruns withignoreBOM: true— the default strips a leading U+FEFF, so a description starting with one came back shorter.worker/src/data-keys.ts— the key hierarchy, deliberately independent ofJWT_SECRET: 2FA derives its key from that, so rotating the auth secret orphans every TOTP secret, and the same coupling here would orphan everyone's history. A user's first key is created by compare-and-set (… WHERE dek_wrapped IS NULL), so two concurrent first writes cannot seal under two different keys. Once a user has a key, a missing or wrong master key is a 503 on reads AND writes — never a fallback to plaintext. Keys are cached per request (aWeakMapon the Request object), never at module scope, where one would outlive account deletion and key rotation in a warm isolate.worker/src/sealed-rows.ts—sealForInsert,openRows, andsealedUpdate, which sends an edit as one batch in both forms (… AND text_enc = 1sealed,… AND text_enc = 0plain). D1 runs a batch as a transaction, so exactly one matches the row as it stands. That closes the race in which the backfill converts a row between an edit's read and its write, and plaintext lands inside a sealed row for good.worker/src/sealed-objects.ts— receipt upload, streaming download and whole-object read, plus the backfill's reseal.worker/src/backfill.ts— the only place an existing row changes form, by compare-and-set against the exact values it read, so an edit landing in between makes it miss rather than be overwritten. Its own trigger*/20 * * * *(added for dev and prod) returns before the daily jobs, so their frequency is unchanged. Keyset pagination; 60 s / 5 000 rows / 50 receipts per run. A receipt is resealed to a new object key, its row swapped by compare-and-set, and only then the plaintext original deleted. Rows on ownerless legacy profiles stay plaintext.- Master-key rotation (
rewrapStaleKeysindata-keys.ts, the first step of every backfill run): each data key not under the newestDATA_KEK_<n>is unwrapped and wrapped again under it, by compare-and-set onusers.dek_wrapped, up to 1 000 per run. Data keys never change, so nothing sealed is touched. The[backfill]log line gainsrewrapped,rewrapFailedandstaleKeys;staleKeys=0is when the old master key can be removed. A key under a master key that is already gone is counted without an attempt, so retiring one too early is a number in the log, not an error line per user every 20 minutes. A damaged key is not mistaken for one: it is tried, and its[data-keys]line names the user. Procedure: the plan doc, "Rotation". - Migration 0031:
users.dek_wrapped,text_encon the three tables,receipts.enc, and a partial index over unsealed transactions for the backfill. Schema only; every row starts at 0. - Migration 0032: an index on
users.dek_wrapped./api/healthasks whether any key is under a master key that is not configured, and the rotation step asks which keys are not under the newest one. A wrapped key startsdk1.<n>., so both are range lookups on it that read nothing when there is nothing to find — /api/health is public, so neither may scanusersper call. - Migration 0033 seals the free text beside the ledger:
noteson accounts, savings and retirement goals, housing and portfolio holdings,loan_prepayments.note(its owner found through its loan, in the backfill too),category_mappings.patternandtag_rules.criteria. A learned pattern used to be found bypattern = ?; with a key it is found among the profile's opened mappings (mappingFinderinroutes/categories.ts), exactly and lowest id first, as the query found it. Tag-rule criteria are opened before they are parsed, solistTagRulesandautoApplyTagRulesnow take the keyring. Names stay plaintext; the plan doc says why. - Edits to those rows go through
sealedUpdate, which leaves out a field the body left out. Two edits change with it. A retirement-goal edit withoutname,target_amountorcurrent_amount, or a housing edit withoutproperty_name, boundundefinedand failed with a 500; it now leaves that field alone. (Not theirnotes: those routes still write''when the body has none, as they always did.) A portfolio-holding edit withoutnoteswrote the stored value back; it now leaves the column untouched, because the stored value may be sealed, and sealing it again would store ciphertext of ciphertext. /api/healthreportsencryption:off,on, ormisconfigured— which includes a data key under a master key that has been removed.- CI runs the worker suite twice — keyless (
pnpm test), proving a deployment with no key is unchanged, and keyed (pnpm test:sealed, a throwaway key per run), proving no read path forgets to decrypt.test/apply-migrations.tsrefuses to run in the wrong mode: wrangler loadsworker/.dev.varsas secrets, and aDATA_KEK_1there would silently make the keyless run keyed. - Measured in workerd: ~9 µs to open a value, ~2.5 µs to seal one. A 20 000-row ledger opened in full is about 0.7 s of CPU.
- Every read and write of the sealed columns goes through those helpers: the transactions list,
summary, create, edit and bulk edit; imports (with the daily sheet sync and email-in); bills and
recurring rules, mark-paid and populate; the dashboard, exports, reports, counterparties,
backup and restore, receipts; tag rules and category suggestions; the bills reminder email; the
MCP read tools and the v1 ingest. Keyless deployments keep their SQL; with a key, what SQL can
no longer do over ciphertext —
LIKE, textORDER BY,GROUP BY— runs in JS over opened rows and must give the same answers. It reproduces SQLite's BINARY collation, its compensatedSUM, and the tie order its sorter produces (underORDER BY ABS(total) DESCSQLite returns equal totals key DESCENDING, which decides which merchants survive aLIMIT); tests compare the JS path against the original SQL in the keyless run. Shared ascompareBinary,SqlSumandtextMatchesinsealed-rows.ts. - A key never changes what is stored. D1 binds a JS number as REAL and the TEXT column renders it
(
1234is stored as'1234.0'); sealingString(v)would have kept'1234', so a spreadsheet cell or raw API value would store differently with a key than without, and dedup would diverge. Non-string values are rendered by SQLite itself (CAST(? AS TEXT)) before sealing. - Backups and exports are plaintext by contract: rows are opened, receipts decrypted, and the
markers left out, so a file restores anywhere. A restore seals under the RESTORING user's key
and never trusts markers in the file. An export that meets a value that will not open fails
rather than shipping ciphertext;
GET /api/v1/snapshotwithoutincludeReceiptFilesno longer fetches receipt objects at all. /api/healthreportsmisconfigured, notoff, when no master key is set but someone holds a data key — a deleted secret must not look like a deployment that never had one. The backfill no longer lets rows it cannot seal (an owner whose key fails) use up each run's budget, and a row read withouttext_encfails closed on a key fault instead of returning ciphertext.db.batchretries the D1 export lock likedb.run, so the bill and recurring-rule edits, now batches, kept that retry.- Numeric spreadsheet cells in an import are stored as the text the cell showed —
1234, not D1's'1234.0', and to the 15 significant digits SQLite renders a REAL with, so float noise such as0.1 + 0.2is0.3— with or without a key (cellTextinroutes/imports.ts). - Cheaper keyed reads. A bounded text sort without a search reads only
idand the sort column, sorts, and then fetches the page; the keyed counterparty query drops empty names in SQL; MCP merchant grouping no longer opens a description it will not use. Opening values concurrently was measured and does not help (20 000 opens: ~178 ms one at a time, ~171 ms 64 at a time), soopenRowsstays sequential. - A sealed receipt download declares its
Content-Length. The plaintext size is stored in the object's metadata on upload and on reseal, and the decrypting stream runs through aFixedLengthStreamof that size, which also fails a stream that comes out a different length. - Deleting or replacing a receipt deletes its row first (
RETURNING storage_path), then the object that row named, so a backfill reseal landing in between can no longer leave its sealed copy in R2 with nothing pointing at it.db.writeReturningruns such a statement. - Saving auto-categorize results opens the learned patterns once per request rather than once per mapping, and a pattern that fails to be learned is logged instead of dropped.
- Without a master key, the keyring remembers for the rest of the request that a user has no data key. It asked D1 again for every sealed row written, so a keyless import or restore of N rows ran N extra queries — on every deployment, since none has a key yet.
- A JS comparison against stored text first puts the query in the form D1 stores
(
asStoredinsealed-rows.ts: a lone surrogate, which UTF-8 cannot carry, becomes U+FFFD — D1 converts its parameters the same way). The keyed learned-pattern lookup and search now match exactly whatpattern = ?andLIKEmatch. sealForInsertrefuses an insert that leaves out a sealed column whose DEFAULT is not empty (MUST_NAME_ON_INSERT:tag_rules.criteria, DEFAULT'{}'), which would otherwise sit unsealed in a row marked sealed. A test reads every sealed column's default from the schema and holds the list to it.
security.txt(RFC 9116).frontend/public/.well-known/security.txtpoints researchers at GitHub's private vulnerability reporting, and the API host redirects its/.well-known/security.txtthere. The service worker now leaves/.well-known/to the network (frontend/src/swRoutes.ts): it answered every navigation with the app shell, so an installed app showed its sign-in page instead.frontend/public/_headersserves it astext/plain; charset=utf-8, which RFC 9116 requires; the asset server's default for.txthas no charset.frontend/src/__tests__/securityTxt.test.tspins that rule, and starts failing a month beforeExpires.
Changed
- End-to-end encryption is dropped, and the tier contradiction goes with it.
docs/plans/billing-tiers.mdlisted encryption both under "Deliberately not gated" and as "tier still open, Basic or Advanced", and only the second was mirrored intoworker/src/plans.ts, which that document names as the source of truth. Field encryption is not a plan feature at all.SECURITY.mdstopped promising E2EE as "on the roadmap" —ROADMAP.mdnever listed it — and now describes field encryption as what it is.docs/e2ee-research.mdand the bank plan's open decisions record the outcome.
[5.15.1] — 2026-09-09
-
The legacy Express backend's paperwork is gone too. The server itself went in
e5931959; what stayed was a layer of documentation for it that nobody could follow, because the files it told you to build no longer exist. Deleted:docs/self-hosting.mdanddocs/docker.md(19 KB ofdocker composeinstructions against aDockerfileanddocker-compose.ymlthat were removed with the server), and the root.env.example, whose every variable —APP_PORT=3847,PORT,SESSION_SECRET,DATABASE_PATH=db/finance.db,SMTP_*,DEFAULT_USERNAME— belonged to that server and is read by nothing in the tree (the Worker takeswrangler.tomlvars plus.dev.vars; the frontend takesVITE_*fromfrontend/.env*). Both guides are still readable at tagv5.9.3for anyone running an image built from that server. -
Also corrected the references that pointed at them:
README.md,docs/README.md,AGENTS.md,SECURITY.md(which still described the Worker's security features as a contrast against a "deprecated" Express server), andROADMAP.md, which carried an open checkbox for bringingbackend/routes/importRoutes.jsto import parity — unreachable work on a deleted file. Thefrontend/vite.config.tsproxy comment still told you to setAPI_PROXY_TARGETto "the legacy Node/SQLite backend (http://127.0.0.1:3847)" and claimed the Playwright suite pinned it there; both Playwright configs have pinned it at the Worker since the retirement. -
docs/specs/backend/andtest/e2e/specs/stay. They are the API contract, written against the Express routes but describing behaviour the Worker carried over, andAGENTS.mdsays so. The// Port of backend/routes/*.jsheaders inworker/src/routes/stay for the same reason: they are provenance for why a handler is shaped the way it is, not a pointer at a live runtime. -
frontend/public/llms.txt(#556). The app host answered 404 for it while every sibling property in the group had one. Served as a static asset alongsiderobots.txtandsitemap.xml; content mirrorsREADME.mdand about.tokencircles.com, so it introduces no claim that is not already published. Half of it is a "what this does not do" section — the four things most often assumed about a finance app — because the host previously gave a fetcher nothing to check an assumption against.
[5.15.0] — 2026-09-09
Added
-
?plan=<tier>as an entry point from the marketing site (newcore/planIntent.ts,index.tsx,App.tsx,BillingPlans.tsx,styles/index.css). about.tokencircles.com prices four tiers; until now every one of its buttons could only land on the app's root, because nothing deeper worked:- Production ships
VITE_DEFAULT_STORAGE=dexie, so a first-time visitor opens in serverless (local) mode — andisTabVisible('billing', 'serverless')is false. A link straight to Settings would have shown them a page with no Billing tab at all. - Sign-in reloads the page — every path through LoginScreen ends in
window.location.reload()— and a query parameter cannot survive that, so the intent is parked in localStorage and consumed on the far side.
applyPlanIntentFromUrl()runs before render, next toapplyDemoModeFromUrl()and for the same reason —<App/>reads the storage mode once, on the way in. It is the mirror image of?demo=: that one switches to client-only mode, this one switches away from it. The switch is unconditional, exactly as the app's own "Sign in" button already is (App.tsxhandleLogin): asking for a paid tier is asking for an account.It deliberately does not reload, and
handleLoginis why that needed checking rather than copying: it reloads for this same switch, but only because it runs after the app is already up. Every reader of the mode reads it lazily —apiFetchper call, the storage adapter on first use, nothing captured at import — so setting it before render is the whole job, and a reload would have cost a second page load on every click arriving from the marketing site.After
checkLogin()returns true the intent fires — Settings, Billing tab, hash updated — andBillingPlansscrolls the requested card into view and rings it for a couple of seconds (data-plan-wanted). The parameter is stripped from the address bar withreplaceStateso a refresh cannot re-fire it, andfreeis rejected on purpose: it needs no billing page, it is what an account already is. Eleven tests, including that a bad tier never switches anyone out of local mode. - Production ships
-
A light-theme set of plan card art (
public/plans/card-light-*.webp,styles/index.css). The generated art shipped dark-only and said so in a comment: 8-16% mean luminance, so under a light card it would have put dark text on a dark field. A light user saw four flat cards.The light set is the dark set's own ring geometry re-painted, not a second generation run — which is the point: a tier's card is recognisably itself in both themes, and adding a tier means one image, not two art directions. Derived and measured, never eyeballed:
magick card-<tier>.webp -colorspace gray -level 6%,55% -evaluate multiply 0.50 mask.png magick -size 560x831 xc:'#eef3ff' \( -size 560x831 xc:'#3b6fe0' \) mask.png -composite \ -quality 88 card-light-<tier>.webpThe black point is what stops the source's navy ground arriving as a grey wash; the multiply is what keeps the rings a tint rather than a block of azure. Both were picked by sweeping and measuring, not by looking:
-auto-levelwas the obvious first choice and is wrong — it normalises each image independently, so the faint Free card came out with more ink than Basic, inverting the tier gradient. Result is 90-94% mean luminance across the four, the clean mirror of the dark set's 8-16%, with ink coverage still ascending by tier.The shared rule moved from
:root[data-theme='dark'] [data-plan-card]to a bare[data-plan-card]withvar(--plan-card-art, none); each theme block now sets only the four urls. Verified in a real browser against the built CSS — the same check that caught thebackgroundshorthand bug when this art first shipped — that dark resolves tocard-*.webpand light tocard-light-*.webpfor all four tiers.
[5.14.0] — 2026-09-08
Fixed
-
Four colours were built by pasting a
#in front of a value that already had one. Category and tag colours carry the hash at every write — the columns default to'#6b7280'(worker/migrations/0001_init.sql), the seeded categories are'#22C55E'/'#F97316'and the rest (worker/src/profileData.ts), the offline handler writes'#6e9bff', and the pickers are either<input type="color">(Bills, Goals) or swatch buttons overCATEGORY_PALETTE(Categories, Tags) — neither can emit anything else. Nothing strips it, and the places that render these correctly (Tags.tsx,BulkActionBar.tsx) pass the stored value straight through. Sostyle={{ background: `#${tag.color}` }}built##6e9bff; the CSS parser rejects the declaration and drops it silently, with no console warning and a diff that reads like every correct line beside it. The worst of the four was the tag chip on a transaction row (TransactionTable.tsx):.tagsetscolor: #fffand no background of its own, so a tagged transaction rendered white text on the table's own background. The other three —FilterBar.tsx's category and tag swatches andBudgetAlertsCard.tsx's alert dot — are 10x10 circles with no colour of their own, so they were simply not there whenever the row had a colour to show; the budget dot painted only in the one case the value was null, where the bare fallback ('ef4444') happened to make the template's#correct. Both fallbacks now carry their own hash, and the two tag sites, which had none, gained one — so a tag saved without a colour gets a visible chip rather than the same invisible one. The dot inFilterBarusesvar(--primary), matching the dotBulkActionBaralready falls back on; the chip inTransactionTableuses the column's own default#6b7280instead, because.tagprints its label in white and white on the dark theme's--primary(#6e9bff) is 2.7:1, against 4.8:1 for the grey in every theme. Guarded twice:src/components/__tests__/storedColours.test.tsxreads the colour back off the rendered chip, because the markup and the value are both right and only the browser's rejection of##shows the bug;src/__tests__/storedColourHash.test.tsscans every source line for the shape, skipping hash routes (href={#${page}}) and SVG paint servers (fill="url(#${id})"), which are the two places the same syntax is correct. -
Every badge Share failed, for two independent reasons.
shareBadgehands the card's SVG to an<img>and draws that on a canvas, and both steps were broken since the feature shipped; nothing caught it because neither is visible until the button is pressed.baseMarkupemitted<circle data-ring ...>. A valueless attribute is fine in HTML and invalid in XML, and an SVG loaded as an image is parsed strictly — so the document failed to parse,img.onerrorfired, and the catch showed "Could not build the share card".data-ringnow carries its index.- With that fixed the image loaded and
toBlobthrewSecurityError: Tainted canvases may not be exported: Chrome taints the canvas when the drawn SVG contains a<foreignObject>, which the card used to wrap the share line. Replaced withwrapShare, a greedy word wrap into<tspan>s — crude on purpose, since the strings are ours and one sentence each. Verified by rasterising all 34 cards in a real browser on a real origin: 34 of 34 produce a PNG, against 0 of 34 before. Three tests now pin it — every card parses as XML, no card carries aforeignObject, and every share line fits two wrapped lines.
-
The badge timeline's scrollbar was the OS grey.
.brand-scrollinstyles/index.csspaints the thumb in the theme's own--primarygraduating into--accent-warm, the same azure-into-gold the medals use, inset by a transparent border so it reads as a pill in the gutter. Firefox has onlyscrollbar-width/scrollbar-color; Blink and WebKit need the pseudo-elements, so both are set. Applied to the Progress timeline and the dashboard badge rail, and deliberately not globally: the page's own vertical bar stays the platform's. -
The badge art was off centre, twice over. Reported from the app: the Beginnings and Building faces sat high in their black cutout while Mastery and Legacy looked right, and several glyphs did not sit dead centre in the medallion.
- The faces.
aurora-blank-*.webpwere cropped by hand out of the generated row, so each medallion landed somewhere slightly different: Beginnings and Building were 19px high in a 440px frame and also smaller than Mastery (379 and 385 wide against 402). All four are now cropped from the masters by measurement — the medallion's content box is found by threshold, the crop is centred on it, and the side isdiameter / 0.945so every band fills the frame identically. Re-measured: all four content boxes centre on (220, 220) within a pixel. - The glyphs. They are drawn by hand and their ink lands where the paths fall, not where
the 48-unit box says:
a-quartersat 8.95 units high,half-a-year7.35, and 23 of the 34 were off by at least 0.4.BadgeMedallioncannot measure anything — it builds the share card as a string, with no DOM — so the corrections live inGLYPH_OFFSETinbadgeGlyphs.tsand are applied in the glyph transform.scripts/measure-badge-glyphs.mjsgenerates the table: it rasterises each glyph at the app's stroke and scans the alpha channel, so caps and joins count. Every glyph now centres within 0.12 units of the medallion's middle. - The comeback's arrowhead was a corner bracket at (9,8)-(17,16) next to an arc that started at (14,22) — nothing lined it up. The arc and the head are now generated from one circle: both endpoints sit on r=13 about (24,24) and the head's vertex is the arc's end point, so the chevron cannot drift off the ring.
- The faces.
Added
-
A wheel over a sideways strip moves the strip (
utils/horizontalWheel.ts, used byBadgeTimelineandBadgeRail).scrollHorizontallyOnWheel(el)mapsdeltaYontoscrollLeftand returns its own detach function; both call sites register it from the element'srefcallback throughonCleanup, which covers the<Show>case where the strip appears only once a badge exists. Three details are the whole design. It is registered{ passive: false }because Chrome makes wheel listeners passive by default and a passive listener cannotpreventDefaultat all. It callspreventDefaultonly while the strip can still move that way, so the last badge is not a wall the page scroll cannot get past — the pointer never has to leave the strip to carry on down the page. And a gesture whosedeltaXalready exceeds itsdeltaYis left alone, so a trackpad's own sideways scroll is not fought over.deltaModeis honoured (Firefox reports lines, not pixels: a 3-line notch would otherwise move the strip three pixels). -
The badges rail is a dashboard widget (
core/dashboardWidgets.ts,features/Dashboard.tsx,components/DashboardSettings.tsx). It renders at a fixed spot under the period bar, so likemetricsand thedeck-*ids it is excluded from the ordered loop and gated onisWidgetVisible('badges')where it sits. The registry is new and is the point of the change: the page and the Views dialog each held their own copy of the widget lists, and the dialog had no equivalent of the page's splice-in-new-ids migration. Adding an id to both copies would still have left every existing user — everyone, since the rail already shipped — with a savedwidgetOrderthat predatesbadges, so the dialog would have rendered no row for it and the next Save would have written avisibleWidgetswithout it, switching the rail off for a user who never asked.ALL_WIDGET_IDS,DEFAULT_WIDGET_ORDER,DEFAULT_VISIBLE,WIDGET_STORAGE_KEYandloadWidgetPrefs()now live in one module both read. -
Tiered plans that actually differ (
worker/src/plans.ts,plan.ts,apitoken.ts,routes/api-tokens.ts,routes/import-sources.ts,routes/receipts.ts,components/BillingPlans.tsx; decisions indocs/plans/billing-tiers.md). Basic, Advanced and Ultimate carried identical feature flags — only profiles, receipts and reminders differed — so the page asked 3x the money for more of the same.PlanFeaturesgainsapiAccess,automatedImportsandprioritySupport;PlanLimitsgainsapiTokensandreceiptMaxMb. Reminders drop from 2 000/20 000 to 500/2 000/unlimited: a household on top of every bill sends about thirty a month, so the old numbers advertised a cost we would have eaten if anyone had believed them. -
API access is enforced, not just advertised.
POST /api/account/api-tokensand the MCP server had no plan check at all, so a Free account could drive the whole product from a script. Minting now requiresapiAccessand counts live tokens against the plan's cap — live only, so revoking one frees its slot and rotating never needs an upgrade. The check also sits inverifyApiToken, on a column joined into the query it already ran, so a downgrade or a lapsed subscription closes the API instead of leaving whatever was minted while paying working for ever. -
Scheduled imports are an Advanced feature. Gated at the write, and only when the request actually sets a non-
manualschedule — renaming a source that is already daily must not 402 on a field the body never mentioned. Manual import stays free: it is the user's own file. -
Receipt upload size is per plan (5/25/50 MB), because upload size is bandwidth and R2.
RECEIPT_MAX_BYTESstays as the floor a plan with no cap falls back to. -
The plan cards are cumulative.
addedRowsdiffs a tier against the one below and renders only what changed, under an "Everything in X, plus" line. At nine rows a flat list was a wall the reader had to diff by eye. Four generated backgrounds (public/plans/card-<tier>.webp, 3-15 KB each) sit behind the cards in the badges' own language — navy, hairline rings, azure warming into gold as the tier climbs. Two things had to be right and were not at first: the card set thebackgroundshorthand inline, which resetsbackground-imageto none at a specificity no stylesheet rule can reach, so the art rendered as literally nothing (measured:getComputedStyle().backgroundImage === 'none', and an on/off screenshot diff of exactly 0); and the sources were landscape while a plan card is a 200px column, socoverwould have shown a slice of empty navy. The card now setsbackground-color, and the art is cropped to the ring cluster. On/off diff is now 7.2% RMSE. Scoped to the dark theme: the art is 8-16% mean luminance, so under a light card it would put dark text on a dark field. A light set is a follow-up, not a silent compromise. -
Worker fixtures that exercise API tokens, MCP and import sources now seed a paid plan. They were creating users with no
plan, which defaults to Free — the new gates were right to refuse them. -
A timeline of what has been earned, above the gallery (
components/BadgeTimeline.tsxand its module CSS, wired intofeatures/Progress.tsx). At thirty-four badges one flat grid buries the lit ones among the dim, and it answers "what is there to get" while never answering "what have I done". The strip groups unlocks byearnedOn— the month the rule was met, notunlockedAt, the moment the app noticed — so a profile that imports five years of statements reads as five years of history instead of one very busy afternoon. Oldest first, because a timeline reads forwards. The connecting rule is drawn on the stop's dot with a::before, not behind the row, so it never crosses the medal art. -
The gallery sorts earned first within each band (
inBandinProgress.tsx), so a band shows what was done at the top and what is left underneath. The headings say so: "What you have earned" over the timeline, "Every badge" over the gallery. -
The progress-page test scopes its badge count to the gallery section, since the timeline now draws a medallion of its own for each earned badge.
-
Ten badges people will chase, and loans in the evaluator (
core/achievements/definitions.ts,evaluate.ts,achievementsStore.ts). The set was complete but characterless: everything in it was earned by simply continuing. These are the ones with a story. The comeback is the important one — a tracked month after a gap of two or more, once there had been a run of three — because it is the only badge that makes returning read as progress rather than as failure; it is dated to the month tracking resumed. Alongside it: Clean sweep (a month both fully categorised and fully under budget, the intersection of the two month lists that already existed), Reconciled, Ahead of plan (a reached goal whose deadline has not passed — we cannot know when it was reached, so a live deadline is the honest proxy, and the record only ever adds), The full picture, A perfect year, Six months under, Rainy day (a reached goal worth three times the profile's own average monthly spend), Every month of a year (a calendar year, not a rolling streak) and Debt free. -
Debt free needs the amortisation, not a balance.
Loanhas no current-balance column, so the rule runscalculateSchedule+payoffDatefromcore/loanCalculator.tsand asks whether the schedule ran out before today — which means a prepayment that finishes a mortgage early earns it early, as it should.GET /loansomitsrate_periodsandprepayments(workerroutes/loans.tsadds them only on the single-loan route) andLoanSchemawas a plainz.object, which strips unknown keys, so both are now optional fields on the schema and the model.achievementsStore.loadLoansfetches the list and then one detail per loan, and makes no request at all when a profile has none. -
Nine more badges and a fourth band (
core/achievements/definitions.ts,evaluate.ts,components/badgeGlyphs.ts,BadgeMedallion.tsx). The ladder no longer stops at Two years: Three years joins Mastery and a new Legacy band holds Five, Ten and Twenty years plus Twenty thousand entries.BANDSgainslegacyat four rings, and the Progress page needed no change because it already iteratesObject.keys(BANDS). Volume is the second axis, fromVOLUME_STEPS(100 / 1 000 / 5 000 / 10 000 / 20 000):monthOfNthsorts the dates and reads the nth, so importing ten years of statements dates the hundredth entry to the month it actually happened rather than to today — the same rule the rest of the set follows. Volume counts every transaction, tracked month or not, so a two-entries-a-month profile still earns them.public/badges/face-legacy.webpis a fourth generated aurora face, gold-dominant (mean RGB 54/36/24 against mastery's 41/49/74) and blank in the middle like the others, so the glyph is still vector. -
Progress page (
frontend/src/features/Progress.tsx,core/achievements/advice.ts,review.ts,components/BadgeRail.tsx). Sidebar entry after Bills. Nothing fetches: the achievements store keeps its loaded arrays in asnapshotsignal and the page computes advice and the year in review from it.buildAdviceis pure and ranked (budget drift, goal pace, in the red, uncategorised, unbudgeted category, streak at risk); each card has a stable id so a dismissal sticks, and dismissals live in the sameachievementssettings key as the unlocks, so there is no migration.BadgesPanelandStreakChipare deleted: the panel's markup is now the page's badges section, and the dashboard showsBadgeRail, a sideways scroller of earned badges with a link to the page. Settings and the unlock toast both callsetPage('progress').BadgeMedalliongains the generated aurora face (public/badges/face-<band>.webp, one per band, about 20 KB each);face="plain"keeps the drawn one for tests and as a fallback. Plan:docs/plans/progress-page-plan.md. -
Achievements (
frontend/src/core/achievements/*,core/achievementsStore.ts,components/BadgeMedallion.tsx,BadgesPanel.tsx,StreakChip.tsx,AchievementsHost.tsx). One pure evaluator (evaluate.ts) over the profile's transactions, budgets, goals and import logs; a tracked month is three or more transactions dated inside it; the streak is the run of tracked months ending this month or last. Unlocks are{ id, earnedOn, unlockedAt }records kept as JSON under the profile settings keyachievements, not a table: fifteen rows did not justify a migration, a route and four backup sites, and settings are already per profile, in both storage modes and in every backup.api.tsdispatchestc:data-changedafter any non-GET, non-settings request;AchievementsHostdebounces that into a refresh, and the first evaluation on a history toasts once as a summary. Art is the SVG ring recipe from the gallery page (disjoint-collidersgallery-viewer/token-circles-badges.html); the share card is rendered client-side from the same SVG. Plan:docs/plans/achievements-and-badges-plan.md. -
Marketing stills: no verify-email banner, year-to-date transactions (
frontend/scripts/gen-marketing-shots.mjs). The fixture account never verifies its email, soVerifyEmailBannersat above every frame; the init script now sets its per-tab dismiss key (tc:verifyEmailDismissedin sessionStorage) and the shot loop fails loudly if the banner is on screen anyway. The transactions frame navigates to#transactions?period=ytd— the current month has only a handful of rows early in the month, and the frame's minimum is five.
Fixed
- A tour step navigating to a lazily-loaded page flashed the "target missing" banner
(
Spotlight.tsx, new__tests__/spotlightLateTarget.test.tsx). Two effects race for the same state: the step-change effect resolves the anchor with a MutationObserver and a 6s budget, callingshowTargetMissing()only when that budget expires — whileupdatePositions, which runs from a 100ms timer and from every resize and scroll, was callingsetTargetMissing(true)the instantquerySelectorcame back empty. On a page whose chunk had not mounted, the second won first and the banner appeared over a step that resolved milliseconds later.updatePositionsnow only hides the highlight; raising the banner belongs to the one effect that knows how long it has waited. Found by the pre-release tour walk, which reportedMISS step 1: Settings 97x50 [target-missing banner]— a spotlight with a real measured rect and the banner, which is the shape of this race. The step passes in isolation; it needs the full 15-tour walk to be slow enough to lose.
Changed
-
The bottom of the transactions table (
TransactionTable.module.css,TransactionSummaryBar.module.css). Three faults stacked into one ragged corner: everytbody trdrew aborder-bottom, the last one included, so a straight 1px rule ran across the card'svar(--radius)(14px) bottom and stopped dead where the corner curved away; the card hadbox-shadowbut no border, which on the dark themes is no visible edge at all; and the page-summary bar sitting flush beneath it usedborder-radius: 6pxagainst the table's 14px. Now:tbody tr:last-child td { border-bottom: none }, a1px solid var(--border)on the table,var(--radius)on both summary-bar variants, and 12px between the blocks. -
The Progress page's band headings carry their own rule (
Progress.tsx,ProgressPage.module.css)..bandhad a flatborder-top: 1px solid var(--border)— the plain grey line the OrbitalDividers above had just replaced. The line is gone; the heading row gains a.band-rulestrip running out of the label in--primarythrough--accent-warm, fading before the hint on the right — the medals' own azure-into-gold. Deliberately quieter than an OrbitalDivider: these sit one level below the page's sections, so no arc and no planets. -
The sidebar's Progress glyph (
App.tsx). It drew a pie wedge and a three-bar chart overlapping in the same 24 units and read as neither. Replaced with a line climbing inside its axes, arrow corner at the end — distinct from Savings Goals (the bare trending-up line, no axes) and from Budgets (bars). -
Save & Close is in the Views modal header (
Dashboard.tsx,DashboardSettings.tsx,DashboardPage.module.css).DashboardSettingsgrew aregisterSaveprop mirroring theregisterResetit already had, so the host modal renders the button without knowing how saving works. The footer button stays — the widget list scrolls, and whichever end you finish at should have a way out. -
The Progress page's section headings are
OrbitalDividers (features/Progress.tsx), the same orbit-arc separator every other section-bearing page uses; they were plain<h2>rows. The hint text moves to the divider'smetaslot and "Restore dismissed" becomes anOrbitalAction. Each<section>swapsaria-labelledbyforaria-label— the divider owns its own heading and the old ids no longer exist.progressPage.test.tsxneeded amatchMediastub, since the divider asks aboutprefers-reduced-motionon mount (tagsPage.test.tsxhas the same stub for the same reason). -
The badge rail no longer touches the cards below it (
BadgeRail.module.css). It carried no bottom margin at all, so the rail and the first chart card read as one block; it now has 20px, against the period bar's 16px above it.
Fixed
-
The dashboard's period bar stopped pinning. #534 put
<PeriodBar>and the streak chip in a shared.periodRowflex wrapper;position: stickyonly travels inside its own parent's box, so a wrapper sized to the bar pins it for zero pixels — the exact failurePeriodBar.module.csswarns about at the top of the file. Nothing went red because the dashboard fixture was a little shorter than the 720px viewport, sosticky-period-bar.spec.tshit itspageIsScrollableguard and skipped the dashboard case. #536's badge rail made the page taller, the case ran for the first time in two merges, and the bar was measured 402px above the viewport.Dashboard.tsxnow renders the bar and the rail as siblings of the page container,.periodRowis gone, andBadgeRail.module.csscarries the 12px the row used to supply. Two things stop it recurring: the three pinning cases are tagged@smoke, so a pull request runs them instead of only main, and the describe pins a 560px-tall viewport so every page under test is scrollable and the guard stays a guard. -
Thirty-four
styles.*references pointed at classes their CSS module never declared. A module exports only what its stylesheet declares, and a miss is silent —styles.whateverisundefined, the attribute rendersclass="... undefined"or nothing, and neither tsc, eslint nor the build says a word. Auditing every reference infrontend/srcagainst the export map vite actually produces turned up thirty-four across twelve files, in three kinds. Wrong name:ChartWrapperasked forchartTall/chartMedium/chartShortwhileChartContainer.module.csswrites.chart-container.tall/.medium/.short, which export astall/medium/short— so thevariantprop had never applied a class (invisible today, since both Dashboard call sites also pass an inlineheightthat outranks it). Rule missing:AnalyticsPage.module.csshad no.empty-stateat all, so six empty and loading states rendered as bare text in a panel's top-left corner; Goals' category modal, a copy of Bills', never got.btn-linkor.color-inputcopied with it, leaving "+ Add Category" a native grey button and the colour field at the browser's ~50x25px default; Import's paste tab put.form-controlon a select and a textarea against a module with no such rule. All three added, matching the existing house rules verbatim. Vestigial: the seven transaction-table headers asking for a base.col(.transaction-table thalready styles them), Loans' three icon buttons asking for a base.btnunder standalone.btnSm/.btnGhost, the budget-alertokstate, BillCalendar's paid row (already showing "Paid" and a green check), Spotlight's three placement classes (placement is computed into an inline style), and single dead references inApp,OverviewDeck,AccountsandTags— removed, several of which had been emitting a literalundefinedclass into the DOM.TwofaSettings'layoutStyles.btnDanger ?? layoutStyles.btnSecondaryis left as is: it already degrades on purpose, and whether the shared button system should grow a danger variant is a design call. -
The app never linked Privacy or Terms.
about.tokencircles.com/privacyand/termsexist and are real (operator, sub-processors, updated 2026-07-14), but a grep offrontend/srcfound no link to either — not on the sign-in screen, not in Settings.components/LegalLinks.tsx(new) renders both as absolute links (target="_blank" rel="noopener noreferrer") and exports the URLs; it sits in the sign-in footer next to Support and in Settings → About under Support. A case inloginScreen.captcha.test.tsxpins the sign-in screen having them, since that is the screen that was missing them. -
The dev deployment and both API hosts were indexable. Search Console reported
api.dev.tokencircles.com/as a 404 — it had crawled an API host (found through certificate transparency, most likely) because nothing told it not to. Auditing every host:dev.tokencircles.comserved prod'srobots.txt(Allow: /plus prod's sitemap), so a full second copy of the app was open to ranking; the API hosts served Cloudflare's managed "content signals" file with noDisallow; and no host sentX-Robots-Tag. The 404 itself was correct — there is no root route — it was the crawl that should never have happened.frontend/src/crawlerPolicy.ts(new) is a Vite plugin gated onmode === 'production'. For every other build —--mode dev, which both the dev deploy and PR previews use — it injects<meta name="robots" content="noindex, nofollow">, overwritesrobots.txtwithDisallow: /, and appends anX-Robots-Tagblock to_headers. Three signals because they have three consumers: the meta for renderers, robots.txt for the crawl gate, the header for every non-HTML asset. It runs incloseBundle, notwriteBundle: Vite copiespublic/— which holds prod'sAllow: /— intodist/afterwriteBundle, so an earlier hook would write the Disallow and then watch the Allow land on top of it. Verified by building both modes. Prod emits nothing, sopublic/robots.txtstays the single source of truth there.worker/src/index.ts: a middleware setsX-Robots-Tag: noindex, nofollowon every response in afinally, so 404s fromnotFoundand handler-written 4xx carry it;onErrorsets it again explicitly, because the response it builds replaces the one the middleware stamped.GET /robots.txtreturnsDisallow: /as the courtesy copy — Cloudflare's managed robots.txt prepends its block to whatever the origin serves there, and the Disallow survives.- Tests:
worker/test/crawler-policy.test.ts(200, 404, unauthenticated 4xx, robots.txt) andfrontend/src/__tests__/crawlerPolicy.test.ts(both modes, the_headersmerge,apply: 'build').
[5.13.1] — 2026-09-01
Changed
-
Sign-in screen relaid out (
LoginScreen.tsx, newLoginScreen.module.css). Inline styles moved to a CSS module, matching the rest of the components, and the structure changed in four ways:- Labels above every field. A placeholder is not a label — it disappears the moment you type,
so a half-filled form stops saying what its fields are, and assistive tech has nothing to
announce.
Forgot password?now sits on the password label's own row rather than floating under the input. - The captcha is invisible unless it wants a click. Turnstile gained an
appearanceprop and the screen passesinteraction-only. Cloudflare then renders nothing while the challenge passes silently, which is nearly always. - The submit button is no longer gated on a captcha token. It could not stay that way: with
no widget on screen, a disabled button has nothing to explain it. Submit awaits the token
instead, via a
captchaToken()helper wrapping the existingwaitForTurnstileToken— normally already resolved, since the challenge finishes long before a password is typed. The "checking your browser" hint now shows only while a submit is genuinely parked on it. - One account line, below the alternatives. "Don't have an account? Create one" was above the Google/passkey buttons it competes with, and "Try the demo" was a separate underlined link at the bottom. They are now one line under the alternatives, and the demo is described as what it is — "Continue with no account" — since "demo" is jargon for using the app without signing up.
The footer's two stacked rows (support link, then version) are a single two-column row. Both rules — the
orseparator and the footer's — are brand gradients rather than flat hairlines: theorfades up to the logo blue from each side toward the word, and the footer's is the same blue strongest at the centre and gone by both edges, drawn as a pseudo-element since a border cannot hold a gradient.The register transition no longer says "Account created".
/api/auth/registerreturns the same neutral response whether or not the email existed — that is the anti-enumeration guarantee — so the screen cannot know which happened, and claiming creation tells an existing owner something untrue. It says "Signing you in…", which is what both branches actually do.Two Turnstile details worth keeping: Cloudflare only decides an
interaction-onlywidget's visibility on its first execution, so a laterreset()can never make a hidden one appear —retry()removes and re-renders, which is why it still works. And the widget's container drops its fixed margin in that mode, or an empty box would reserve a permanent gap for something that usually never renders. The component's own "blocked" panel is our markup, not Cloudflare's, so it still appears when the script is blocked.Covered by
components/__tests__/loginScreen.captcha.test.tsx: the button stays usable with no token, the request still carries one (waiting if needed), the hint appears only once a submit is blocked, both labels are bound to their inputs, and the account line follows the alternatives. - Labels above every field. A placeholder is not a label — it disappears the moment you type,
so a half-filled form stops saying what its fields are, and assistive tech has nothing to
announce.
-
Subscriptions view redesigned around filter pills and compact cards (
Bills.tsx,SubscriptionCard.tsx). The per-category collapsible sections are gone; a pill row (All · one per category · Paused) filters one flat gallery, with the pure filtering/grouping logic infeatures/subscriptionFilters.ts(unit-tested). One label rule everywhere:category_name || category || matchBrand(...).defaultCategory— the old view grouped by the brand default while cards showed the user's category, so a card could sit under a heading that didn't match its own pill. Cards are single-row (36px brand icon · name + category/date · amount + due countdown) with exactly two controls: a mark-paid icon button and a "…" menu (new reusablecomponents/OverflowMenu.tsx, portalled to<body>because cards clip withoverflow: hiddenand glass panels carry backdrop-filter; closes on select/Escape/outside press/scroll). Delete moved behind the menu and confirms viashowConfirm({ danger: true })instead ofConfirmButton.
Security
-
The support contact form was not captcha-gated (
routes/support.ts,SupportContact.tsx). The route's own comment admitted it — "Turnstile will gate this too once wired (backlog #4)" — leaving an unauthenticated endpoint that sends two emails per accepted request: the relay to the private inbox, and an acknowledgement to a caller-supplied, unverified address.The only control was
enforce(support:<ip>, 5, 3600). A per-IP cap does not bound this: rotating IPs walk straight past it, and the cost lands on the sending domain's reputation — which is precisely what puts recipients on Resend's suppression list, the failure this same release is cleaning up after. Content injection was already handled (the ack deliberately never echoes the submitted message back, so it carries no attacker-chosen payload).Now gated by
verifyTurnstileDetailed+captchaRejection, the same pair the auth routes use, checked before any work so a forged token never reaches the mail provider. The client renders the widget asinteraction-onlyand awaits the token on submit rather than disabling the button, so in practice nothing is visible unless Cloudflare wants a click. The per-IP and per-recipient limits stay as defence in depth.worker/test/support-captcha.test.tscovers it — and was checked against a build with the gate removed, where three of its four cases fail. The fourth (no mail on a forged token) was vacuous at first: withoutRESEND_API_KEYin the test env,sendMailshort-circuits before calling out, so it passed with or without the gate. The env override sets one.
Fixed
-
A delivered-looking support request that was never delivered (
email.ts,routes/support.ts).sendMailreturned{ sent: true }for any 2xx from Resend, andsupport.tsreads that as "the relay went through" — it is the condition gating the acknowledgement mail to the sender. But a 2xx only means Resend accepted the message. A recipient on the account suppression list (anything that has previously hard-bounced or drawn a complaint) is accepted and then dropped at delivery, so the sender got "we received your message" while the support inbox got nothing.Nothing in the send response reveals that, and there is no synchronous way to find out — so this logs what it can instead:
sendMailnow returns Resend's messageidand logs it, andsupport.tslogs it beside the ticket id. That pairing is the only handle tying a request to its row in the Resend dashboard, where the real status and the suppression reason live. It does not make delivery reliable; it makes a lost message findable.The suppression itself is account state, not code — it is cleared from the Resend dashboard (open the email, "Remove from suppression list"). Ruled out while diagnosing:
resend._domainkeyis present on the root domain,send.tokencircles.comcarries the SES return path, and DMARC isp=none, so this was never an SPF/DKIM/DMARC failure. The domain's MX is Cloudflare Email Routing, which forwards rather than hosting a mailbox, so a missing or unverified route for the support address is the likeliest origin of the original bounce.Durable delivery wants the support request persisted to D1 before the email is attempted, which the route's own comment already flags as the intended direction; that needs a migration and is left to its own change.
-
A bill marked paid read back as unpaid (
core/storage/handlers/bills.ts). The serverless handlers disagreed with themselves about which calendar a stored date is in.billsPayOrMarkPaidwrotenew Date().toISOString().substring(0, 10)— a UTC date — whileisBillPaidForCurrentPeriodcompared it back with.getMonth(), which is local. A bareYYYY-MM-DDparses as UTC midnight, so west of UTC its local month is the previous one.Two independent defects, and the write is only half of it. West of UTC the read alone breaks: on the 1st of any month a bill marked paid was reported unpaid the instant it was saved, so the mark-paid button stayed clickable and the bill never left the list. East of UTC the write breaks too, between local midnight and the UTC rollover — which is how it was caught, at 01:50 CEST on 1 September.
Both sides now use the local calendar:
isoDate()to write, and a newparseLocalDate()— its inverse, added beside it inutils/period.ts— to read.isoDatealready carried the comment "avoids the UTC off-by-one from toISOString()"; the bills handler simply never used it.Two more instances of the same mismatch in the same file went with it: the month calendar took a bill's day-of-month from
new Date(due_date).getDate()(drawing a bill due on the 15th on the 14th west of UTC, and dropping one due on the 1st out of the month entirely), anddaysUntilmeasured from a UTC-parsed midnight against a local instant.The worker is not affected and is deliberately left alone.
worker/src/routes/bills.tshas the same-shaped code, but the Cloudflare runtime is UTC, so its write and its read are on one calendar. Verified rather than assumed: a probe in the workers pool reportsgetTimezoneOffset() === 0and parses2026-09-01as month 8 even with the host atAmerica/New_York. It remains timezone-blind — it decides "this month" in UTC rather than in the user's zone — but that is a separate question needing the user's timezone, not this bug.Regression coverage in
localHandlers.billsPaidDate.test.tspins both the zone (process.env.TZ, self-verified viagetTimezoneOffset()) and the instant (vi.setSystemTime, faking Date only so fake-indexeddb keeps real timers). It has to pin both: the bug needs the UTC date and the local date to fall in different months, which is why an ordinary mid-month run never caught it — and why CI never did either, its runners being UTC. -
localHandlers.recurring.test.tsonly passed on UTC runners (test-only). It seedednext_datefromnew Date().toISOString().slice(0, 10)whilerecurringPopulatecompares againstisoDate(new Date())— the very anti-pattern that handler's own comment warns about. West of UTC the test therefore seeded tomorrow, the idempotency guard fired, and all five balance tests failed with 409. The handler was correct throughout; only the fixture was on the wrong calendar. The full suite now passes underTZ=America/New_YorkandTZ=Pacific/Aucklandas well as UTC. -
Every page load replayed the whole stored error log to the console (
core/logger.ts).flushLogs()ended withtrimmedLogs.forEach(writeLogToConsole)— andtrimmedLogsis the buffer merged with everything already inlocalStorage, not just the new entries.initLogging()flushes on boot, so each reload re-emitted up toMAX_LOGS(500) past errors. Errors also flush immediately (addLogEntry), so a new one printed twice: once live fromlog(), once from the flush.The replay is convincing because it looks live: timestamps hours apart arrive in one burst, each carrying the stack of the flush that reprinted it rather than of the call that failed, and reloading "reproduces" it every time because the source is storage. This cost a real investigation — login-screen
/profilesand/categoriesfailures withCannot read properties of undefined (reading 'routeApiRequest')were read as a live storage-mode desync, when they had happened once, hours earlier, in a mode the app had since left. An incognito window (emptyapp_logs) showed the truth: the signed-out login screen makes exactly one request,/api/auth/me, which correctly 401s.flushLogs()now only persists. The console is written solely bylog(), once per entry, as it happens. -
Production builds wrote to the user's console (
core/logger.ts). The level gating was inverted:debug/info/warnwere hidden behind thedebugModeflag, buterrorhad no gate at all and calledconsole.errorin every environment. A console is the user's, not ours, and a shipped app spilling internals into it is noise at best.Console output is now decided in one place,
shouldWriteToConsole(): production writes nothing; development keepswarnanderror;debugModeturns everything back on in any build, so a production report is chased with "enable debug mode, reproduce, send the log" rather than a special build. Follows theimport.meta.env.DEV || localStorage flagpattern already used byCalcTracer.tsx.None of this changes what is recorded — every level is still stored for the LogViewer behind Settings → View Logs, which is the supported way to inspect a problem.
core/__tests__/logger.test.tscovers both halves of that split: the console stays silent in production whilegetLogs()still returns the entries, and boot no longer replays history. -
A passkey that cannot be used here failed silently (
core/webauthn.ts). The platform reports "you cancelled", "no credential matches this site" and "the prompt timed out" as one indistinguishableNotAllowedError— deliberately, so a site cannot probe which passkeys you hold.isAbort()lumped it in withAbortError, and the callers hideabortedresults (else if (!result.aborted) setError(...)), so pressing "Sign in with a passkey" while only another domain's passkey was saved did visibly nothing.isAbort()now means onlyAbortError— a request this code called off itself (the explicit button aborts the pending conditional one), where no human ever saw a prompt.NotAllowedErroris handled separately: an explicit press always returns a message naming the cause the user can act on, while the background autofill request staysabortedso it can never paint the form on page load. Registration keeps treating it as a cancel — creating a NEW credential has no "belongs to another site" case. Covered bycore/__tests__/webauthnNoMatchingPasskey.test.ts. -
An unreachable API crashed the app at the login screen (
core/webauthn.ts,components/LoginScreen.tsx).postJsonawaitedapiFetchbare, so a network-layer failure (offline, DNS, a CORS preflight the browser blocks) rejected withTypeError: Failed to fetchinstead of returning a Response.LoginScreen'sonMountfires the conditional-mediation passkey autofill asvoid signInWithPasskey({ conditional: true }).then(...)— a.thenwith no.catch— so that rejection went unhandled, reached the global handler and painted "App Crashed" over a login screen that was otherwise fine. Regression from the passkeys work in 5.13.0: before it, nothing called the API fromonMountat the login screen.Fixed at the source (every passkey call now reports a network failure as
ok: falsewith "Could not reach the server") and hardened at the call site (the floating chain has a.catch). Covered bycore/__tests__/webauthnNetworkFailure.test.ts.This is why PR preview deployments showed "App Crashed": preview frontends are built with
build:dev(VITE_API_URL=https://api.dev.tokencircles.com) and served from a unique<version>-finance-manager-preview.<account>.workers.devorigin, which the dev Worker's fixedCORS_ORIGIN(https://dev.tokencircles.com) does not allow — so every preview's first API call fails the preflight. Previews are still API-less by design (use serverless/local mode there); they now land on a working login screen instead of a crash page. -
Auto sync surfaces execute-step failures (
ConnectedSources.tsx).importFlow.handleImportcatches every error intoflow.error()and never callsonImported, butautoSynconly readflow.error()after the fetch step — a rejected/api/import/execute(422 validation, 500) ended with the spinner stopping and no message at all. Auto sync now checksflow.error()afterhandleImportand toasts it. Regression test:frontend/src/features/import/__tests__/connectedSources.autoSyncError.test.tsxmounts the real component over a mockedapiFetchand asserts a failed execute produces exactly one error toast (and a successful one none). -
Mark-paid transactions were stamped USD (
worker/src/routes/bills.ts). The INSERT omittedcurrency/amount_local, so the schema default (currency TEXT DEFAULT 'USD', 0001_init.sql) applied — an EUR profile saw a converted-from-USD estimate on every bill payment while the Bills page showed the same amount in EUR. Now mirrors the recurring cron:currency= the profile's configured base (configuredBaseCurrency, newly exported frombase-currency.ts; EUR fallback) andamount_local = amount. Covered byworker/test/bills-mark-paid-currency.test.ts. -
A paid subscription kept its clickable "Mark Paid" button. GET
/api/billscomputespaidper period, and the route 409s a second mark-paid — so after paying, the button could only produce "Failed to mark bill as paid". The card now swaps the action for a Paid badge (subscriptionCard.test.tsxpins this). -
Pause/Resume failed in serverless mode.
togglePause(formerlypauseSubscription) echoed the whole GET row back into PUT/api/bills/:id; seeded rows carryrecurring: 1(number) which fails the router'sz.boolean()validation. Both backends treat PUT as partial, so it now sends only{ is_active }.
[5.13.0] — 2026-08-31
Added
-
Remote MCP server at
POST /mcp, plus a bearer-authed account API. Stateless streamable HTTP JSON-RPC (initialize/tools/list/tools/call/ping), 15 tools across read, write and import scopes. Tokens aretc_pat_-prefixed, stored as a SHA-256 hash (migration0027_api_tokens), and minted from cookie-authed routes under/api/account/api-tokens.- Auth is an allow-list, not a widening of
authenticateRequest. A bearer token reaches/mcpand/api/v1/*and nothing else; a regression test asserts it still gets 401 on/api/transactions,/api/accountsand/api/billing/status. - File bytes never travel through a tool argument. A model emitting a base64 spreadsheet
token by token is slow, costly and truncates, so
prepare_importreturns a 15-minute HMAC-signed capability URL bound to one purpose, and the bytes go over plain HTTP. The same applies in reverse forexport_snapshot. - Cross-user isolation is asserted table-driven over the live tool registry, so a new tool is covered the moment it is registered.
- Auth is an allow-list, not a widening of
-
POST /api/v1/importruns the bank adapters before falling back to generic CSV. The generic path guesses a mapping from row 1, which assumes an already app-shaped file: header on the first line, one signed amount column, UTF-8, comma-separated. An Erste export is none of those — Windows-1250, semicolon-delimited, a bank preamble above the header, and debit/credit split acrossIsplate/Uplate— so it was refused 422 while the Bank Imports tab accepted it.?bank=forces an adapter,?account=names the target account, and the response and import log both record which parser ran. -
Passkeys (WebAuthn), and they replace the 2FA prompt rather than adding to it. Migration 0030,
@simplewebauthn/server,worker/src/routes/passkeys.ts. A passkey proves possession and user verification in one gesture, so a successful assertion mints a full session with no TOTP step — the point of the feature for anyone who never enabled 2FA. Registration is sudo-gated the way GitHub does it: a session younger than 10 minutes passes, otherwise the password or a 2FA code is re-presented (registrationAllowed), or a stolen cookie could silently add a permanent second credential.userVerification: 'required'on both ceremonies, a UNIQUE credential id (409 on replay), counter regression logged distinctly from a failed assertion, and 10 passkeys per account. The RP id comes fromCORS_ORIGINand fails closed — never from the request URL, which an attacker controls. Conditional mediation puts passkeys in the email field's autofill; the explicit button aborts that pending request first. -
TOTP two-factor with recovery codes. Migration 0028,
worker/src/totp.ts(RFC 6238, HMAC-SHA1, ±1 step drift) plus a per-user high-water mark so a code cannot be replayed inside its own window. The QR is rendered in-page withuqr: the secret must never reach a third party, which rules out every hosted chart API. Ten single-use recovery codes, stored hashed. Enabling deletes every OTHER session, and disabling is rate-limited — it is a credential check, and without a budget it is an offline-grade oracle reachable online. -
Email-code sign-in, bound to the browser that asked for it. Migration 0029 plus a signed httpOnly ceremony cookie (
fm_logincode) carrying the code id and address. That binding is what makes the rest safe: brute force cannot be spread across addresses, the per-address verify bucket (a trivial lockout DoS) is gone entirely, and codes burn after 5 attempts with at most 3 live per account. The send goes throughwaitUntil, so response time does not reveal whether the address exists, and an unknown address does the same hashing work. -
Settings → API access: create, inspect and revoke personal access tokens. The MCP server above landed with no way to mint a token except a hand-written
fetchfrom the browser console.frontend/src/features/ApiAccess.tsxdrives the three cookie-authed endpoints.- The reveal is a modal that only an acknowledgement closes. The worker returns the secret exactly once and keeps only a SHA-256 hash, so a value shown in a table row would be lost to a stray refresh. A backdrop click deliberately does not dismiss it; a test pins that.
- The tab is hidden in serverless mode.
apiFetchanswers from IndexedDB there and never reaches a Worker, so a token would authenticate nothing. The rule moved intosettingsStore.isTabVisible, which also now covers the pre-existing billing gate. - The default-profile picker is a safety control, not a convenience. The MCP tools resolve "token default, then the FIRST profile", so an unpinned token silently acts on whichever profile sorts first once you have more than one.
GET /api/account/api-tokensnow returnsscopesas an array. They are stored stringified, and passing that through made every clientJSON.parsea field of an already-parsed response; a row that does not hold an array degrades to no scopes rather than failing the whole listing.parseScopesinapitoken.tsis that one tolerance rule, shared with the bearer-auth path so the two can never disagree about what a token may do.- A failed refresh is never reported as a failed mutation. Both handlers used to await the
list reload inside the mutation's
try, so a 500 on the reload toasted "Could not create the token" over a modal displaying a live, unrecoverable secret — and made a successful revoke look like a failure, sending the user to retry against a token that was already dead. Revoke is now idempotent server-side (COALESCE(revoked_at, …)) for the same reason. - The reveal is portalled to
<body>. It sits in a Settings card whosebackdrop-filtermakes the card a containing block forposition: fixed, which trapped the overlay inside the card and left the rest of the page uncovered and clickable. Focus now moves to the acknowledge button, which is the dialog's only exit. - The profile pin re-seeds on a profile switch. Pages stay mounted, so an open panel kept
the previous profile's id and minted tokens against it — the exact accident the control
exists to prevent. A
/api/profilesfailure now surfaces instead of silently unpinning. - A failed listing says so. It used to render "No tokens yet.", which to someone who came to revoke a leaked token is a lie with consequences.
- Minting is rate-limited (20/hour) like every other credential-issuing route — an API token
deliberately survives sign-out-everywhere, so a burst mint from a stolen cookie cannot be
undone by revoking the session.
expiresAtmust now parse and be in the future: it was passed through ontypeof === 'string', andverifyApiToken'sgetTime() <= nowis false forNaN, so"30d"minted a token that showed an expiry and never expired. - Account deletion deletes
api_tokensexplicitly. D1's cascade does fire, butaccount.tsstates it does not rely on cascade, and every other user-scoped table is listed there.
Changed
- The bank-import core moved to
shared/bankImport/. Detection, parsing, the nine adapters and the canonical table were underfrontend/src/, so only the browser could reach them; they are pure TypeScript, so both runtimes now import the same code rather than forking it. Browser persistence (memory.ts,rulesStore.ts) stays in the frontend. The barrel re-exports the same 42 names, unchanged.shared/sits at the repo root andxlsxis installed underfrontend/andworker/, so a bare import fromshared/does not resolve. Rather than hoist a package to the workspace root,BankAdapter.parsetakes an optional third argument carrying an xlsx loader and each runtime supplies its own() => import('xlsx'); the eight adapters that parse text are untouched.
Fixed
- API-imported rows were left with
account_id NULL.executeImportcreates an account only for a name the caller marks as one — the app marks them from the import preview's tick-boxes — and the endpoint marked nothing. A real 94-row Erste statement reported "94 imported, 0 skipped" while every transaction belonged to no account and appeared in no balance or report. The account?account=names is now created and linked; on the generic path, minting accounts from arbitrary means-of-payment values stays opt-in behindautoCreateAccounts=true. parseDateStringaccepted any year the JSDateparser invented.new Date('REF-88213')is not an error, it is 1 January year 88213 — the parser scavenges a number and calls it a year — so an unmapped bank reference column imported as transactions dated eighty-six millennia out. The free-form fallback is now bounded to 1900–2200; ISO anddd/mm/yyyyinputs are handled by earlier branches and are unaffected.list_transactionsnever terminated a full pagination walk.truncatedcompared the page size against the total row count, which cannot distinguish a full last page from a full middle one: 18 rows at limit 6 left page 3 reporting more to come with a cursor that returned nothing. It now fetches one row past the page.- Tool results were measured once but transmitted twice — as
structuredContentand as the JSON text block clients without structured support read — so the 200 KB cap delivered ~400 KB. whoamiread thesettingstable with no user filter, relying on profile-id keying to stay correct.- The API import no longer shares a rate-limit bucket with the app's own import routes, and a
commit that imports nothing still writes an
import_logsrow — "ran and found nothing new" and "never ran" were indistinguishable.
[5.12.2] — 2026-08-29
Fixed
-
iOS home-screen installs drew the app under the status bar, with white glyphs over it.
index.htmldeclaredapple-mobile-web-app-status-bar-style: black-translucentalongsideviewport-fit=cover. That combination does two separate things in standalone mode, and both hurt:- The web view fills the screen, status bar included.
bodypaddedenv(safe-area-inset-bottom)and nothing at the top, so page content ran underneath the clock..sidebarisposition: fixed; top: 0withpadding: 20px 0 ..., which put the logo and the first nav item squarely behind it. - It forces the status-bar glyphs WHITE whatever the theme.
dawn-lightis--bg: #f7f9ff, so on the light theme the clock and battery were white on near-white.theme-colorwas the hardcoded#0a0e1c—orbit-dark's background — and nothing updated it on a theme switch, so it described the wrong theme half the time. iOS 26 then glasses that strip, which is the blur in the report; the blur was the symptom, the unreadable overlap was the cause.
Apple also lists
black-translucentas deprecated, so this needed replacing regardless.apple-mobile-web-app-status-bar-styleis nowdefault: iOS keeps the status bar out of the page and tints it fromtheme-color. Every existingcalc(56px + env(safe-area-inset-top, 0px))rule degrades to its pre-notch value, because the inset is then 0.theme-colorfollows the active theme.public/theme-init.jsstamps it before first paint — it has to be there, since by the timecore/theme.tsruns the bar is already painted — andsyncStatusBarColor()re-reads the live--bgon every switch.setThemenow delegates toapplyThemeinstead of restating the same four lines, so there is one path that touches the document and it cannot forget the sync.body::beforepaints an opaque strip of exactlyenv(safe-area-inset-top). Insurance, not the fix: underdefaultthe inset is 0 and it has no height at all. It covers the cases where the inset is not 0 — Safari in landscape on a notched phone, and any future iOS that returns to a full-bleed web view — so the glyphs always have a solid, theme-coloured ground. It ispointer-events: none, because a full-width fixed strip that swallowed taps along the top edge would cause the exact failure it exists to prevent..mobile-toggleusedmax(12px, env(safe-area-inset-top, 0px)), which resolves to the inset itself once that exceeds 12px — parking the button flush against the status bar with no gap, and against the notch in landscape. It adds to the inset now..sidebarpads the top inset for the same reason.
src/__tests__/statusBarColor.test.tspins the two colour literals intheme-init.jsagainst the--bgof the theme files they duplicate (the script runs before any stylesheet exists, so it cannot read them), and assertsblack-translucentnever comes back. Verified to fail on injected drift rather than assumed to work. - The web view fills the screen, status bar included.
[5.12.1] — 2026-08-27
Fixed
-
Transaction filters were sent under names the Worker does not read, so they did nothing.
GET /api/transactionsreadsstartDate,endDateandcategory_ids(worker/src/routes/transactions.ts:183-186). Both typed client helpers —api.getTransactions()andstorageFactory.listTransactions()— forwarded the app's own vocabulary (date_from,date_to,category_id) verbatim. An unrecognised query parameter is not an error: the WHERE clause is simply never built, so a "filtered" request returned every row in the profile and reported success.It survived because nothing failed loudly and the two parameters that are exercised most,
searchandtype, happen to have the same name on both sides. The date filter also looked right, because the only caller narrows client-side afterwards. Every hand-built call site in the app (clientPdfReports.ts:97,Analytics.tsx:359,Accounts.tsx:79) already used the Worker's names — the typed helpers were the odd ones out.- Both helpers now translate to the Worker's names, and
getTransactionsadditionally forwardslimit,offset,account_idandreconciled, none of which were reachable through it before.TransactionListParamsgainedoffset/account_idand a note thatpage,perPage,category_name,profile_idandprofile_idsare historical and forwarded nowhere. - The unfiltered default is unchanged on purpose.
Transactions.tsx:456-461documents that its cross-page bulk selection intersects against the whole list, so a defaultlimitwould make a row outside the window read as deleted and silently unselect it.limitstays opt-in until that is reworked; a test pins the no-argument call as sending no window at all.
- Both helpers now translate to the Worker's names, and
-
?offset=without alimitreturned HTTP 500. Found by the tests above, and older than them. SQLite accepts OFFSET only as a suffix of LIMIT, so... ORDER BY t.date DESC OFFSET 2is a syntax error rather than a no-op, and the whole request failed. The handler now emits SQLite's ownLIMIT -1("no upper bound") when an offset arrives alone. Inert values (?offset=0,?offset=abc) emit no clause at all.
Changed
-
The transaction list no longer runs a redundant
COUNT(*)on unwindowed reads.totalis the size of the whole filtered set, which differs from what was just returned only when a window was actually applied — unwindowed, the returned rows are the whole set, so the count recomputed a number already in hand. It is skipped when no window reached the SQL. Tests cover both shapes, including that an unwindowed filtered read still reports the filtered count and not the table size.Measured, so nobody inherits an overclaim: on a 5000-row profile the unwindowed read went from a 44 ms median to 38–42 ms — inside the run-to-run spread. This removes genuinely redundant work and is worth keeping, but it is not the fix for the "deleting is slow" class of report. The dominant cost is serialising and transferring every row, and that stays until the list is windowed or stops re-reading the world after each mutation (11 call sites in
Transactions.tsx). Both are blocked on the cross-page-selection invariant documented atTransactions.tsx:456-461, which is the actual next piece of work. -
The guided-tour gate reported a dead API as a tour regression.
pnpm run test:tourswalks every spotlight tour in a real browser and asserts each step highlights a visible element. It assumed the Worker underneath it would outlive the walk. It does not:wrangler devexits partway through a long run —[ERROR] Error in ProxyController: Error inside ProxyWorker cause: { message: 'Network connection lost.' } at castErrorCause -> emitErrorEvent -> onProxyWorkerMessage— the ProxyWorker websocket to workerd drops, ProxyController treats it as fatal, and the process goes, measured at
durationMs: 104348, roughly 100s after startup. A 15-tour walk always outlives that, so it could never finish inside one wrangler lifetime.From the browser's side a dead API is indistinguishable from a broken app: pages render their empty states, spotlights have nothing to point at, and every remaining tour MISSes. The gate duly reported a UI regression that had not happened — five consecutive times, each one really the same crash. That is a defect in the gate, not just bad luck: a check that cannot tell its own infrastructure dying from the thing it is checking cannot be trusted either way.
frontend/scripts/lib/worker-supervisor.mjs(new) owns the Worker for the length of a run. It spawnswrangler devin its own process group — wrangler forks workerd, and killing only the parent leaves that child holding the port — waits on/api/health, and watches it two ways, because neither alone is enough: the child'sexitevent catches a crash, and a 3s health poll (two consecutive misses, so one dropped probe under load is not a death) catches a worker that wedges without exiting. A wrangler already listening is adopted rather than killed — another terminal's process is not this script's to close — and replaced with a managed one the first time it dies. SIGINT/SIGTERM/exit all kill the group, so a Ctrl-C mid-walk no longer strands a wrangler on :8787.walk-tours.mjsre-walks instead of blaming. A death mid-tour rolls that attempt back wholesale — its steps, its MISSes and its failure lines all disappear — and the tour restarts from step 1 against a fresh Worker, up to three attempts. Before recording any MISS the walk probes/api/healthtwice; if the API is gone that is a[worker]line and a re-walk, never a failure line. Only a walk that ran end to end on a live API is allowed to say anything about a tour.- It recycles the Worker between tours once it is older than
WORKER_MAX_UPTIME_MS(default 60000; 0 keeps only crash recovery). A restart costs a couple of seconds, a mid-tour death costs the restart plus a re-walk, so replacing a worker that is about to die is the cheaper trade. - Three verdicts, three exit codes.
GATE: PASSED/ 0,GATE: FAILED/ 1 (a real tour regression, listed under "Failures"),GATE: UNPROVEN/ 2 (the Worker would not stay up, so those tours were never walked — not a pass, and not a tour failure). Two non-zero exits meaning opposite things is the point; reading the second as the first is the confusion this replaces, so the run says which in words as well as in its exit code. - Worker events print on
[worker]lines and are counted apart from MISSes:Worker: 1 adopted, 1 start, 1 crash recovered, 1 tour re-walk. None of that is a tour failure.
There is no version to pin your way out of the crash, which is why the gate has to survive it rather than avoid it. It reproduces identically on wrangler 4.116.0 with stable miniflare 4.20260730.0 (death at 154s) and on the 4.126.0 / miniflare 5 alpha this repo pins (~104s) — same stack, same cause. It is an upstream
wrangler devbug.It is also hard to see, which is its own reason for the
[worker]lines. The signature above never reaches stdout: all wrangler prints there is an empty[ERROR]marker, and the ProxyController stack goes only to the debug log under~/.config/.wrangler/logs/— which.github/workflows/e2e.ymlalready uploads as an artifact for exactly this reason. Grepping job stdout for "ProxyController" therefore comes back empty on runs that did crash, and has already sent one investigation to a wrong root cause.Verified end to end: 15/15 tours desktop and 15/15
MOBILE=1, both exit 0, each run recovering real crashes mid-walk (one at 78s, two more on the mobile pass) without a single false MISS; plus fault injection for the paths that are hard to wait for — a killed worker mid-tour, a wedged worker that never exits, an adopted worker taken over on death, a worker that cannot start at all, and a tour abandoned after three deaths (GATE: UNPROVEN, exit 2, zero steps counted). Thetour-checkskill is updated to match — the walk no longer wants a hand-startedwrangler dev, which drops the setup from three terminals to two, and the skill now says plainly that no CI workflow runs this walk; it is a local gate. The E2E suite is a different job that merely shares the samewrangler dev, which is why one upstream bug surfaces in both and reads as two unrelated problems. -
CI's E2E suite was a coin-flip for the same wrangler crash. The suite's other job, the one that does run in CI: Playwright started
wrangler devonce through itswebServerconfig and never restarted it, so the crash above — a minute or two into a run — turned the API into a 502 for every remaining spec in the shard. A clean run reported529 passed; an unlucky one reported a hundred failures with no code change between them, andmaxFailures: 10existed only to stop a dead-worker shard grinding for 22 minutes before the job bound killed it.frontend/scripts/serve-worker.mjs(new) is now the Worker'swebServercommand. It handswrangler devto the sameWorkerSupervisorthe tour gate uses (crash recovery only, no proactive recycling — there is no test boundary this process can see, so a scheduled restart would land under a running spec), stays alive as the server Playwright waits on, and brings wrangler back within a couple of seconds of each death. Its own SIGINT/SIGTERM cleanup kills wrangler's process group, so Playwright's teardown leaves nothing on the port.playwright.config.tspoints the WorkerwebServerat it (migrations still run first, now viapnpm -C ../worker), and CI retries go 1 -> 2: a spec caught in the few-second recovery gap fails, and its immediate retry can land in the same gap before the restart finishes, so the second retry is what clears that residual.maxFailures: 10stays as an ordinary backstop, no longer the defence against the crash.- Verified locally on the real CI path (
CI=true, the@smokesubset): the run took two realwrangler exited (code 1)crashes, at 5s and 49s, each recovered in ~1.3s, and finished42 passedwith the single spec caught mid-recovery passing on retry — where before the first death would have failed every spec after it.
Not fixed here: the crash itself is upstream in
wrangler devand there is no version to pin around it (a full writeup is under the tour-gate entry above). Surviving it is the only lever, and now both jobs that share the Worker do. -
Delete-with-balance-reversal is now covered for income and for two-account transfers.
DELETE /api/transactions/:idreverses the row's effect on every account it touched and removes it in oneDB.batchwith the DELETE last, guarded byunchangedSinceso a delete racing an edit either reverses the amount the row actually has or 409s. The suite proved that for an expense and for a legacy destination-only transfer; a normal two-account transfer was asserted on create only. That is the case with two balances to put back, and the one where a half-applied reversal is hardest to spot — each account still looks individually plausible on its own. Income was unpinned in the same way, and the reversal takes its sign fromtx.type, so a flipped comparison would pass one direction and fail the other.worker/test/transactions-balance.test.tsnow covers both, the transfer case asserting both balances and that the pair sums back to its pre-transaction total. Both passed against existing code — nothing was broken, it simply was not pinned.
[5.12.0] — 2026-08-26
Added
- Monthly subscribers can move to annual billing from the plan grid. The worker has been able
to do this since the duplicate-subscription fix —
POST /api/billing/checkoutwith a new{ plan, interval }moves the existing subscription onto the new price rather than opening a second one. The grid could not ASK for it:mine()inBillingPlans.tsxkeyed on tier alone, and the tier either side of an interval switch is the same one, so a monthly subscriber who flipped the toggle to Annual still got "Manage subscription" and no way to act on what they were reading. TheexpectedIntervalplumbing added alongside the interval status field existed for this case and could never fire from the UI.BillingPlanstakescurrentInterval, fed frombilling()?.interval. The Monthly/Annual toggle seeds from it once, in an effect rather than as an initial value — the status arrives after mount, and re-running the seed on every read would drag the toggle back exactly when someone is mid-click on the other option.- Monthly -> annual only, deliberately. It is a price increase, so Stripe prorates the
difference onto the next invoice and nothing is given back; the card says so under the button.
The reverse is a price decrease mid-period, which leaves a Stripe credit balance rather than a
refund — a conversation, not a click. An annual subscriber looking at monthly gets a note
pointing at support instead of a dead end.
BillingPlans.interval.test.tsxpins the asymmetry, because the obvious "improvement" is to make it symmetric. - Nothing is offered when the interval is unknown (
null): Free, a comped plan, or a row that predates migration 0025. Guessing monthly there would offer an annual switch to someone who might already be annual. - Manage stays reachable on the same card throughout — cancelling must never be crowded out by an upsell.
Fixed
- A first subscription now lands with its renewal date (#486). A Checkout Session carries the
tier but no period end, and for a first-time subscriber the event that does carry one is
routinely lost:
customer.subscription.created/updatedmatches onstripe_customer_id, whichcheckout.session.completedhas only just written, so an event arriving first matches nothing — and one arriving second is often refused, because itscreatedis frequently a second earlier than the session's and the ordering guard rejects anything older than the watermark the session just advanced. Prod's timeline was the second case exactly (subscription.updated 15:39:21, session 15:39:22).plan_renews_atstayed NULL and self-corrected a month later at the first renewal. The session branch now reads the subscription from Stripe once the link exists and writes withCOALESCE(column, ?)— column first, so it can only fill a hole and never stamp on a value another event already got right, which is what makes it safe without an ordering guard. Best effort throughout: an unacked webhook is retried and the retry is swallowed by the idempotency ledger, so this must never throw. - The billing card offered a manage link that could only fail for granted plans.
Settings.tsxgated it onplan !== 'free'alone, so a comped account got "Manage or cancel your subscription" — while the plan card two inches below it correctly read "Granted — nothing to manage". A comped plan has nostripe_customer_id, soPOST /api/billing/portalcan only answer 400 "No billing account yet"; the only way to find that out was to click it. The predicate now lives incore/billingActivation.tsashasManageableSubscription, pure and covered, and the status line's bottom margin follows the same condition so hiding the link does not leave a gap. - A monthly <-> annual switch announced itself before Stripe had moved anything.
billingActivatedmatched on tier alone, and an interval switch keeps the tier — which is already entitled — so the first poll matched and toasted "Switched to the X plan" immediately.billingActivatedandconfirmBillingActivationnow take an optionalexpectedInterval, andchoosePlanpasses the interval it asked for. An absent interval on the row (a subscription predating migration 0025) means "cannot tell" rather than "wrong", so those never hang waiting for a field that will not arrive.
Added
/api/billing/statusreturnsinterval.users.subscription_intervalhas been written by the webhook since 0025 and read back by nothing, so the app could not say whether an account was on monthly or annual — and could not tell an interval switch from a no-op. The billing status line now says "billed monthly" / "billed annually", andsuccess_urlcarriesintervalalongsideplanso the checkout return is equally precise. Null for comped plans and for rows that predate the column.TokenOrbitLink(components/TokenOrbitLink.tsx+.module.css) — the manage action as an engraved pill with three of the product's tokens tracing slow circles around it. The tokens ride the button's ownborder-boxviaoffset-path, so the orbit is the shape of the button and stays right at any label length or font size; nothing is measured in JS and there is no path to re-cut when the copy changes. Three sizes at three periods (9s / 11s / 13s) rather than evenly matched dots at even spacing, which would read as a loading spinner. Hover tightens and brightens them; the busy state pulls all three to a 1.6s sweep so the same tokens report the redirect. Behind@supports (offset-path: border-box)— without it the tokens are hidden entirely, since a dot that cannot follow the path would pile up at the pill's top-left corner.prefers-reduced-motionparks them at three points around the rim and stops the orbit. Covered byTokenOrbitLink.test.tsx, which pins the case worth pinning:.t1is declared ONLY inside the nested@media (prefers-reduced-motion) > @supportsblock, so if the CSS modules transform did not export a local for it,styles.t1would beundefinedand that token would renderclass="token undefined"— no crash, no failing build, one token silently unstyled. It does export it (_t1_ff23fe), and the test now says so.
Changed
-
One Stripe API version, pinned everywhere and matched to the webhook endpoint (#487).
STRIPE_API_VERSIONhad sat on2024-06-20while the prod endpoint sent2026-06-24.dahlia— four breaking releases apart, with nothing enforcing or noticing the gap. Moved toworker/src/stripe.tsso "every call we make is pinned" is checkable by grepping the import rather than by reading each call site, andDELETE /v1/customers/{id}inroutes/account.tsis pinned too — it was the one call sending no version header at all, silently riding the account default. Of everything acacia/basil/clover/dahlia broke, exactly two reach this worker: basil movedcurrent_period_endonto the subscription item (both readers already took the item first), and clover made flexible billing mode the default for newly created subscriptions, which changes how prorations are calculated — the one live behavioural difference, since every tier change sendsproration_behavior=create_prorations. The subscription branch now logs the sending version when an entitled event carries no period end in either shape, as a tripwire for the next drift. -
READMEs brought back in line with what ships (#485).
worker/README.mdstill opened with "Not live yet" and claimed there was no billing flow;README.mdtold contributors to clonefinance-manager, which only worked via GitHub's rename redirect;docs/README.mdhad three links that 404 and a spec table that had drifted in both directions. Verified by resolving every relative link against the filesystem and diffing both spec tables againstdocs/specs/*/. -
The prod-update skill gained a real migration-rehearsal recipe (#477).
-
Worker dependencies bumped to their current releases, and Dependabot taught not to hand us the same broken PRs again.
hono4.6.0 -> 4.13.4,postal-mime2.7.5 -> 3.0.0,@cloudflare/workers-types4 -> 5,@cloudflare/vitest-pool-workers0.17.0 -> 0.22.0,vitest4.1.9 -> 4.1.11.wranglerdeliberately stays at 4.126.0.- Landed as one commit rather than the five PRs Dependabot opened (#467, #468, #470, #471),
because every one of them failed CI the same way: Dependabot rewrote
worker/package.jsonand leftworker/pnpm-lock.yamluntouched, sopnpm install --frozen-lockfile --ignore-workspacerefused each withERR_PNPM_OUTDATED_LOCKFILE. Not a stale snapshot — an explicit@dependabot recreateproduced the same manifest-only diff.worker/is not listed inpnpm-workspace.yaml, so its standalone lockfile is not one Dependabot's pnpm updater manages..github/dependabot.ymlnow documents the drill and groups all worker updates into a single PR, since each one costs that manual lockfile step. postal-mime3 is a major on a path with no test coverage: the suite coversparseAttachmentbut neverPostalMime.parse, so 488 green tests proved nothing about it. Checked by hand instead —email.attachmentsis stillAttachment[], and the three fieldsimport-email.tsreads (filename,mimeType,content) are unchanged. v3 typescontentasArrayBuffer | Uint8Array | string;toBytesalready handles all three arms explicitly.@cloudflare/workers-types4 -> 5 is clean undertsc --noEmit.
- Landed as one commit rather than the five PRs Dependabot opened (#467, #468, #470, #471),
because every one of them failed CI the same way: Dependabot rewrote
-
GitHub Actions bumped past several majors (#462-#466):
actions/checkout,actions/setup-node,actions/upload-artifact4 -> 7,actions/github-script7 -> 9,cloudflare/wrangler-action3 -> 4. The artifact/checkout/setup-node majors are Node-runtime bumps with no behavioural change, which matters becauseupload-artifactcarries the pre-migration D1 backup anddeploy-worker.ymlnever runs on a PR — green PR CI does not cover it.github-scriptv9 breaksrequire('@actions/github'); we use the injected globals and Node builtins only.wrangler-actionv4's one breaking change is defaulting to wrangler v4, which our explicitwranglerVersionoverrides. -
TypeScript 7 held back (#469, #474 closed).
typescript-eslint8.x crashes on it (Cannot read properties of undefined (reading 'FunctionType')) andtscrejects our own config:baseUrlis removed in 7 and everypathsentry is non-relative. That is a migration, not a bump. Pinned viaignoreindependabot.ymlwith the reason recorded. -
Root and frontend dev tooling bumped to current (#472, #475, #476 landed together):
@playwright/test/playwright1.59.1 -> 1.62.1,typescript-eslintand both@typescript-eslint/*8.58.2 -> 8.67.0,vite8.0.9 -> 8.2.2,vitest-> 4.1.11,prettier3.8.3 -> 3.9.6,eslint-plugin-solid0.14.5 -> 0.16.0,eslint-plugin-sonarjs4.1.0 -> 4.2.0,eslint-plugin-simple-import-sort12.1.1 -> 14.0.0,@squoosh/lib0.3.1 -> 0.5.3,@fontsource/fraunces5.2.9 -> 5.3.0, plus assorted patches.- Three Dependabot PRs rather than one because they were raised separately, and each of the
last two conflicted with whichever merged first on
pnpm-lock.yaml. Landed as one branch with the lockfile resolved once. - Two of the new linter versions found real things, and both are fixed here rather than
suppressed:
simple-import-sort14 changed its ordering, whichfrontend/src/features/Dashboard.tsxviolated. Autofixed.sonarjs4.2.0 addedno-fixed-wait-in-tests, which caught thepage.waitForTimeout(1200)infrontend/tests-shots/pwa-shots.spec.ts— a guess at how long Chart.js needs for its first draw. Replaced with the condition that guess was standing in for: the init script wrapsrequestAnimationFrameto record when a frame callback last ran, and the shot waits for 400ms of no frames. Faster when charts settle early, correct when they take longer than 1200ms, and.catch(() => {})so a view that animates forever degrades to an early screenshot instead of failing the run.
frontend/vitest.config.tsusesimport.meta.dirnameinstead of__dirname: Vite 8.2 warns thatconfigLoader: 'native', planned as a future default, does not support it.- Prettier 3.9.6 reformats seven existing files. Folded in here, since this is the commit
that introduces that prettier — otherwise the next person to touch
period.tsgets the churn in their diff. CI does not check formatting, so this was drift either way.
- Three Dependabot PRs rather than one because they were raised separately, and each of the
last two conflicted with whichever merged first on
[5.11.0] — 2026-08-25
Added
- Update notices carry an action; the toast stack moved top-right (
frontend/src/core/toastStore.ts,frontend/src/components/ToastContainer.tsx,Toast.module.css,frontend/src/core/appVersion.ts,frontend/src/core/api.ts).ToastItemgainstitle,actionandchannel;ToastOptionsgainsdurationMs, with per-type defaults (info/success 5s, warning 8s, error 10s) and a non-finite value falling back to the default rather than schedulingsetTimeout(NaN).MAX_TOASTS = 4drops the oldest. Stored items pick their fields explicitly instead of spreading options, sodurationMsdoes not leak onto the item. NewremoveToast,removeToastsByChannelandhasToastOnChannelshare a timer map, so evicting a toast cancels its pending dismissal instead of leaving a timer to fire against an id that is gone.ToastContainerrenders a per-type icon,role="alert"for errors androle="status"otherwise, the title as a coloured inline prefix, and the action button.appVersion.tsaddsannounceUpdate()— channelapp-update, 60s, Reload wired toreloadToLatest— which re-announces on a later poll only once the previous notice has expired, and clears the channel on rollback. userIsMidEntry(doc)gates the hashchange auto-reload (frontend/src/core/appVersion.ts). The safe-moment reload now waits out a focused text control and any open dialog. "Open" is decided by computedpointer-events !== 'none', becauseCommandBarandGuidedOrbitkeeprole="dialog"nodes mounted permanently — a naive presence check was true on every page and disabled auto-reload outright.NON_ENTRY_INPUT_TYPESexcludes checkboxes, radios and the rest, whose focus is a resting state rather than mid-entry.- Android install hint (
packages/pwa-kit/src/install.ts,frontend/src/components/InstallAppButton.tsx).needsAndroidInstallHint()plus a sharedhintEligible()gate and apromptSeensignal that outlives the event's consumption, so the hint stays suppressed on any session wherebeforeinstallpromptfired. Android WebViews (; wv)in the UA) are excluded — they cannot install.InstallAppButtonflattens the nestedShowfallbacks into one<Switch>with prompt → iOS hint → Android hint priority.
Fixed
-
Every tier switch created a second subscription (
worker/src/routes/billing.ts,worker/migrations/0026_stripe_subscription_id.sql,frontend/src/features/Settings.tsx,frontend/src/components/BillingPlans.tsx).POST /api/billing/checkoutbuilt a Checkout Session on every click, andmode: subscriptioncreates a new subscription each time — Stripe permits one customer to hold several, so nothing ever refused. Basic → Advanced → Basic on dev left three live subscriptions on one customer, all billing the same card, whileusersshowed whichever webhook landed last. Worse,customer.subscription.deletedmatched onstripe_customer_idalone and dropped the account tofreeunconditionally, so cancelling any one of several meant losing access while the others kept charging. Checkout now asks Stripe what the customer holds (liveSubscriptions,status=allfiltered throughENTITLED_STATUSES, sotrialingandpast_duecount); if something entitles them the request is a change —POST subscriptions/{id}replacing the existing item's price viaitems[0][id], not appending a second item, withproration_behavior=create_prorationsso the difference lands on the next invoice rather than raising one that could demand SCA with nowhere to send anyone. It answers{ url: null, changed: true }and the page never leaves. It asks Stripe rather than our own column because the accounts most likely to carry strays are the ones predating the column, and a failed lookup fails the request: not knowing what exists is never a reason to create another one. Migration 0026 adds nullableusers.stripe_subscription_id; entitlement-removing events are ignored when they concern a subscription the row is not tracking, and when they concern the tracked one the handler moves the account onto a surviving live subscription rather than to Free.NULLtracks nothing and behaves exactly as before, so rows predating the migration keep working and fill the column in on their next event. The metadata is rewritten alongside the price —customer.subscription.updatedreads the tier back off it, and a stale value would re-apply the tier just left. Covered byworker/test/billing-single-subscription.test.tsandworker/test/billing-webhook-strays.test.ts.- Does not clean up duplicates already out there — that is a refund decision belonging in the Stripe dashboard, where the invoices are visible. Affected customers keep paying twice until someone acts.
-
Choosing a plan after cancelling kept the cancellation (
worker/src/routes/billing.ts,frontend/src/features/Settings.tsx). Cancel, think better of it, pick a different tier, and the subscription carriedcancel_at_period_endthrough the price change: charged for one more period on the tier just chosen, then dropped to Free, with "Your Advanced plan is canceled" sitting under the upgrade the person had just made. Choosing a paid plan is asking to be billed for it, so the switch now sendscancel_at_period_end=falsealongside the new price — and only when there is a cancellation to lift, so an ordinary change makes no write nobody asked for. Stripe's own portal keeps the cancellation through a price change too, but it has a Renew button to undo it and this grid does not, so a cancelled subscriber had no way back except through Stripe. The same-tier case stops answering "you already have that plan": asking for the plan that is about to end is asking to keep it. The response carriesresumedso Settings can say so rather than leaving somebody to reload and check. -
The plan grid froze at first paint (
frontend/src/components/BillingPlans.tsx).const mine = isCurrent(p.id)inside<For>— the callback runs once per item, so the const froze at whatever the plan was on first render, which before/api/billing/statusanswers isfree. Hence the "YOUR PLAN" border staying on Free, an Upgrade button on the tier already being paid for, and the status line one paragraph above correctly saying otherwise. Switching settings tabs "fixed" it by remounting. Now an accessor, likepriceandperbeside it already were. Covered byfrontend/src/components/__tests__/BillingPlans.reactivity.test.tsx. -
The new plan needed a manual reload to appear (
frontend/src/core/billingActivation.ts,frontend/src/features/Settings.tsx,worker/src/routes/billing.ts). Stripe redirects to/?billing=successthe instant payment succeeds, but the plan is written bycheckout.session.completed, which arrives out of band — measured at ~3s on dev. Settings read/api/billing/statusonce inonMountand so raced that webhook and normally lost, leaving the billing card on Free; the same branch toasted "Subscription activated." before reading anything back.success_urlnow carries the tier and the page re-reads on a backoff (600ms..6s, ~17s total) until that tier reaches an entitled status —active,trialingorpast_due, matchingisEntitledin the worker, sincepast_dueis a dunning grace window and the page must not show Free to someone who still has access. The tier travels in the URL rather than being inferred from a baseline because a checkout return is a fresh page load: comparing against the first value read is wrong exactly where it matters, since Advanced → Ultimate readsadvancedon the first poll, which is the tier being left. A timeout says payment was received and the plan will appear shortly — Stripe took the money either way, so it is "not seen yet", never "failed". Generalised by the tier-switch work above, which waits on our own webhook instead of Stripe and wants different wording. -
Checkout 400'd for every account with a Stripe customer (
worker/src/routes/billing.ts). The Session already setautomatic_taxandtax_id_collection; Stripe refuses a Session combining those two with an attached existing customer unless it also sendscustomer_update[name]=autoandcustomer_update[address]=auto. Only accounts with astripe_customer_idtake theparams.customerbranch, so first-time checkout — which takes thecustomer_emailbranch — was unaffected and the failure was invisible in testing. Both params are now set on thecustomerbranch. Covered byworker/test/billing-checkout-params.test.ts. -
Stripe error text no longer reaches the client verbatim (
worker/src/routes/billing.ts).stripePost's handler logs a structured line (type,code,param,message, Stripe'srequest-id) and returns Stripe's own wording only forcard_erroras a 402. Anything else is a 502 whose text depends on the upstream status: a Stripe 4xx is permanent and says it has been logged our side, a 5xx keeps "try again shortly". -
Subscription interval is recorded (
worker/migrations/0025_subscription_interval.sql,worker/src/routes/billing.ts). Nullableusers.subscription_interval. Checkout stampsmetadata[interval]andsubscription_data[metadata][interval];intervalForPrice()resolves monthly-vs-annual from the Price id as a webhook fallback, so subscriptions predating this backfill on their nextcustomer.subscription.*event.checkout.session.completedCOALESCEs the column (null = unknown, keep what is there) whileapplySubscriptionwrites through (null = clear it); cancellation clears it alongside the plan. Covered byworker/test/billing-webhook-interval.test.ts. -
A comped plan offered billing controls that could not work (
frontend/src/features/Settings.tsx,frontend/src/components/BillingPlans.tsx). The portal route 400s when there is no Stripe customer to manage. Settings adds astatus === 'comped'billing-summary branch and passes acompedprop that swaps Manage-billing for a "Granted — nothing to manage" label. Covered byfrontend/src/components/__tests__/BillingPlans.gate.test.tsx. -
The delete confirm dialog closed before the delete landed (
frontend/src/core/confirmStore.ts,frontend/src/components/ConfirmDialog.tsx,frontend/src/features/Transactions.tsx,frontend/src/core/storage/handlers/transactions.ts).ConfirmRequestgainsbusy,stalled,progressanderror, and an optionalonConfirm: ConfirmWork— a(report) => Promise<void>.acceptConfirm()runs the work, patches progress as it reports, resolves on success, and holds the dialog with an error banner on rejection.finish()is split out from the guardedresolveConfirmprecisely because it must bypass the busy guard, which otherwise refuses to close the dialog it is meant to close.STALL_GRACE_MS = 10_000flipsstalledso Cancel becomes Close: review found the first version guarded every exit at once — both buttons disabled, overlay guarded, no Escape handler, and no timeout orAbortControlleranywhere in the request path — so a never-settling socket or a blocked IndexedDB open left an undismissablez-index: 5000overlay with page reload as the only recovery. An emptyError.messagefalls back to a generic sentence.ConfirmDialogrenders<Index>rather than<For>, since a progress patch replaces the request object and<For>(keyed by reference) would rebuild the whole dialog on every tick; it drops its own label becauseOrbitSpinneralready renderslabelvisibly. -
Deleting refetched the entire profile (
frontend/src/features/Transactions.tsx).refreshTransactions()callsapi.getTransactions()with no arguments and the worker appends noLIMIT, so every delete refetched every transaction plus a tags join and aCOUNT(*)— which is why it was fast for small datasets and slow for the customer who reported it. Both handlers now drop rows from local state withsetTransactions(prev => prev.filter(...)); the refetch is kept on the error path only, where the local state is no longer trustworthy. Single delete treats a 404 as success, otherwise "Try again" is unwinnable after a lost response. -
The bulk selection kept ids for rows that no longer existed (
frontend/src/features/Transactions.tsx).handleDeleteTransactiondropped the row fromtransactions()but never fromselectedTransactions(), so ticking a row and deleting it with its own row-level button left the bar reading "1 selected" over a table that no longer held it, and the next bulk action posted an id the server had already deleted — the worker skips it and the serverless path fails its ownership check, so nothing corrupts, but the action silently under-applies. Pre-existing, not from #449: therefreshTransactions()that replaced did not clear the selection either. Fixed with onecreateEffectintersecting the selection against the ids present intransactions(), rather than a line at the delete call site, because the refetch paths cannot unselect anything themselves —refetchOnActive('transactions', …, refreshTransactions)swaps the whole list on a profile switch while the keep-alive host leaves the page mounted, so selecting rows and switching profile left ids from the previous profile in the bar. Deliberately intersected againsttransactions()and notfilteredTransactions(): filtering here is a derived memo, so a row hidden by a filter or sitting on another page stays selected, which is what makes selecting across pages and acting on the lot work. The functional setter form does not trackselectedTransactions, and returningprevunchanged keeps the array reference, so there is no feedback loop and no notify in the common case. Covered byfrontend/src/features/__tests__/transactionsSelection.test.tsx. -
Serverless bulk delete opened one IndexedDB transaction per row (
frontend/src/core/storage/handlers/transactions.ts). Now deduplicates ids and calls the adapter'sbulkDeleteTransactionsonce. The old per-id loop skipped repeats while the up-front ownership check counted them, sodeletedcould exceed what was removed. -
The import preview rejected every transfer into an account it was about to create (
worker/src/routes/imports.ts,frontend/src/core/storage/handlers/importFlow.ts). Accounts are inserted only when the run is not a dry run, andaccountIdMaplearns new ids only from theloadAccounts()that follows that insert — so during a preview the map held existing accounts only, and every transfer naming a pending account producedno account named "X" (Means of Payment, the source). Reported from production as 300+ rejected rows on a 5183-row first import. Both paths now seed the to-be-created accounts intoaccountIdMapwhendryRunis set, with placeholder ids counting down fromNumber.MAX_SAFE_INTEGER: distinct, so the "both sides resolve to the same account" check still fires, and positive, because the shared invariant rejects non-positive account ids. A dry run inserts nothing, so no placeholder is ever persisted. A preview with nothing approved still rejects, and still names the side and the value. Covered byworker/test/import-transfer-accounts.test.ts. -
The crash modal reloaded straight back into the dead build (
frontend/src/components/ErrorBoundary.tsx,frontend/src/core/bootRecovery.ts).window.location.reload()is re-served the crashed build from the service worker's precache; it is nowreloadToLatest().bootRecoveryadds arecoveryInFlightsignal with a 10s deadline (isChunkRecoveryInFlight()), and both global handlers route through a sharedescalate()that suppresses chunk errors while recovery is in flight, with the render fallback wrapped in<Show when={!isChunkRecoveryInFlight()}>— so the modal stops flashing over a page that is already quietly recovering.vite:preloadErrorispreventDefaulted only when a reload will actually follow: a prevented event makes Vite resolve the import asundefined, which surfaces later as an unclassifiable TypeError. -
The spotlight tour claimed ArrowRight/ArrowLeft/Enter unconditionally (
frontend/src/core/spotlightStore.ts,frontend/src/components/Spotlight.tsx,frontend/src/App.tsx). The overlay ispointer-events: none, so the page underneath stays fully live while a tour runs, but the windowkeydownhandler had no focus check, no modifier check and nopreventDefault. Three consequences, all reachable during any tour: ← pressed to fix a typo in a focused field moved the caret and stepped the tour back; Enter on the tour's own Next button activated the button and advanced, so one press skipped two steps; and every ArrowRight also reachedApp's period stepper, which had nospotlightActive()guard, so the focus period drifted a month per step and the user left the tour on a different period than they entered it. The decision now lives intourKeyAction, pure and unit-tested, and the component asksisEditableTargetfromcore/domFocus— the predicate extracted just above, whose module header already claimed every global key handler needed it; this was the one still carrying no check at all.includeResting, because ←/→ are exactly the keys a range input and a radio group drive themselves. Escape stays exempt deliberately: someone who wants out of a tour has to be able to leave from wherever they are, including mid-typing.- The guard then took Enter away from every other button, since
isEditableTargetanswers false for a<button>: tab to "End Tour", press Enter, and the tour stepped forward instead of closing — as did "Back". Both worked before the guard, because nothing was prevented and the button's own activation still ran.isActivatableTarget(core/domFocus.ts) now covers what activates itself on Enter —button,a[href],[role=button|link];input[type=button|submit|reset]is already covered byincludeResting, the only mode a caller guarding Enter would use. Arrows stay the tour's, since a button does not use them. Caught reviewing the release range, not from a report — Space still activates the buttons, which is likely why it went unnoticed.
- The guard then took Enter away from every other button, since
Changed
-
The worker's toolchain is pinned and reproducible (
worker/package.json,worker/pnpm-lock.yaml,worker/.gitignore,.github/workflows/e2e.yml,.github/workflows/deploy-worker.yml,.github/dependabot.yml).worker/is not a workspace member, and its lockfile was gitignored from the scaffold days ("deps installed fresh"), withwranglerat^4.0.0. So both CI jobs installed--no-frozen-lockfileand resolved the toolchain afresh every run: CI never ran the wrangler anyone had tested locally, awrangler devcrash could not be told from a code change because the version moved underneath the suite, and — the part that matters most — every prod deploy bundled whatever npm served that morning, which is neither reproducible nor rollback-able. Note where that bites: the deploy CLI itself was never the exposure, becausewrangler-action@v3pinswranglerVersion: '4.106.0'on the backup, migrate and deploy steps. What floated into production was thepnpm installthatwrangler deploybundles FROM —hono(43 imports; the entire HTTP and auth layer),zod,pdf-lib,postal-mimeandxlsx. Those are not dev tooling. They run on every request and handle user data, and they were resolved unreviewed and integrity-unchecked on each deploy. The lockfile is now committed (209 resolutions, integrity-hashed, so a republished or tampered tarball is refused rather than installed),wrangleris pinned exactly at 4.126.0 to matchvitestand@cloudflare/vitest-pool-workerswhich were already exact, and both workflows use--frozen-lockfile.deploy-worker.yml's header comment had claimed it installed "against worker/pnpm-lock.yaml" all along; it is true now.- The counter-argument was security — leave it floating so an urgent fix arrives on its own. It does not survive contact: floating IS the supply-chain exposure (unreviewed, integrity-unchecked downloads straight into a deploy pipeline is the path a hijacked or republished package takes), and nothing was watching for advisories in the first place — there was no
dependabot.ymlin the repo at all, so new versions arrived silently and untested. The dev-tool-versus-runtime split matters here: a CVE in wrangler threatens CI runners rather than user data, buthonoand friends are not wrangler..github/dependabot.ymlcloses the gap for the workspace root,worker/, and the GitHub Actions themselves (a compromised action runs with the workflow's token). Security updates are raised as soon as an advisory lands regardless of the weekly cadence, so pinning surfaces fixes faster and more visibly than floating did, because a human is actually told. - Left alone deliberately:
wrangler-action'swranglerVersion: '4.106.0'now differs from the 4.126.0 inpackage.json, so the CLI that applies migrations to prod is not the one the tests ran against. Aligning them changes the production deploy path and cannot be rehearsed without deploying, which is not a thing to do in the same patch as a lockfile — worth its own PR against a quiet main. wranglerminors and majors are on the ignore list: it ships a new minor most weeks, each carrying a different miniflare, and an unattended bump is exactly how a dev server that crashes mid-run reaches main. Patches and advisories still come through.- This does not fix the intermittent
wrangler devcrash on the E2E job (Error inside ProxyWorker→cause: Network connection lost., from miniflare's loopback fetch service, killing the server mid-run). That crash was observed on 4.125.0 at 17:44 and on 4.126.0 — which was published at 19:13 the same day — so it spans versions and is not a regression in either. Pinning makes it diagnosable: the toolchain is finally a fixed variable, so the next occurrence can be bisected instead of guessed at. Every recent wrangler 4.x depends on a-alphaminiflare; that is Cloudflare's normal channel for the miniflare 5 line, not a prerelease pulled in by accident.
- The counter-argument was security — leave it floating so an urgent fix arrives on its own. It does not survive contact: floating IS the supply-chain exposure (unreviewed, integrity-unchecked downloads straight into a deploy pipeline is the path a hijacked or republished package takes), and nothing was watching for advisories in the first place — there was no
-
One shared focus predicate behind the global key guards (
frontend/src/core/domFocus.ts,frontend/src/App.tsx,frontend/src/components/GuidedOrbit.tsx,frontend/src/core/appVersion.ts). NewisEditableTargetconsolidates four drifted copies of the "is focus in an editable control" check.GuidedOrbit's copy had omittedSELECT; onlyappVersion's knew that a checkbox keeps focus long after the click.userIsMidEntrykeeps its own open-dialog scan, which is specific to the deploy watcher. The period stepper passesincludeRestingbecause ←/→ are owned by a focusedRangeFieldslider (RetirementPlanner), where the narrower mid-entry semantics would let one keypress both drag the slider and step the period. Extraction surfaced a bug it also introduced:isContentEditableis typedbooleanbut reads backundefinedin jsdom, so the function returnedundefineddespite its: booleansignature. The attribute fallback is gated ontypeof el.isContentEditable === 'boolean', since in a real browser it was overriding an authoritativefalse, and it matches lowercased keywords —contenteditableis a case-insensitive enumerated attribute whose invalid values mean NOT editable, so a focused<div contenteditable="FALSE">read as editable and would veto both shortcuts and the auto-reload while it held focus.frontend/src/core/__tests__/domFocus.test.tsasserts throughdocument.activeElementrather than held element references, which is what let the original suite pass vacuously. -
Removed the dead
SettingsDialogandModalcomponents (frontend/src/components/SettingsDialog.tsx,SettingsDialog.module.css,Modal.tsx,Modal.module.css; 826 lines).SettingsDialoghad no importers anywhere infrontend/src, and the genericModal's only importer was that deadSettingsDialog; both were flagged by the 2026-07-23 code-and-data-integrity audit.Modalwas unsafe to adopt as it stood —if (!props.isOpen) return nullsat in the component body, so Solid read the prop non-reactively and evaluatedisOpenexactly once at mount — and was deleted rather than repaired with a<Show>.ConfirmButton,SettingsDialog's other local import, stays: fifteen other importers. Also drops a stale comment inworker/src/routes/settings.tsnamingSettingsDialogas a caller of the storage-mode endpoints. -
The worker suite got a timeout that fits what it does (
worker/vitest.config.ts).session-lockout > lets the real owner back in once they get it righthit vitest's 5s default on main, on a commit whose two earlier runs of the same job passed. That default assumes a pure unit test; nothing inworker/testis one — every file boots its own workerd and applies the migrations, and the auth tests run PBKDF2 at 100,000 iterations per login (worker/src/auth.ts), twenty of them in that test. It takes ~274ms locally, so an 18x stall is contention rather than a slow runner: the failing run reported 112s of setup against 90s of wall clock, and locally the same suite reports 739s against 45s — 16x oversubscribed — so files boot workerd in parallel and a CPU-bound test scheduled into a burst of those startups is starved of the runner's 4 shared vCPUs.testTimeout: 20_000is ~70x the slowest test's real cost, so a genuine hang still fails, on being hung rather than on being unlucky.
[5.10.1] — 2026-08-25
Fixed
- A first import rejected every transfer row (
worker/src/routes/imports.ts,frontend/src/core/storage/handlers/importFlow.ts,frontend/src/features/import/importFlow.ts). A transfer'saccount_idresolves from the Means-of-Payment column and itstransfer_account_idfrom Category — but account creation was driven entirely bycategoryTypes, a map built from the CATEGORY column's distinct values, and the preview'snew_accountsscan read only that column too. Means-of-Payment values were enumerated nowhere, classified nowhere, offered nowhere. On a profile with no accounts yet — which is what onboarding is — every transfer row failed the shared invariant and was rejected; the reported sheet had 341 of them.- Both
new_accountsscans (worker and serverless) now read both columns. A Means-of-Payment value qualifies unconditionally: it is the account the money moved from, by definition of the column. A Category value qualifies when marked 'account' as before, or when the row's owntypesaystransfer— there is no reading of "transfer to Groceries" that makes Groceries a category, and a first-time import has no way to have marked anything yet. - The mapping step (
detectAccountValues) enumerates the same set and seedscategoryTypeswith them as 'account', after the keyword classifier so they win over any guess; an explicit user choice still wins over both (?? 'account'fills gaps only).applySavedMappinggets the same treatment on BOTH branches — a mapping saved before this fix has no entry for any Means-of-Payment value, and restoring it verbatim would keep every transfer unresolvable for exactly the people who had already set the source up. - The mapping table renders
mappingValues()— the category values plus the account-by-construction ones — rather thandetectCategories()alone. Without the union the Means-of-Payment accounts were created invisibly: real accounts, never listed in the table, so no starting balance, no date, and no way to opt out. Categories keep their order; the extras append after. - The rejection now names the side and quotes the value:
no account named "Erste Current" (Means of Payment, the source); no account named "Revolut" (Category, the destination). The invariant lives inshared/and only sees ids, so the naming happens where the names are, in both import paths, self-transfer case included. - Tests: 3 worker (
worker/test/import-transfer-accounts.test.ts) + 3 serverless (importFlow.transferResolution.test.ts), the same three scenarios each — the preview offers both sides, the rejection names the failing value, and the row imports once both are approved, with both legs linked and distinct. Confirmed red against the pre-fix code: the preview offered[], then['erste current']without the transfer-destination rule.
- Both
Changed
- Rules-editor confirmation moved beside its button; success banners auto-dismiss and clear on navigation (
frontend/src/features/import/BankRulesEditor.tsx,importFlow.ts,Import.module.css).saveBankRules/resetBankRulesset the globalresultMessage, which renders at the top of the page/panel — the editor sits far down a scrolling step, so on a phone the confirmation appeared a full screen above the click and was never seen. The editor now owns an inline confirmation (role="status", check icon, 4s, timer cleaned up on unmount) rendered in the same flex row as the buttons, and the flow no longer routes those two actions to the banner at all.- The banner itself never cleared: "Preview recalculated from your rules." was still sitting there on the NEXT step, which reads as a stuck page, not a confirmation. Success messages now go through
announceResult(6s auto-dismiss) andgoToMapping/goToPreviewclear any banner on entry. Errors are untouched — they stay until acted on. - Tests: 3 in
BankRulesEditor.confirmation.test.tsx— beside-the-button placement, self-dismissal under fake timers, and a save-after-reset keeping the newer message on the newer clock.
- The banner itself never cleared: "Preview recalculated from your rules." was still sitting there on the NEXT step, which reads as a stuck page, not a confirmation. Success messages now go through
- The "Expected columns" table matched neither the importer nor itself (
frontend/src/features/import/ImportDataEntry.tsx). It listed Date and Description as required. Neither is: only Amount hard-fails a row (checkImportRowNumbers), a missing date imports as today and is flagged (MISSING_DATE_WARNING), and a blank description imports outright — a contract the worker pins inimport-blank-description.test.tsbecause a stricter local rule once silently dropped 291 rows. The header is now "Sample (default when missing)" and every optional column with non-obvious absence behaviour says it in parentheses: Currency → base currency from Settings, Type → from the amount's sign, Amount Local → same as Amount, Category → uncategorized / a transfer's destination account, Means of Payment → the account the money left.- Tests: 3 in
expectedColumnsTable.test.ts— only Amount may claim Required, the table's column set equals the downloadable template'sTEMPLATE_HEADER, and the columns with defaults must state them.
- Tests: 3 in
- Auto Categorize rebuilt around the rows that actually reach it (
frontend/src/components/AutoCategorizeModal.tsx,features/Transactions.tsx). Every uncategorized row comes from an import — the app will not create one — so the person looking at the list did not type these rows in, and a bare description was unidentifiable. The reported experience: "bunch of transactions I don't know what they are (no amount, date metadata etc, from/to accounts)".- The modal's transaction type carried only
{ id, description }even though the host was already passing fullTransactionobjects; the row now renders date, signed amount (−for expense, coloured both ways,tabular-nums) and the account line,Erste Current → Revolutfor a transfer, via a host-suppliedaccountNameresolver. - A row with no mapping match gets a category
<select>(filtered to the row's own type where known — an expense is not offered Salary), so "no suggestion" is no longer a dead end.Select all matchesstages every suggested row at once. - Staging and applying were entangled: the row's
+calledonApplyimmediately ANDapplyAllcalled it again for every staged row — a double write per row, and a footer label ("Apply N") that described neither. Staging is now local state;Apply Nis the only writer, sequential on purpose, with a newonAppliedfired once so the host refetches once instead of after every row (the old handler reloaded the entire transaction list per application — "Apply 50" was 50 full refetches). uncategorizedTransactionsinTransactions.tsxnow excludes transfers: a transfer has no category by design, so they filled the modal with rows that could not and should not be categorized.- Tests: 5 in
components/__tests__/AutoCategorizeModal.test.tsx— the metadata line, the manual pick (and its type filter), a manual pick counting toward Apply, stage-then-apply writing each row once with oneonApplied, and select-all-matches.
- The modal's transaction type carried only
- Onboarding: the footer button carries its own progress, and the panel scrolls to the work (
frontend/src/components/onboarding/OnboardingWizard.tsx,Onboarding.module.css). The processing spinner and the import summary render at the top of the wizard body; with a 5000-row preview the user is a whole table below, so "Import selected" looked like it did nothing.FooterActiongainedbusy— the primary button disables, shows an inline spinner and switches label ("Importing…", "Building the preview…", "Processing…", "Adding…") — and every long-running footer action first scrolls the body back to the top (showTheWork). Spinner respectsprefers-reduced-motion. - Onboarding: one primary action on the subscriptions step (
frontend/src/components/SubscriptionScan.tsx,OnboardingWizard.tsx). The scan panel's own "Add N" sat mid-panel while the footer's "Continue" silently did not add.SubscriptionScanPanelgainedexpose(hands the hostchosenCount/submitting/addSelected, which now resolves with how many were created) andhideAddButton; the wizard folds both into the footer: "Add 2 subscriptions & continue" when something is selected, "Continue" otherwise. The standalone Bills modal keeps its own button —hideAddButtonis opt-in.tests/onboarding.spec.tsasserts the in-panel button is GONE in the wizard and the unified label adds and advances in one click.
Tooling
- The tour walk fails fast when the page never renders.
walk-tours.mjspolled the sidebar button with an unboundedboundingBox()— on a page that never mounted (an intermittent dev-stack flake), each poll waited the 30s default and a bounded-looking retry loop became twenty minutes of silent hang untiltimeoutkilled it, reporting "browser has been closed" from the kill rather than anything about the page. The poll is bounded at 1s now, and the drawer failure names the URL, whether the button was attached at all, and saves a screenshot.
[5.10.0] — 2026-08-24
Added
- A sticky period bar, and the
overflow-xthat had been quietly disablingposition: stickyapp-wide (frontend/src/core/uiPrefs.ts,components/PeriodBar.tsx,PeriodBar.module.css,components/Layout.module.css). The month control is how you change period, and on a long page — Budgets above all — it scrolls away exactly when the numbers being read make you want to change month. Settings > Appearance > "Keep the period bar in view" pins it to the top. Off by default: it changes how every page with a period bar behaves and costs a line of screen on each, which is not a change to make on someone's behalf.Layout.module.csssetoverflow-x: hiddenonhtml, body, which makes the body a scroll container and stopsposition: stickyworking anywhere in the app. Nothing sticky had ever pinned; the first attempt here measured the bar aty = -792after a scroll, withposition: sticky; top: 8pxcorrectly computed on it. Changed tooverflow-x: clipin three places —html, body, and.maininside both the 768px and 480px media queries, which were overriding it back tohiddenon mobile.clipstill prevents sideways scrolling but does not create a scroll container. The sidebar's ownoverflow-x: hiddenis left as it is: that one is a real scroll container and is meant to be.PeriodBargained a host wrapper so the sticky positioning, the pinned styling and the tour/test anchors live in the one component the pages already share, rather than in a per-page wrapper div repeated four times. Budgets, Dashboard and Transactions passtourAnchor/hostTestIdand drop their wrappers; page CSS keeps only the spacing that is genuinely per-page.- The "stuck" look (a shadow and a solid background, so content passing underneath does not show through) needs to apply only once the bar is actually pinned, and CSS has no selector for that. An
IntersectionObserverwiththreshold: [1]androotMargin: '-<top+1>px 0 0 0'fires the moment the element stops being fully visible against its own offset, which is the same instant it pins — no sentinel element, no scroll listener. The offset is read from the element's own computedtop, so the media queries stay the single source of truth for it. topis8pxon desktop and, on mobile, clears the fixed menu button rather than sliding under it.data-stickyanddata-stuckare exposed for the e2e suite.- The bar is two rows on a phone rather than three. Six pills at
flex: 1 1 autowrapped to two lines and stranded the sixth alone, wherejustify-content: space-betweenstretched it across the full width — a whole row spent on "All".PERIOD_PILLSis now rendered as two groups (ROW_PILLSandTRAILING_PILL, both derived from the one list so they cannot disagree), which lets the mobile rulesorderthe trailing pill up onto the stepper row, where there was already spare width. The five below divide one row atflex: 1 1 0. On a desktop the groups sit adjacent and.bar's column gap was set to match the gap inside.pills, so the split is invisible. This applies whether or not the bar is pinned — and it is why a pinned bar on a phone is a control rather than an obstruction. readBoolaccepts only the two strings this module writes; anything else falls back to the default rather than being read as a deliberate choice.uiPrefs.tskeeps the preference inlocalStorage, not on the account: it describes how this screen should behave, and a phone wanting the bar pinned says nothing about a desktop. Every read and write is in atry/catch— a private window or a browser set to block site data throws on the accessor rather than returning null, and a display preference must never be the thing that stops the app rendering.- Tests: 7 unit (
core/__tests__/uiPrefs.test.ts— default off, both directions remembered, a value it did not write, and both throwing-storage paths) plus 12 e2e (tests/sticky-period-bar.spec.ts). The e2e ones scroll a real page and read where the bar ended up, on all three pages, at desktop and at 390px, including that the month steppers still work while pinned, that the app as it ships lets the bar scroll away, and that turning the switch on in Settings pins it. Two more measure the mobile layout: every control in the bar resolves to exactly two distinct row centres, "All" shares the steppers' centre and sits to their right, and no pill runs past the bar. They are scoped to the page container: pages are kept alive, so severalPeriodBars are mounted at once and a bare locator matches all of them. spotlightStore.test.tsnow recognisestourAnchor="key"as well as a literaldata-tour="key". The anchors moved from per-page wrapper divs into the shared component's prop; both declare the key at the call site, which is what that test is checking for.
- A category icon gallery (
frontend/src/components/IconPicker.tsx,IconPicker.module.css). The icon field resolves a typed keyword throughiconFromUserValue/findIcon, which is a good input and a terrible discovery mechanism: the only way to learn thatshield-checkormore-horizontalexist was to type them. A button beside the field opens a scrollable grid of every icon, with a filter for when 62 becomes more than that. Picking writes the key into the same text field rather than into parallel state, so the field stays the single source of truth and a chosen icon can still be edited or cleared by hand. One modal serves both create and edit on the Categories page, so this lands in both.PICKABLE_ICON_NAMESis derived fromiconNameMaprather than written out beside it — a second hand-maintained list goes stale the first time someone adds an icon. It excludestagandfolder: both are real glyphs, but both are also indefaultIconValues, sogetCategorySvgreads them as "nobody chose an icon" and pattern-matches the category name instead. Offering them would have offered a choice the renderer silently ignores. A test asserts the property directly rather than the exclusion — for every key on offer, storing it must change what is drawn.iconSvgByKey()draws one icon by exact key. The gallery cannot usegetCategorySvg, which is built to resolve a value and would happily show a glyph for a key other than the one being offered.- Escape is handled on the capture phase with
stopPropagation, so dismissing the gallery does not also close the category modal and discard a half-filled form. The filter input is deliberately uncontrolled — bindingvalueback to the signal is the write-to-a-focused-field bug thesolid-formsskill exists to prevent. - Tests: 12 unit (
IconPicker.test.tsx) plus 6 e2e (tests/category-icon-picker.spec.ts). The e2e ones cover the wiring the unit tests cannot: that the button is reachable from inside the modal, that the panel lands above it (a click that Playwright refuses is the stacking assertion), and that a pick reaches the field the form submits.
- A maskable icon and manifest screenshots (
frontend/src/pwaManifest.ts,frontend/public/icon-maskable-512.svg,frontend/public/screenshots/,docs/pwa-install-assets.md). The manifest declared fouranyicons and noscreenshotsat all, so Chrome's install dialog fell back to name-icon-URL, and Android — given nothing maskable — did not mask ours: it shrank the whole square into a white circle, which is the small dark tile in a white ring on the home screen.icon-maskable-512.svgis the same artwork with two required differences: a full-bleed background (norx— the platform supplies the shape, and our own corners would be masked a second time into a rounded square inside a circle), andscale(0.8)on the artwork so all of it sits inside the safe circle. It is not decorative: the unscaled artwork reaches 207px from the centre of a 512 canvas, past the 204.8px safe radius, so a circular mask clipped the orange marker.- Six screenshots — dashboard, transactions, analytics, each
wide(1280x720) andnarrow(720x1280). Chrome shows the rich dialog only with awideentry and falls back to the plain one on phones without anarrowentry. icon-192.svgwas declared192x192and is a byte-identical copy oficon-512.svg, which draws a 512 canvas. Collapsed to one entry atsizes: 'any', the spec's value for a scalable icon. The test found this, not a reading of the file.purposeis now explicit on every entry. Left implicit on some and explicit on others is how a maskable icon ends up serving both roles.- The manifest moved out of
vite.config.tsintosrc/pwaManifest.tsso it can be tested. Everything in it fails silently in a browser — an unresolvablesrcis a swallowed 404, a wrongsizesis a screenshot dropped without a word — and none of it reaches a build log. - Screenshots are deliberately not precached:
injectManifest.globPatternsis an explicit allowlist, and they are read by the install UI, never by the page.
npm run pwa:shots(frontend/playwright.shots.config.ts,frontend/tests-shots/pwa-shots.spec.ts) — re-shoots the six screenshots against the same two servers the e2e suite uses (wrangler on a local D1, vite proxying/apiat it) and the same setup project, so the stills and the suite cannot disagree about what the data looks like. A second config rather than a spec in the main suite: these write intopublic/and are not assertions.- The theme is pinned to dark through
finance-theme— the keypublic/theme-init.jsactually reads. With nothing pinned the app followsprefers-color-schemeand headless Chromium reports light, so an unpinned run returns a whole light set to sit beside a#0a0e1csplash. (The e2e fixture state'sdarkModekey is dead; nothing has read it since the theme moved tocore/theme.ts.) - Animation and scrollbar suppression is an init script, not
addStyleTag: a style tag belongs to the document that was live when it ran, so it evaporates on the first navigation and only the first shot comes out clean.
- The theme is pinned to dark through
npm run pwa:icons(frontend/scripts/gen-pwa-icons.mjs) — rasterizes every manifest PNG from its SVG master withrsvg-convert. Not run in CI: the PNGs are committed, because a build that rasterizes its own icons fails on any machine without librsvg.- Tests:
src/__tests__/pwaManifest.test.ts(24) reads the PNG IHDR chunks back off disk and compares them to the declaredsizes, plus the maskable pair, explicitpurpose, both form factors, one aspect ratio per form factor, Chrome's 320-3840 and 2.3:1 bounds, a label on every screenshot, and thescale()and absentrxin the maskable master.tests-shots/tsconfig.jsonputs the new directory undernpm run typecheck. - Per-session revocation:
auth_sessions+sidin the JWT (worker/migrations/0024_sessions.sql,worker/src/auth.ts,worker/src/routes/auth.ts,frontend/src/components/SignedInDevices.tsx). Sessions were purely stateless — a JWT plus a singleusers.token_versioncounter — so the only revocation primitive the system had was "invalidate every token this account has ever been issued".POST /api/auth/logoutused it, which is why signing out on one device signed out all of them.issueSessionCookienow inserts a row (crypto.randomUUID(), user agent, IP, provider) and embeds its id in the JWT assid.authenticateRequestlooks the row up and fails withsession_endedwhen it is gone;last_seen_atis touched at most once perSESSION_TOUCH_SECONDS(300) and fire-and-forget, so a read path stays a read path.- Named
auth_sessions, notsessions:0001_init.sqlalready creates asessions(sid, sess, expire)table for the retired Express server's session store.CREATE TABLE IF NOT EXISTS sessionsagainst it is a silent no-op, and the nextCREATE INDEX ... (user_id)fails withno such column. - Routes:
POST /api/auth/logoutdeletes one row;GET /api/auth/sessionslists them with a server-derived device label;DELETE /api/auth/sessions/:idis scopedAND user_id = ?(an id alone is not authority — 404 otherwise) and clears the cookie when you end your own;POST /api/auth/logout-allbatches the row delete with thetoken_versionbump, which stays the only handle on a token issued before this table existed. deviceLabel(ua)(worker/src/deviceLabel.ts) derives "Chrome on Linux" at render time rather than at write time, so improving the parser never needs a backfill. Order matters: Edge/Opera/Samsung are matched before Chrome, CriOS/FxiOS before Safari.frontend/src/components/SignedInDevices.tsxrenders the list.parseServerTimenormalises D1'sdatetime('now')(YYYY-MM-DD HH:MM:SS, UTC, no zone marker) to a real instant —new Date()reads that string as local time, which puts "last active" hours off for anyone not on UTC.
- Server-side auth audit trail (
worker/migrations/0023_auth_logs.sql,worker/src/authlog.ts). Every login, logout and denied request is logged to the console;auth_logspersists the ones worth keeping — all login/logout outcomes, plus session denials that arrived with a cookie (a denial with no cookie at all is just an unauthenticated request and would bury the signal). Records event, outcome, reason, user, email, IP, user agent, request id and how many session cookies the request carried. - The Express/SQLite backend is gone (
backend/,Dockerfile,docker-compose.yml,db/,test/backend/,test/e2e/backend-api/,test/benchmark/). It had not shipped for some time —ci.ymlstopped testing it, nothing deploys it, browser-only mode is IndexedDB and cloud mode is the Worker — but it was a complete server with routes, models, repositories and its own test suite, and it kept attracting fixes. 144 files.- Policy, now written down in the repo docs rather than implied by what happened to be in the tree: self-hosting means running your own copy of the Worker on Cloudflare's free tier. That had been true for a while; the tree said otherwise.
- An existing Docker image keeps working — nothing is revoked — but it receives no further fixes.
- The one thing still holding it in the tree was
e2e.yml: 35 Playwright specs drive the real built frontend, and something had to answer/api. That is nowwrangler devagainst a local D1 — the runtime that actually serves the app. frontend/playwright.config.tsstarts both servers (wrangler devon :8787 afterd1:migrate:local, then vite on :3800 withAPI_PROXY_TARGETpinned at it) and runs asetupproject before the suite.frontend/tests/global.setup.tsregisters the fixture account through/api/auth/register, marks it verified and puts it onultimate(Free caps profiles at 2, and specs that need isolation create their own — a plan error surfacing inside a subscription-scan spec is a true fact about the Free tier and a useless place to learn it), creates the fixture profile, seeds it, signs in once and saves thestorageStateevery spec starts from. It also clearsrate_limitsfirst: the local database survives between runs and so did the login counters, so the seventh run of an afternoon failed at sign-in with a 429.- Signing in once rather than per browser context also fixes a real limit:
workers: os.cpus().lengthmeant a context per CPU, each spending the per-IP login budget. frontend/tests/e2e-seed.tsis the dataset — two accounts, four months of transactions, six categories, a paid and an unpaid bill. It replacesreseed-demoon the Express server, so what a spec asserting on "recent activity" is looking at is now readable in the repo. A new profile gets no categories from any code path, which is why they are seeded explicitly: a categories page with none renders its empty state, not its grid.test-helpers.login()no longer makes a request;firstProfileId()replaces the hardcodedX-Profile-Id: '1', which only ever held because the Express seed always produced it.- Root scripts
start,lint:backend,test:backendare gone;test:workerandtest:e2eadded.better-sqlite3,bcryptandsqlite3leaveonlyBuiltDependencieswith the server that needed them.
BillingPlansmarks the current plan.minenow outranksRECOMMENDEDfor both the border and the badge. Before, the two competed andRECOMMENDEDalways won: a subscriber onadvanced(which isRECOMMENDED) saw a card highlighted as a recommendation, never as theirs, and a subscriber on any other plan saw the highlight on somebody else's card. The only signal that a card was yours was the CTA text, which reads as one more button in a row of Upgrade buttons.- Current card: 2px
var(--success)border (padding drops to 15px so its contents do not shift a pixel against its neighbours) plus a "Your plan" badge in the slot "Recommended" used to occupy. Free gets it too — a Free row has no price and no Manage button to infer it from. data-testid="plan-card-current", so the marking is assertable rather than eyeballed.
- Current card: 2px
- "Manage billing" → "Manage subscription", with "Change plan, update your card, or cancel" under it. The Stripe portal is where cancelling lives and nothing said so.
- A
Manage or cancel your subscriptionlink under the billing status line (Settings.tsx, shown only on a paid plan,data-testid="billing-manage-link"). Someone looking for how to cancel reads the status line first; making the only route to the portal a button inside the grid put it where it competes with the Upgrade buttons beside it. - Tests:
BillingPlans.gategrows to 11 — which card is marked, the badge taken back from Recommended when they are the same card, the legacypremiumstatus mapping onto theadvancedtier, and the border itself (asserted on the inline style, because a badge alone is not what makes a card read as selected). Three mutations run — badge text, badge condition, border condition — each killed. - The service worker is now
injectManifestover a hand-writtenfrontend/src/sw.ts, on top of@komediruzecki/pwa-kit'ssw-runtime— ported from mercurypitch, not invented. Closes the second half of #417.- Model: a precached shell, one build at a time.
install()fetches the shell and refuses it unless every<script src>it names is in this build's manifest, then stores it with its first-paint assets; navigations answer from that shell; assets answer cache-first and only for URLs this build shipped;activate()drops the other builds' caches. The previous build's cache is copied forward first, so an unchanged chunk costs no request. skipWaitingandclientsClaimare gone. A worker that took over mid-session paired its own chunk map with the page's already-loaded HTML, which is what the multi-reload deploy loop was made of. The waiting worker is adopted only when the page decides to move.generateSW+runtimeCachingis gone with them, along with the network-first navigation rule (SW_CLEANUP_EPOCH = 'nav-network-first-1'). That rule was the right fix for the failure it was written for and could never be tested; this replaces it with rules that can.- The three update signals converge.
version.jsonpolling (core/appVersion.ts) still detects a deploy, and so now do a waiting worker and the worker's own stale-build broadcast — all three set the same pending state and wait for the same safe moment (the next hashchange), under the same rolling reload cap. - Every reload goes through
reloadToLatest(), neverlocation.reload(). With a precached shell the controlling worker answers a plain reload from its own cache, so a page whose chunks are gone re-serves the same dead shell forever. The ladder is: adopt the waiting worker → else unregister and reload → else (offline) reload plainly.bootRecovery.activateUpdatedServiceWorkeris deleted; its premise — that skipWaiting makes the new worker claim the page on its own — no longer holds. SW_CLEANUP_EPOCH = 'precache-shell-1', and the inline reset script now deletes the old caches as well as unregistering (the new worker only ever deletes its owntokencircles-assets-prefix, sofinance-manager-*andworkbox-precache-*would have sat in the quota forever). It publisheswindow.__SW_CLEANUP__and registration awaits it — an unregister resolving after a register would silently remove the worker it had just installed, a race the previous version of that script contained.- The worker ships with every build, not only production (
command === 'build', exposed as__SW_ENABLED__). Chrome does not firebeforeinstallpromptwithout a fetch-handling worker, so gating on production meantdev.tokencircles.com/sw.jswas a 404 and the install button added in #420 could never appear there.vite devstill ships none and still removes a stale one. theme-init.jsis in the precache list and has to be: index.html loads it with a<script src>, and the shell check refuses any document naming a script this build did not ship. Leaving it out would have failed every install.- HTML references are resolved, not matched on a leading slash. This repo builds with
base: './', so index.html says./assets/index-*.jsand./theme-init.js; mercurypitch's/assets/pattern would have matched nothing, precached nothing and validated nothing — silently. Verified against a realvite build --mode dev: 115 precache entries, both shell scripts present. - Tests: 93 new in
packages/pwa-kit(58 caching rules against a fake CacheStorage, 35 registration/update against a fakeServiceWorkerContainer), 104 in the kit overall.bootRecovery.test.tsloses theactivateUpdatedServiceWorkercases with the function.
- Model: a precached shell, one build at a time.
- Dunning mail on the Stripe webhook. The handler covered
checkout.session.completedand the threecustomer.subscription.*events and noinvoice.*event at all, so a decline produced no outbound mail anywhere in the system. It now handlesinvoice.payment_failedandinvoice.payment_action_required, and mails oncustomer.subscription.deleted.worker/src/billingMail.ts—mailForBillingEvent(type, obj, account, appUrl), pure. The interesting part of this feature is not the sending but the decisions, several of which are "send nothing"; kept out of the route they can be asserted directly. (fetchMockis not exported bycloudflare:testin@cloudflare/vitest-pool-workers@0.17.0, so the alternative was no unit coverage of the wording at all.)invoice.payment_failedwithbilling_reason: 'subscription_create'sends nothing. That is the first invoice of a checkout, and the user is looking at Stripe's own error on screen; the mail would arrive after they had already tried again.payment_action_requiredis deliberately not the decline mail. Nothing has failed, and the only thing that resolves it is the user opening a page — which a "your payment failed" subject makes them less likely to do.subscription.deletedreads the account beforeapplySubscription, because afterwards the plan isfreeand the mail would say "your Free plan has ended"; and it only sends whenapplied.meta.changesis set, so an event that lost to the ordering guard cannot announce a cancellation that did not happen.- Amounts arrive from Stripe in minor units and are divided before rendering;
next_payment_attempt,amount_due,currencyandhosted_invoice_urlare all treated as optional, with the app's own billing screen as the fallback link. - Sending is best-effort inside a
try/catch: an unacked webhook is retried, and thestripe_eventsinsert makes the handler idempotent, so a mail that could not be sent must not cost us the ack and earn a second delivery. renderPaymentFailed,renderPaymentActionRequired,renderSubscriptionEndedinworker/src/emailTemplates.ts.- Tests:
worker/test/billing-dunning.test.ts(20) — the decision table, plus end-to-end assertions on the outbound Resend call for the two guards that are invisible from either side alone (the plan column cannot show a mail, and the pure function cannot see a stale event). Four mutations run: dropping the first-invoice guard, the no-address guard, the ordering guard on the mail, and reading the account after the plan drops — each killed.
POST /api/billing/checkoutrefuses an unconfirmed password account (403, "Confirm your email address before subscribing"). The check is a fact about the account, so it runs before the Stripe config and price lookups — and in the route rather than only the UI, since the route is reachable with a session and a fetch whatever the page drew.GET /api/billing/statusreportsemail_verification_requiredso the panel never offers a button that would be refused.POST /api/billing/portalis deliberately NOT gated. Someone already paying has to be able to reach the portal and cancel whatever else is blocked; a gate that strands a subscriber away from the cancel button is worse than no gate.- Google accounts are never gated.
auth_provider = 'google'withemail_verified = 0is a real state — Google reports an unverified address by leaving it off the account — and there is no password to reset, so gating on the flag alone would lock those users out of paying with no way to fix it. mustVerifyEmail()is shared by the two routes so the policy cannot drift between what the UI is told and what the server enforces.
<ResendVerification/>— the resend control extracted from the banner, now that the same ask appears in the billing panel: one request at a time, a terminal "sent", and a failure that returns to idle instead of stranding the user on a disabled button.inlineandbuttonvariants.BillingPlansgainsupgradeBlockedReason— separate fromconfigured, which is about the server; this is about the account.- Tests:
worker/test/billing-verified-gate.test.ts(7) plusBillingPlans.gateandResendVerificationon the front end (8). packages/pwa-kit— the install half of the PWA, ported from mercurypitch. A workspace package with no imports from the app that uses it, so extracting it to its own repository later is agit filter-repoand a publish rather than a rewrite.solid-jsis a peer dependency. Consumed through a@pwa-kitalias invite.config.ts,vitest.config.tsandtsconfig.json; its tests run under the frontend's vitest so CI covers them with no extra job.installPwaInstallListeners()runs inindex.tsxbefore render: Chrome firesbeforeinstallpromptonce, early, never replays it, and that event is the only handle on the native install sheet. Cancelling it also suppresses Chrome's own mini-infobar and is what keeps the event usable later.canInstall()/needsIosInstallHint()/isStandalone()are the three questions worth asking, and<InstallAppButton/>renders nothing when all three say no. A dead Install button would appear on every desktop Firefox and inside every already-installed window.- iPadOS 13+ reports itself as a Mac, so the iOS check falls back to touch points; Chrome/Firefox/Edge on iOS are excluded because they are WebKit underneath but cannot add to the home screen at all, and a hint there points at a menu item that does not exist.
- Manifest:
id(without it the identity is derived fromstart_url, so changing that later reads as a different app and offers a second install beside the first), plus explicitscope,launch_handler: navigate-existing,orientationandcategories. Droppedversion: Date.now()— not a manifest member, and it churned the file on every build. - Tests: 11 for the kit, 6 for the button.
Fixed
- The month pills overflowed their own buttons on a phone (
frontend/src/utils/period.ts,components/PeriodBar.tsx,PeriodOrbit.tsx,PeriodBar.module.css).PERIOD_PILLSgave the first two pills the short forms "This mo." and "Last mo.", which atflex: 1 1 0on a 320-390px viewport were wider than the pill they sat in — and with onlywhite-space: nowrapand nooverflow, the glyphs ran straight out through the border.PERIOD_PILLSis replaced byperiodPills(now = new Date()), which names the first two for the months they actually select:label"August"/"July",short"Aug"/"Jul". A function and not a constant, because a constant captures the month at import and a tab left open across midnight on the 1st would keep naming the month it was opened in.- A new
titlefield carries the wording the label gave up ("This month (August)"), so the tooltip still explains a pill whose label is only a month.PeriodOrbitgained the same tooltip; it previously had none. .pillgetsoverflow: hidden; text-overflow: ellipsis. The labels are short now, but a pill that cannot contain its own text is a bug waiting for the next longer word. Mobile padding drops 10px → 8px, which buys the text a few pixels before the ellipsis does.- Tests: 6 unit in
utils/__tests__/period.test.ts(both months, the January→December year boundary, the titles, that the ids are untouched, that every short form is ≤ 4 characters and no longer than its label, and that the result is computed per call) plus 3 e2e at a 320px viewport. - The e2e test that already covered this passed the whole time. It compared each pill's bounding box against the bar's, and the box was inside it — only the glyphs were not. The new one reads
scrollWidth - clientWidthon the pill and on its visible label, which is the difference between "the button fits" and "the text fits". Against the old labels it fails with"This mo." overflows its pill. - The label assertion reads the visible
<span>, not the button: both the full and the short label are in the DOM at all times with CSS choosing between them, sotoHaveTexton the button returns them concatenated ("AugustAug").
- The onboarding import step's footer promoted the wrong action (
frontend/src/components/onboarding/OnboardingWizard.tsx). The wizard already moved the import flow's forward action into the footer for themappingandpreviewsub-steps; theuploadsub-step was left out, so with a statement staged the primary button still read "Continue without importing".ImportDataEntryrenders its own forward button —bank-process-btn,import-continue-mapping— inside the step body, below that tab's inputs, which on a phone put it under the account pickers and off-screen. The action that abandons the step was the one under the thumb.readyEntryAction()returns the active tab's forward action once that tab has something to act on, and null before then: with no file chosen there is nothing to promote and the footer should still offer to move past the step. Bank imports promoteprocessBankFiles(); Google Sheets and the two CSV tabs promotegoToMapping()oncesheetResult()/uploadResult()is set.- Skipping is demoted to the existing
secondaryghost slot — the same shapemappingandpreviewalready use — so it stays one tap away. - The import PAGE is untouched. It renders the same
ImportDataEntrywithout this footer, and its inline buttons stay exactly where they are. .footer/.footerRightwrap under 620px. The step can carry four buttons (Back, Skip setup, Don't import, primary), which does not fit a 360px phone on one line; wrapping keeps the primary at full width instead of squashing all four until none reads as the main one.- Tests: 1 e2e in
tests/onboarding.spec.ts— asserts the primary is the skip before a file lands, becomes "Process & continue" after, that "Don't import" is still reachable beside it, and that the footer button does what the inline one does.
- Every paid plan card said "Upgrade" (
frontend/src/components/BillingPlans.tsx). From Advanced, the Basic card said Upgrade — the opposite of what clicking it does — and the grid gave a subscriber nothing to tell which tiers were above them and which below. The CTA now reads the plan's position in the catalogue and saysDowngradeorUpgradeaccordingly.- Direction comes from the catalogue's own order, not a second list in the component.
GET /api/plansreturnsObject.values(PLANS), which preserves plans.ts's declaration order (free, basic, advanced, ultimate) and is the order the grid already renders in — so a tier slotted into plans.ts later is labelled correctly with no change to the frontend. - A current plan that is not in the catalogue falls back to
Upgrade. A legacy value, or one granted out of band, says nothing about direction, and guessingDowngradefrom an unknown starting point would be worse than the old honest default.premiumstill maps toadvancedthroughcurrentId()first. - Free is untouched: it has no CTA in either direction. Ending a subscription belongs in the portal, and a
Downgradebutton opening a Stripe checkout for a 0 EUR plan would be a trap. - Tests: 8 in
BillingPlans.direction.test.tsx, against a four-tier catalogue — the interesting cases only exist when something sits both above and below you.
- Direction comes from the catalogue's own order, not a second list in the component.
- Picking a colour saved the category and closed the form (
frontend/src/features/Categories.tsx,Budgets.tsx). The colour swatches are<button>s inside the category<form>and carried notype, so they took the HTML default —type="submit". Clicking one submitted the form: the category was written and the modal closed, mid-edit, before the name or the icon had been touched. It read as the modal auto-closing rather than as a swatch that was quietly the Save button.- Both instances fixed with
type="button": the Categories page's category form, and the category form on the Budgets page, which is a second copy of the same picker. - Nothing catches this on its own. The diff looks right — the handler does the one thing it should, and nothing anywhere says "and also submit". Solid does not warn, TypeScript cannot see a missing attribute, and eslint's JSX rules do not cover it.
frontend/src/__tests__/formButtonType.test.tsscans every.tsxfor a<button>opened inside a<form>whose attributes omittype, and fails on any. It matches<buttonwith a negative lookahead rather than requiring a following space or>, because attributes usually start on the next line and<buttonalone is the shape the bug actually ships in — the first draft required the space and found nothing. - Tests: 4 unit (including a fixture of the bug as it shipped, so the scanner cannot silently stop working) plus 4 e2e in
frontend/tests/category-color-swatch.spec.ts, covering both forms. Verified against the pre-fix source: the scanner flags exactlyCategories.tsx:543andBudgets.tsx:1385, and 2 of the 3 Categories e2e tests fail without the fix. - The e2e test for the add form watches for the
POST /api/categoriesrequest rather than the modal. Submitting closes the modal only once the POST returns, so an immediatetoBeVisible()passes in the gap — the first version of that test did exactly that against the buggy build and would have shipped saying nothing.
- Both instances fixed with
- A category card with a budget drew its divider twice, and cost three extra rows (
frontend/src/features/Categories.tsx,CategoriesPage.module.css). The budget block was four stacked rows — "Spent / amount", a 6px.progress-bar, then.spending-footercarrying "X limit" and "Y remaining"..spending-footerset its ownborder-top: 1px solid var(--border)directly beneath that track, and at 6px against 1px the two read as one horizontal rule painted twice..spending-footerwas also the only one of the card's label/value rows withoutdisplay: flex, so its two spans stacked left-aligned instead of sitting at either end of one line — which is where the third row came from.- Rebuilt as two rows. The limit rides with the amount it bounds ("EUR 254.70 of EUR 220.00",
.spending-of), and what is left rides beside the bar that shows it (.meter-row: a 10px capsule.meterplus a.meter-notereading "EUR 34.70 left" or "EUR 34.70 over"). No second border anywhere in the block; the card's one divider stays on.category-spending. - The note sits beside the bar, not inside it. Inside is tighter until the fill reaches it, at which point the text is on the fill in one theme and on the track in the other, with no single colour that reads well against both.
.metercarriesrole="img"and anaria-labelnaming both numbers — a bar whose meaning is carried entirely by a width is nothing to a screen reader..meter-noteusesfont-variant-numeric: tabular-numsso figures line up across a grid of cards. Thewidthtransition is behindprefers-reduced-motion: no-preference.- Under 380px
.meter-rowwraps and the bar takes the full width, rather than squeezing to nothing to keep the number on the same line. - Removed a dead twin of this whole design:
.categories-page .budget-limits/.budget-limit{,-label,-amount}/.remaining-{amount,label,amount-value}/.budget-progress{,-bar}and its four state variants, plus.remaining-amountand the.progress-fillwarning/danger/success/normal set. None had been referenced from any component —.budget-limitscarried the sameborder-topas the footer that caused the report, and.budget-progresswas a second copy of the same 6px bar. - Tests: 5 in
frontend/tests/category-card-budget.spec.ts. They measure boxes rather than read text, because both defects are layout facts a text assertion cannot see: exactly one drawnborder-topin the card's whole subtree; the bar and the note sharing a vertical centre with the note to the right of the bar; the block no taller than header + meter + 40px; the fill between 0 and 1 of the track and the track no more than 14px tall; and no sideways overflow at 360px.
- Rebuilt as two rows. The limit rides with the amount it bounds ("EUR 254.70 of EUR 220.00",
styles.formInputon the Budgets page resolved to a rule that matched nothing (frontend/src/features/BudgetsPage.module.css).vite.config.tssetscss.modules.localsConvention: 'camelCase', which exports a camelCase alias for every original class name — so.form-input(line 168) and a later.iconField .formInputblock both arrived in the JS asstyles.formInput, and the later one won. All six form controls inBudgets.tsxtherefore rendered with no background, no border and no padding, because the only rule they could match was scoped under.icon-field.- Visible as the reported bug in the Allocate Budget modal: a transparent
<select>is what Chrome paints its option list white behind, while the page's light--textstill cascades in — white on white. The amount input looked unstyled for the same reason. Confirmed by reading computed styles off the running app:background: rgba(0,0,0,0),border-top-width: 0px,padding: 0px. After the fix:rgb(10,14,28),1px,10px 14px. - Fixed by writing that block in kebab-case like the rest of the file, which removes the duplicate local name entirely. No rule changed; one simply stopped being shadowed.
- Seven more collisions of the same shape exist and are listed in the new test rather than fixed here — each one has a dead rule set, and merging them changes how a page renders, which wants looking at rather than doing blind:
Layout.module.css(sidebarNav),BillsPage(billsSection),BudgetsPage(categoriesSection,categoryChartSection),LoansPage(loansPage),TransactionsPage(modalFooter,modalTitle). - Tests: 4 in
frontend/src/__tests__/cssModuleNaming.test.ts. It reads every*.module.cssoff disk and fails on any NEW collision; a fourth test fails if an entry on the known list is fixed but left there, so the allowlist cannot rot into decoration. Nothing about this class of bug fails a build, a type check or a lint — this test is the only thing that catches it.
- Visible as the reported bug in the Allocate Budget modal: a transparent
- Signed-in devices listed sessions that had expired weeks ago. A session token is good for seven days and is never refreshed —
issueSessionCookieis only ever called at sign-in — but nothing deleted theauth_sessionsrow when the token died.GET /api/auth/sessionsselected the table unfiltered, so the list grew by an entry per sign-in forever: a browser signed into once a month showed up a dozen times, every entry looking exactly as live as the real one, and "sign out this device" on any of them revoked nothing because there was nothing left to revoke.- The list is now bounded by the token lifetime (
created_at > datetime('now', '-7 days')).last_seen_atcannot answer this — it says when a session was last used, not when it expires, and a token issued seven days ago and used a minute ago is dead either way. sweepExpiredSessions()joins the existing cron alongsidesweepRateLimits, so the table stops growing rather than merely being filtered on read. It leaves a day of slack past the TTL: being swept early would end a session a moment before its token was due to expire, for no reason beyond two clocks disagreeing.- Tests: 4 in
worker/test/session-lockout.test.ts.
- The list is now bounded by the token lifetime (
- The E2E job on
mainwas killed by its own timeout, and reported it ascancelled..github/workflows/e2e.ymlruns the 44-test smoke subset on a pull request but all 515 tests on a push tomain. The 30-minute bound added alongsideworkers: 1was sized against the smoke run: the last green full run already spent 22m25s of it, and the next push went over and was killed. GitHub reports atimeout-minuteskill as cancelled, not failed, somainshowed a non-green E2E while CI and both deploys were green and no test had actually broken.- Fixed by sharding the push path across four jobs (
--shard=i/4), not by raising the bound.workers: 1stays — four headless Chromiums against one wrangler got workerd killed twenty seconds in, after which every remaining spec failed on a 502 from the vite proxy. Four jobs buys the wall-clock back without putting a second browser on any one workerd: each shard is its own runner with its own wrangler and its own local D1. Playwright splits it 130/130/129/129 and runs the setup project in every shard; a shard is 5.0m of tests locally atworkers: 1. The bound is now 25 minutes per shard, a hang detector rather than a budget. fail-fast: false, so one bad shard shows the other three instead of cancelling them.
- Fixed by sharding the push path across four jobs (
- Failure traces from E2E were never actually uploaded. Both artifact steps pointed at
playwright-report/andtest-results/in the repo root; Playwright writes them next to its config, underfrontend/. Every run since produced zero artifacts. Now one step uploadsfrontend/test-results/on failure, named per shard —upload-artifact@v4rejects a second upload under a name another job has claimed. - The captcha had exactly one visible state for two very different failures (
frontend/src/components/Turnstile.tsx,LoginScreen.tsx,LoginModal.tsx).<Turnstile/>reported a token or an empty string and nothing else, so "the challenge has not been solved yet" and "the widget script never arrived" were indistinguishable to the form. The blocked case rendered an empty<div>, the hint "Complete the verification above to continue" under it, and a permanently disabled submit button — and the server, failing closed, could only answer a submit with a generic 403. There was no route out of it short of a page reload.TurnstileStatusnames the seven states, andonStatusreports them.captchaIsStuck()separates the two the user cannot clear by waiting or clicking (unreachable,failed) from the rest;expiredis deliberately not one of them, because the widget re-arms itself.- The stuck states render their own panel from inside
Turnstile, so both auth forms get the same wording with no duplication: what failed, the domain to allow (challenges.cloudflare.com— the only actionable fact in the whole situation), and a Retry. loadScriptgained a 12s timeout.onerrorfires in milliseconds for a refused connection and never at all for a null-routed or silently-dropped host, which is the shape most DNS filters and corporate proxies take. Without it the widget sat inloadingforever and the button stayed disabled with no explanation.- A failed load no longer caches its rejection.
scriptPromisewas memoised unconditionally, so every later attempt — Retry, or the fresh widgetLoginScreenmounts for the register to sign-in handoff — replayed the original failure without asking for the script. Allowing the domain and retrying could not work. error-callbacknow logs Cloudflare's numeric code. It is the only way to tell a blocked subrequest from a bad site key after the fact, and it was being discarded.clearCaptcha()replaces the fourresetTurnstile()+setTurnstileToken('')pairs per form: a spent token has to take the status with it, or the form explains nothing under a button it has just disabled. A stuck widget stays stuck — resetting a script that never loaded does not load it.LoginModalhad no hint at all, only the disabled button; it now shares the same one.- Tests:
Turnstile.blocked.test.tsx(12) — the message names the domain,captchaIsStuckover all seven states, the blocked panel and its Retry, the never-answering host, Retry as a real second request, a remount after a blocked load, the happy path,error-callback, andexpiredstaying unblocked. Six mutations run — cached rejection, no timeout,expiredas stuck, blocked-reports-ready, the domain dropped from the message, anderror-callbackreporting ready — each killed.
- The marketing capturer and its guide still drove the deleted Express server (
frontend/scripts/gen-marketing-shots.mjs,docs/marketing-screenshots.md,frontend/tests/e2e-seed.ts). Retiringbackend/tooknuke-demo.jsand the three-profile demo with it, so the documented setup —node backend/scripts/nuke-demo.js,node backend/index.js, shoot profile 3 — named three things that no longer exist, and the script's login posted{username, password}at a Worker that wants{email, password}.- The capturer now runs against the e2e suite's app:
wrangler devon a local D1, vite proxying/apiat it, and the seeded fixture account. One fixture shot by both the suite and the stills, on purpose — a screenshot pipeline with its own idea of the data drifts from the app the moment either side moves, and it drifts silently, because the frames still render. - The profile is looked up by name, not pinned.
PROFILE=3was a fact about a database that no longer exists; the fixture's id is whatever D1 handed out and differs per worktree. The script readsGET /api/profilesand takesE2E Fixture, warning if it falls back. A wrong id is not an error anywhere — it is six shots of an empty profile. EMAIL/PASSWORDare overridable, defaulting to the fixture account.- The doc's three-step setup is deliberate: the capturer needs the servers still up when it runs, and Playwright stops the ones it starts. Step three is
--project=setupso seeding does not also re-shoot the PWA install screenshots. - The stale
POST /api/profiles/reseed-demowarning is replaced with the one that is now true: on the Worker it resets the current profile to default categories, so it empties the profile you are about to shoot. Same for the portfolio quote path, which isworker/src/routes/portfolio.tsnow and fails the same silent way.
- The capturer now runs against the e2e suite's app:
- The e2e fixture seeds budgets (
frontend/tests/e2e-seed.ts) — four monthly ones on the spending categories that carry transactions. The budgets page and the dashboard's budget alerts had nothing but an empty state to render, which is also what made03-budgetsthe one marketing frame that could not be re-shot.start_dateis the first of the current month: a budget's period is derived from it, so one dated mid-month reads as a partial period and every figure on the page becomes a fraction. exportBackupaborted the entire backup on one unreadable R2 object (worker/src/backup.ts,worker/src/routes/exports.ts). A receipt row whosestorage_pathno longer resolved threw503 Receipt file "…" is unavailable; full backup aborted, so an account with one orphaned receipt out of hundreds could not take a backup at all — and no retry fixes a blob that is gone.- Missing objects are now skipped and reported in
skippedReceipts({receipt_id, original_name, reason}) plus anX-Backup-Skipped-Receiptsresponse header, because the browser downloads the file without parsing it and the UI needs somewhere to read the warning that is not a hundred megabytes of JSON. - The receipt's metadata row is dropped with its bytes.
validateBackuprequires everyreceipts[]entry to carry a matchingreceiptFiles[]entry, so a backup that listed a receipt it had no file for would export cleanly and then be rejected with a 422 on the way back in. Transactions pointing at a skipped receipt keep their row withreceipt_idcleared — losing a purchase because its photo is missing would be a far worse trade than losing the pointer.
- Missing objects are now skipped and reported in
GET /api/exportscoped the full backup toX-Profile-Ids, whilerestoreBackupdeletes every profile the user owns (worker/src/routes/exports.ts,frontend/src/features/Settings.tsx). The account-wide guarantee lived entirely in the caller:Settings.tsxpassedallProfiles(), and nothing on the server required it. A stale header, a household mid-switch, or any script hitting the endpoint produced a backup that silently destroyed the profiles it omitted. The route now reads the user's profiles itself and ignores the header;handleExportno longer sends one. A user with no profiles gets a 404 rather than an empty file that restores as a wipe.- The profile cap made your own backup unrestorable (
worker/src/routes/exports.ts).POST /api/importrejected any backup with more profiles than the plan limit. Combined with the account-wide export above, an account holding more profiles than its current plan allows — a downgrade, a plan change, profiles created before the cap — could not restore its own data. The ceiling is nowmax(planLimit, profiles currently owned): putting back what you had is always allowed, exceeding it is still capped. - Six read-then-write races between concurrent requests (
worker/src/routes/{bills,recurring,transactions,receipts,auth}.ts). Each was atomic in its write and non-atomic in its decision: aSELECT, a check in JS, then aDB.batchencoding a conclusion drawn from a row that could already have moved. D1 has no interactive transactions, so the fix throughout is to make the write itself the claim — a conditional statement inside the batch — and to report a lost race instead of applying a stale conclusion.POST /api/bills/:id/mark-paid— readlast_paid_date, checkedisBillPaidForCurrentPeriod, then batched INSERT + balance + UPDATE. Two taps inserted two transactions and debited the account twice. Every statement now carries(SELECT COUNT(*) FROM bills WHERE id = ? AND profile_id = ? AND (last_paid_date IS NULL OR last_paid_date <> ?)) = 1, with the UPDATE last so the writes before it still see the pre-state; zero changes on the claim → 409.POST /api/recurring/:id/populate— same shape againstnext_date. The guard isnext_date IS ?bound to the value read, so the losing batch matches nothing. The invariant is one transaction per period advanced, not one per request: an overdue rule populated twice legitimately takes two periods.PUTandDELETE /api/transactions/:id— the worst of the six, because it left permanent drift rather than a duplicate. Both paths reverse the transaction's OLD effect using values read before the batch, so two concurrent edits each reversed the same original: a 100 expense edited to 50 and to 30 credited 200 and debited 80, leaving the balance 50 out with no row to explain it.unchangedSince(row, id, pid)builds a predicate over exactly the fields the reversal arithmetic reads (type,amount,amount_local,account_id,transfer_account_id); every balance statement carries it and the row write moved to the END of the batch. A lost race is a 409, not a silent partial. Edits that touch only non-balance fields do not collide.POST /api/receipts—COUNT(*)then insert. The insert is nowINSERT ... SELECT ... WHERE (SELECT COUNT(*) ...) < ?, with the R2 object cleaned up on refusal by the existing catch. The pre-flight count stays so an over-quota upload is refused before the file is streamed.POST /api/auth/reset-password—SELECT ... WHERE used_at IS NULLthen an unconditionalUPDATE, plus three unbatched writes. The SELECT no longer filters onused_at: spending the token is the only gate (UPDATE ... WHERE id = ? AND used_at IS NULL, 0 changes → 400), and the password change and the retiring of the account's other pending links are one batch. Two gates for one fact meant the read could refuse before the write was ever exercised, so nothing proved the write was conditional.GET /api/auth/verify-email— same single-gate restructuring.
apiPut/apiGet/apiDelete/apiPostthrew before parsing the error body (frontend/src/core/api.ts), so every failure through them readRequest failed with status 409and the sentence the server wrote for the user was discarded.parseJsonResponsealready raises with the server's own wording; the pre-throw is gone.- A thrown API error now carries
status(frontend/src/core/api.ts,errorStatus()), andTransactions.tsxuses it: a 409 toasts the server's message and refreshes the list, instead of the previousconsole.errorthat left Save looking inert. readCookiereturned the firstfm_sessionheader value; a browser can hold several. Cookie identity is(name, Domain, Path), not name alone, so a browser that had visited bothtokencircles.comanddev.tokencircles.comheld twofm_sessioncookies — one scoped.tokencircles.com, one.dev.tokencircles.com— and the prod-scoped one domain-matches the dev API. RFC 6265 §5.4 sorts equal-path cookies oldest-first, so a first-match-wins reader deterministically picked the stalest one: sign-in succeeded, the redirect authenticated with the wrong token, and the user landed back on the login screen. Only on a browser that had used both origins, which is why it reproduced on one machine and nowhere else.readCookiesreturns every value;authenticateRequesttries each and the first that verifies wins.AuthResultcarriescookieCountand the most informative failure reason, so the log distinguishes "no cookie" from "three cookies, none valid".
- The login rate limit counted successes. A successful login proves the credentials are right; spending the anti-guessing budget on it means signing in and out across a few devices produces "Too many requests" for a legitimate user. Limits are now per-IP (30/15min) and per-email (10/15min), counted on failure only, and both buckets are cleared on success (
clearRateLimit).humanWaitrenders the retry as "in about 4 minutes" rather than a bare "please wait a bit". - The bank-import account error is now on the field, not only at the top of the page.
runBankTransformrefused withsetError('Choose a target account for every recognized file')and nothing else; on a phone that line is off-screen by the time the button is reachable, so the refusal was indistinguishable from the button doing nothing.rowsMissingAccount(rows)is extracted and exported fromimportFlow.ts, and both the transform's guard and the UI's red-marking now call it — so what is coloured red is by construction exactly what the transform refuses on. Unrecognized rows are excluded: the transform skips them, so demanding an account there would be an error the user cannot clear.bankFilesMissingAccount()gates that list behindshowBankFieldErrors, set on the first failed attempt. Derived rather than stored, so filling one in clears its own error with no second submit and removing a row cannot leave a stale index behind.AccountSelectgainsinvalid/invalidMessage: a--expenseborder plus a 1px ring (a 1px border on a 13px control is easy to miss on a phone, which is the screen this is for),aria-invalid="true", and the message under the control.- The row itself takes a red border and
data-invalid="true", and the first offending row is scrolled into view — marking a field only helps if it is on screen.
vitest.config.tsnow mirrorsvite.config.ts'scss.modules.localsConvention: 'camelCase'. Without it a kebab-case class reached through its camelCase name —styles.createCardfor.create-card, which is how this codebase writes them — resolved toundefinedunder test, so every rendered component carriedclass="… undefined"and no test could assert on a class at all. Found by writing the first test that tried.- Tests:
rowsMissingAccount(5) andAccountSelect.invalid(5). Five mutations run — flagging unrecognized rows, indexing among recognized rows only, dropping the invalid class, droppingaria-invalid, never rendering the message — each killed.
Removed
frontend/public/manifest.json— dead since VitePWA started generatingmanifest.webmanifest. Nothing linked it, and itsshort_name("Circles") disagreed with the one actually being served.- Email verification for password accounts (Worker).
users.email_verifiedhas existed since0001_init.sqland was written but never asked for:POST /api/auth/registerinserted it as0, and the only things that set it to1were Google's ownemail_verifiedclaim and completing a password reset. Nothing read it — login did not check it and/api/auth/medid not return it, so a password signup was indistinguishable from a confirmed one.0022_email_verifications.sql— same shape and the same reasoning aspassword_resets(0005): only the token's SHA-256 is stored, single-use, superseded on resend, expiry checked at use time. 24h TTL, longer than the 2h reset TTL because a reset link is a live credential and a confirm link is not. The row keeps theemailit was minted for as well as the user id.GET /api/auth/verify-email?token=&returnTo=— a top-level navigation with nothing to fill in, so it does the work and bounces back to the app as#everified=1/#everified_error=…, the way the Google callback already does.returnTogoes throughisAllowedReturnTo, an unknown token and a spent one get the identical answer, the token is spent whatever the outcome, and the account's address must still be the one the link was sent to — otherwise changing it after asking for a link would confirm the NEW address on the strength of mail delivered to the old one.POST /api/auth/resend-verification(session required) — 3/hour per address on top of the per-IP cap, and answers{ ok: true, alreadyVerified: true }rather than an error when there is nothing to confirm. The 429 can be shown here, unlike forgot-password: the caller already proved the account is theirs, so there is no address-existence oracle to protect.renderWelcometakes an optionalverifyUrl, which turns the primary button into "Confirm your email" and demotes "Open Token Circles" to a text link. One mail rather than two — a welcome and a confirm arriving together read as a duplicate.renderEmailVerificationis the stand-alone resend, where welcome copy would be wrong./api/auth/mereturnsemail_verified; the banner is the only thing that reads it, and this is the call it already makes.
<VerifyEmailBanner/>— mounted at the top of<main>, above the page host, since the pages there stay mounted and hidden and a per-page home would render it once per page. Self-checking (asks/api/auth/meitself, re-asks on every session change, so it appears straight after an in-session signup), dismissible for the tab viasessionStorage. It shows nothing when/meomitsemail_verified— which is how the legacy self-hosted backend answers — rather than reading the absence as "unverified" and nagging every user of it with a Resend button that server has no endpoint for.core/emailVerification.tsreads the#everified…fragment inindex.tsxbefore render and strips it: it is not a page, so the hash router would resolve it to a 404, and a fragment left in the address bar re-announces the outcome on every reload.- Tests:
worker/test/email-verification.test.ts(17) andfrontend/src/{core,components}/__tests__/(26). Each guard is covered by a test that fails without it — verified by mutation for the address-still-matches check, single-use consumption, thereturnToallow-list, the absent-field case and the Google-account case.
Notes
- Worker only. The legacy Express backend has no
/api/auth/registerat all, and browser-only mode has no accounts, so there is nothing to verify in either. - Soft gate on purpose, copying the shape used in mercurypitch: the account works unverified and the banner is the only consequence. Making it a hard gate is a one-line change in login, but it strands anyone whose confirm mail is lost.
[5.9.3] — 2026-08-23
Fixed
POST /api/profiles/reseed-demowas additive. It deleted a hand-written list of seven tables (transactions,budgets,loans,categories,accounts,savings_goals,bills) and then calledseedThreeTierProfiles(), which re-seeds a profile as soon as that profile has no transactions and then inserts intoportfolio_holdingsandrecurring_transactionsunconditionally. Neither table was ever deleted, so every call appended another full copy — a database reseeded four times held SPY x4 and VTI x4 — while the response still returned{ ok: true, message: 'Demo data has been restored' }.- The same endpoint cleared one profile and re-seeded three. The clear ran against the active profile only, so the other two demo profiles kept their rows; since the seeder skips a profile that still has transactions, "restore the three example profiles" restored whichever one was active. A demo profile that had been emptied another way hit the opposite case — the seeder re-seeded it on top of the accounts, holdings and goals the clear never reached. It now clears every demo profile the caller owns before seeding, and answers 403 to a caller who owns none of them instead of wiping that caller's active profile.
DELETE /api/profile/datacarried the identical seven-table list, so "clear this profile's data" leftportfolio_holdings,recurring_transactions,tags,receipts,housings,category_mappings,budgets_zero_based,retirement_goalsandemergency_fund_configin place. It now clears the same full set. Per-profilesettingsare still kept — they are configuration, not data.ProfilesRepository.deleteAllDataForProfiledeletedcategoriesbeforebudgets_zero_basedandcategory_mappings, both of which hold real foreign keys into it while the connection runs withforeign_keys = ON. Deleting a profile that had either populated could fail on a constraint. The shared list is ordered children-before-parents.
Changed
backend/lib/profileTables.jsis now the single source of truth for what belongs to a profile: 16 tables with aprofile_idcolumn plus 4 child tables reached through a parent (transaction_tags,loan_rate_periods,loan_prepayments,account_balance_history— the middle two have no foreign key at all, so nothing cascades them).routes/profiles.js,ProfilesRepository,scripts/nuke-demo.jsandscripts/nuke-all.jsall read it; the four copies they used to keep had already drifted apart.ProfilesRepositorygainsclearDataForProfile(pid, { includeSettings });deleteAllDataForProfileis that plus the profile row.
Added
backend/test/unit/routes/profile-data-clearing.test.js— in-process supertest against the real router, real repositories and the real seeder.- Reseed. Reseeds twice and asserts every table holds identical per-profile counts
(
Math.randomis pinned, because the seeder randomizes how many dining/lunch/health rows it writes), asserts one holding per ticker, asserts a demo profile emptied by other means is rebuilt rather than doubled, asserts a stale row planted in profile 3 is gone after a reseed run from profile 1, and asserts a caller who owns none of the demo profiles gets a 403 with their own data untouched. - Clear. Plants a row in every per-profile table and then names the tables that still hold
rows after
DELETE /api/profile/data, so a failure says which table the delete list forgot rather than that a count was wrong. Rows are planted fromPRAGMA table_inforather than a hand-written list, so a per-profile table added toschema.sqllater is probed by the next run instead of being quietly skipped; child rows hang off a parent of the same profile, becauseloan_rate_periodsandloan_prepaymentsdeclare no foreign key andPROFILE_CHILD_TABLESis the only place that link is written down. Also covers what the clear deliberately keeps — per-profilesettingssurvive it, and deleting the profile outright takes them with it. - Schema drift.
PROFILE_DATA_TABLES + settingsmust equal every table inschema.sqlcarrying aprofile_id, so a new per-profile table cannot be added without landing in the shared list. - Eight of the twelve fail on the pre-fix tree. One fails with a 500 rather than an assertion:
the old order deleted
categorieswhilebudgets_zero_basedandcategory_mappingsstill pointed at them. That path had no test at all —BE-PRF-019only asserted the response saysok: true, which it also said while leaving holdings, tags, receipts and housing behind.
- Reseed. Reseeds twice and asserts every table holds identical per-profile counts
(
Notes
- Legacy backend only. #375 ("make destructive operations complete") swept the same class of bug out of the IndexedDB adapter and the Worker but never touched
backend/, which is what a self-hosted Docker install runs. The Worker'sreseed-democallsclearProfileDataand has no three-tier seed; browser-only mode doesclearAllData({ includeProfiles: true })beforeseedDemoProfiles(). Both were already symmetric.
[5.9.2] — 2026-08-23
Added
shared/retirement.ts— a month-by-month projection model with no I/O, run by the Worker and by the browser-only storage layer, replacing three hand-written copies that disagreed with each other and with the chart the page drew from their output. Covers what the old code could not express: inflation as a real/nominal pair rather than a discarded parameter, an opening balance, planned income steps and annual raises, dated expense periods, several lifestyle targets at once, and a return band.- Simple and Advanced modes on the planner (
frontend/src/features/RetirementPlanner.tsx,settings().mode: 'simple' | 'advanced'). Simple takes a contribution, a return and a target spend. Advanced projects income and spending separately — planned raises, a job change, a career break, dated periods of higher spending — and adds an allocation section ("Work the return out from an allocation") that derives the expected return from how the money is split rather than taking a typed rate. Both drive the sameshared/retirement.tsprojection; Simple is a reduced surface over it, not a second calculation. - Inflation is a control, not just a model parameter (
RetirementPlanner.tsx). On, the chart reads in today's money and the target line is flat — which is the point of reading it that way, since a target that drifts with inflation cannot be aimed at. Off, everything is nominal. The rate is kept either way, so toggling is non-destructive. shared/retirementSettings.ts— the saved shape of the assumptions, its normaliser, and derivation of unset fields from a user's accounts and transactions. The settings row is JSON last written by whatever version of the app saved it, so every field falls back rather than throwing; rates are clamped to a range a projection survives, expense windows that end before they start lose the end rather than silently contributing nothing, and duplicate lifestyle ids are made unique. Normalisation runs before storage as well as after, so the row can only ever hold something the model accepts.GET/PUT /api/retirement/settingson both runtimes. GET returns the saved assumptions with anything unset derived, plus what was filled and where from, and what could not be answered from the data at all.frontend/src/features/RetirementPlanner.tsx— the editable panel. The projection runs in the browser from the shared module, so the chart redraws on every keystroke instead of after a round trip, and still agrees with the server by construction. Only saving is a request.
Fixed
- Every copy of the projection accumulated interest in a bucket that was never added back
to the balance before the next month's return, so gains earned nothing. Over 30 years at
7% that is 303k where the answer is 761k. The model is checked against closed-form
arithmetic — a lump sum has to land on
pv * (1+r)^n, level contributions on the annuity future value — which the replaced code fails outright. - Annual rates were converted to monthly by dividing by twelve, which overstates the return
by roughly 3% of itself at 8% and compounds from there. Now
(1 + r)^(1/12) - 1everywhere, including/api/calculators/retirement. - Real returns are netted with Fisher rather than by subtraction: 8.1% against 3.5% is 4.44% real, not 4.6%, which is ~11% of the final balance over 40 years.
/api/calculator/retirereported the balance after twice the projection horizon as "savings at retirement". It now reports the balance at the retirement age.- The browser-mode FIRE calculator accepted an
inflationRateand discarded it. It is passed through. /api/retirement/projectionhad always accepted overrides on the query string; the page called it with none, and had no controls that could have supplied any. The page now owns the inputs.
Changed
- An income step now sets the salary outright instead of only raising it. It previously applied only when it beat what raises had already produced, so a sabbatical or a career change typed into the field was silently discarded and the chart did not move. Raises compound from whatever the step set, and a step already in force at the start month is the opening income. The spreadsheet fixtures are unaffected -- their steps all increase.
projectRetirementclamps the horizon at 150 years. No plan reaches it, but/api/calculator/retirebuilds a horizon from a retirement age taken straight from the request body, which could otherwise allocate a row per month without bound.- A month still being typed (
2026) no longer counts as a start date. Comparing it yielded NaN, which fails every comparison, so an expense period quietly applied from the beginning of time while the user was mid-keystroke. - "Plan until age" is disabled, with a reason, until a date of birth is set: stopping at an age means nothing without a date to count it from, and the projection ignored the field.
- The withdrawal-rate hint no longer prints "Infinityx your annual spending" when the field is cleared.
- The retirement page's chart came from a fourth formula applied to the endpoint's output
(
cumulative += annual_contribution * (1 + return/100)^y), which is neither the endpoint's arithmetic nor correct. The page renders the shared model's own series. - Two e2e assertions on the retirement page stop swallowing a slow first paint into a fixed timeout, and retry properly instead.
Changed
-
Removed 84 verbatim-duplicated rules from five CSS modules — 519 lines, all pure deletions:
CategoriesPage(-43 rules, lines 301-579 duplicated 580-858),BudgetsPage(-21),GoalsPage(-13),HousingPage(-5),RetirementPage(-2). Only rules whose selector and whole source span (comments included) were byte-identical were touched, and the last occurrence is the one kept — the copy that already won the cascade, so nothing that sat between the copies changes. A selector repeated with different declarations is a deliberate override and was left alone:.btn-primaryappears twice in each of these files on purpose, the second time to apply the azure-glass recipe. This supersedes the note in 5.9.1 that the duplication was left for a separate change. -
Verified by rebuilding before and after and comparing the emitted stylesheets: after normalising the CSS-module name hashes (they embed file content and line numbers, so every generated class name shifts), all five affected chunks expand to an identical ordered list of selector/declaration pairs. The only textual difference is in
Retirement.css, where esbuild now merges.goal-balanceand.goal-progress— adjacent once the duplicates were gone — into one selector list. -
Ten selectors that overrode themselves are now single rules.
.modal-overlay(Accounts),.analytics-chart/.rate-label/.rate-value(Analytics),.budget-summary/.stat-item/.btn-outline(Budgets),.goal-progress/.goal-actions(Goals) and.ruleEditor(Tags) were each declared twice in one file, the later copy quietly winning on some properties. They are merged into the first declaration, keeping the resolved value of every property. -
Each merge is proven order-independent before it is applied: no rule between the copies has equal specificity, sets an involved property, and can land on the same element (checked against the class combinations the JSX actually puts on one element, so two single-class rules only count as a conflict when some element carries both). Declaration order was checked for shorthand/longhand hazards —
bordernext toborder-radiusis not one, sinceborder-radiusis not part of thebordershorthand. -
Verified by rebuilding: every selector in every built chunk resolves to an identical set of declarations.
-
The primary-button skin is defined once, in
styles/index.css. The azure-glass recipe was pasted into thirteen stylesheets, and in twelve of them appended a second time so it could override the solid fill the same file still declared — that appended block is what made deleting a duplicated rule look risky in the first place. Six tokens (--btn-primary-bg,-fg,-border,-shadow,-bg-hover,-border-hover) now name what the theme primitives are used for, and each page's single.btn-primaryrule consumes them while keeping its own geometry. 240 lines removed, 116 added. Component modules that never got the retrofit (Layout, Spotlight, SettingsDialog, RecurringSection, DashboardSettings, BulkActionBar) are deliberately untouched: pulling them in would change how they look, not how they are written. -
Each page's
:hoverand:hover:not(:disabled)rules are collapsed into one:hover:not(:disabled). That is the single deliberate behaviour change: hovering a disabled primary button no longer applies the hover style. It used to turn solid blue on nine pages (Dashboard, Transactions, Accounts, Budgets, Goals, Housing, Bills, Categories, Import), drop to 90% opacity on Retirement and brighten on Portfolio, because the plain:hoverrule outranked the appended skin and nothing excluded disabled buttons. -
Verified in a browser rather than on paper: a probe carrying each page's own hashed button class, measured base and hover across all 13 pages. 4,544 computed values compared for enabled buttons — zero differences. For disabled buttons the only differences are the eleven described above. Hover is a real mouse move and every measurement asserts
el.matches(':hover'); an earlier attempt forced hover over CDP, which failed silently on some probes and hid most of these differences.
Removed
- Nine CSS modules nothing imported, 629 lines that never reached a bundle:
Button,Card,Filter,Table,ModalContent,ModalActions,TaskList,CategoryMultiSelectundercomponents/, andPageunderpages/. These are the shared-component stylesheets from the SolidJS migration whose contents were copied into each page module — the origin of the duplication above. They looked referenced under a substring grep:Button.module.cssalso matchesExportChartButton.module.css, andPage.module.cssmatches every*Page.module.cssinfeatures/.
Added
cssModuleHygiene.test.tsguards both defects for every*.module.css: no rule repeated verbatim inside one file, and no module left unimported. Both fail on the pre-change tree.vitest.config.tsnow setscss: true. Under the default (css: false) vitest short-circuits every CSS import to empty content, so a?rawimport of a stylesheet resolves to an empty string and any test asserting on stylesheet source passes vacuously (vitest#10788). Cost measured at roughly +1s on the full suite, with all 1001 tests unaffected.
Added — planner interaction
NumberField— a numeric input that renders once untracked and syncs from the model only whiledocument.activeElementis not the input. A controlledvalue={n}compiles to an effect that writes on every model change, and a partly-typed number (3.,-) makes<input type="number">reportvalue === ''while still showing the text, so any write at that instant discards the keystroke.MonthPicker— a month<select>plus a year<select>, emitting and acceptingYYYY-MM, replacing<input type="month">. The native control steps to a birth year one year at a time.InfoTiprewritten. The first version used the nativetitleattribute, which is hover-only: on a phone every explanation in the app was unreachable. It opens on hover, on focus and on tap, pins on click, closes on Escape / outside press / blur, and isposition: fixedfrom the trigger's measured box so it escapes anyoverflowancestor and occupies no layout. Writing its tests turned up that Escape closed the panel and the focus it handed back reopened it in the same tick, so Escape appeared to do nothing.RangeField— a themed slider. Used for the withdrawal rate, paired with the existing number box, which doubles as its readout.Togglegains a compact size and an optional label rendered inside the button. Putting the text in the control is what makes clicking the words flip it and what names the control for a screen reader; a<label>wrapped round a<button>does neither. The pill moved into its own span, so a label-less toggle is the same 44x26 box it always was.frontend/src/features/lifestyleMarkers.ts— a Chart.js plugin drawing a dashed line at each lifestyle's crossing with a pill label in that lifestyle's target-line colour. A plugin rather than an HTML overlay: it redraws with the chart on every data change, resize and theme swap, and clips to the plot area. Stateless — the markers arrive throughoptions.plugins.lifestyleMarkers, because one plugin instance is shared across updates. Pills stack when they would overlap and labels are truncated withmeasureText.frontend/src/features/chartZoom.ts— scroll, pinch and drag over the x scale'smin/max, which a category scale reads as point indices, so the axis relabels itself from whatever range it is given. No new dependency:chartjs-plugin-zoomwould have been one for behaviour that is a hundred lines of arithmetic, and the window maths is separated from the DOM so anchoring, clamping and gesture fall-through are testable without a canvas. A wheel that would zoom out from the full extent does notpreventDefault, so the chart is not a trap you can never scroll past.Charttakes an inlinepluginsarray.shared/retirement.tsgainsyearsOfWithdrawals(swrPct, realReturnPct)—ln(s/(s-r)) / ln(1+r), with the pot cancelling out. Infinite whens <= r,1/satr = 0(the formula's limit, where it is otherwise 0/0), zero atr <= -1.
Fixed — the planner
- Editable lists used
<For>, which keys by reference, over.map(x => ({...x}))— a new object per keystroke, so every row's DOM was disposed and rebuilt and focus went to<body>. Now<Index>, which keys by position. A.claude/skills/solid-formsskill records this and the controlled-input rule, with review greps, since it had been fixed and reintroduced before. - Derived numbers are rounded. A contribution derived as a difference of two averages could
be
7.292500000001382, which is not a whole multiple of the field'sstepand so is:invalid— and one invalid field blocks the whole<form>from submitting, so the plan could not be saved at all. deriveSettingsdecided "the user has not set this" by comparing the stored value to the default. Every default is also an ordinary answer, so saving one was indistinguishable from never having saved: a contribution of 500, a net worth of 0, an income or spending of 0, a retirement spend of 2000. It now takes the stored row rather than a normalised object and asks which keys are present — normalising invents a default for every absent key and destroys exactly the distinction the function turns on. A key counts as set when present and not null, sincenullis how the client says "no value" for an optional field such asbirthMonth. All three loaders return raw rows to match. Mutation-checked: restoring the old sentinel for any of the five numeric fields fails a test each.- Both
PUT /api/retirement/settingshandlers re-derive and returnfilled/missing. Saving is what stops a field being derived, so a client that only tooksettingsback went on crediting "filled in from your data" for figures the user had just typed. - In browser mode the settings store is keyed by
keyalone — no profile column — and the assumptions were saved under a bareretirement_settings, so every profile in the browser shared one plan. The profile is now part of the key; a row saved under the old key is adopted by whichever profile opens the page first and the old row removed. Both server runtimes were always correct, separating profiles through the settings table's(key, profile_id)primary key. The legacy backend keys per profile rather than sharing the Worker's plain key because its settings repository looks rows up by key alone with no profile filter. - The retirement page reloaded through
onMount, which under the keep-alive page host (#317) fires once per session, so a profile switch left the panel showing the previous profile's plan. NowrefetchOnActive, which refetches while visible and defers while hidden. Reverting it fails two of three tests. GET/PUT /api/retirement/settingsadded to the legacy backend, which had no route for them — a guaranteed 404 on every visit, surfacing as an intermittent E2E failure wheneverpage-loading.spec.tssampled the console at the wrong moment. The Import page was requesting endpoints that server never had for the same reason, with the same result; it no longer calls them when the backend is the legacy one.verifyTurnstileDetailedreads Cloudflare'serror-codesand separates a deployment fault (invalid-input-secret,missing-input-secret— logged, answered 503 withcaptcha_not_configured) from a client one (403)./api/healthreportscaptcha: configured | disabled | missing, andsecret:{dev,prod}now setsTURNSTILE_SECRET, which is how an environment came to be a secret short with nothing to notice it:5caef64switched the dev widget on, the dev worker had no secret, andverifyTurnstiletook its fail-closed branch for every password sign-in from that day.
Changed — planner layout
- Field hints move from block text under the controls into info tips on the labels. A field that carried one was taller than the field beside it, so its control sat out of line — the date-of-birth picker floating above the net worth box. An e2e test measures it: no field may carry text below its control, checked across every field in the form, so the next hint someone adds inline is caught wherever it lands.
- The left rail is 440px rather than 360px,
.form-rowaligns on the end edge, and.list-rowwraps rather than shrinking its month selects to 80px. - Skeleton placeholders are tinted from
--primaryviacolor-mix(in oklab, …)in both themes, at percentages chosen to keep their perceived weight (dark luminance 44.2 -> 42.8, light 215.9 -> 216.5).
[5.9.1] — 2026-08-22
Fixed
- Orphaned
categoriesroute.App.tsxnavigates to each spotlight step'srequiredPage, and the Categories tour's page iscategories— a route present inrouter.tsxbut absent fromnavItems, so it was reachable only via the tour or a hand-typed#categories. Added to the sidebar between Transactions and Accounts. Bills' "Categories" is a count of subscription groups and Budgets' is an embedded editor, so neither replaces the standalone manager. .category-headerwasdisplay: flexwith nogap; the 40px icon chip and the name rendered 0px apart. Set togap: 12px, matching.catCardHeaderon the Budgets page. The rule is triplicated inCategoriesPage.module.css(lines 570-839 duplicate 300-569 verbatim); all three copies were updated. The duplication itself is left for a separate change, since removing it can alter cascade order..color-btn/.color-picker-btnwere 24px circles with no flex centring and default button padding, so the 12-14px check SVG sat on the text baseline instead of the centre. Nowdisplay: flex+padding: 0; measured offset from centre is 0x0 in both the card swatches and the modal.- Category icon fields were capped at
maxlength="2"while advertisinge.g., food, home, car. Raised to 32, andgetCategorySvgnow resolves a typed value throughiconFromUserValue: exacticonNameMapkey first, then the same keyword matching used on category names, so "food" and "groceries" land on real glyphs.Object.hasOwnguards the lookup soconstructor/toStringcannot resolve to a non-icon object now that longer strings are typeable. Applied to bothCategories.tsxand the add-category modal inBudgets.tsx. - The icon preview is a
createMemo, not a bare<CategoryIcon>: a Solid component body runs once, so passing the signal as a prop rendered the icon held at mount and never updated as the user typed.
Added
frontend/scripts/walk-tours.mjs(pnpm run test:tours) — walks every spotlight tour step in a real browser against the seeded demo account and fails a step on either the app's owntargetMissingbanner or a degenerate highlight rect. 51 steps across 15 tours, desktop and mobile. Not wired into CI by choice; it is a pre-tag gate, documented in theprod-updateskill.spotlightStore.test.tsgains two guardrails: every route inrouter.tsxmust be reachable from the sidebar, and no tour may navigate to a page the sidebar omits. Both fail on the pre-fix tree..claude/skills/is now tracked (.claude/*ignored,!.claude/skills/), carrying thetour-checkandprod-updateskills.
[5.9.0] — 2026-08-21
Added
- Tag rules — saved filters that attach a tag to matching transactions, implemented identically in both runtimes. Matching semantics live in
shared/tagRules.ts(imported by the Worker and by the IndexedDB handlers) so a rule can never match differently in cloud and local-first mode: normalization coerces any stored/POSTed blob into a complete criteria object, unknown fields narrow rather than widen a rule, inverted amount/date bounds are swapped, and empty criteria match nothing so a half-filled rule can never sweep the ledger during a bulk apply. - Storage: Worker migration
0021_tag_rules.sql(tag_ruleswith profile/tag/(profile_id, auto_apply)indexes andON DELETE CASCADEfromtags); IndexedDBDB_VERSION11 → 12 adds atagRulesstore withby_profile/by_tagindexes. Criteria are stored as an opaque JSON blob — rules are always evaluated in memory, never compiled into SQL, so new condition types need no migration. - API (both runtimes):
GET /api/tags/summary,GET|POST /api/tags/rules,POST /api/tags/rules/preview,PUT|DELETE /api/tags/rules/:ruleId,POST /api/tags/:id/apply,GET /api/tags/:id/summary. Literalrules/summarysegments are registered before/api/tags/:id(same ordering constraint ascategories.ts/mappings), covered by a routing regression test. Apply is idempotent viaINSERT OR IGNOREontransaction_tags; a single-rule apply pushes date/type/category/account conditions into SQL as a pre-filter only, with the shared matcher still making the final per-row decision, and reportsscanned/truncatedagainst a 20,000-row scan cap. - Transaction create in both runtimes applies
auto_applyrules to the new row after the balance batch commits, fail-soft: a tagging error can never fail or roll back a transaction the user successfully saved. - New
Tagspage (features/Tags.tsx, registered inrouter.tsx,PageName, and the sidebar's Analytics group) with tag CRUD, per-tag totals for the global focus period, a monthly income/expense/transfer chart, a category breakdown, and a rule editor with dry-run preview and apply-to-existing.#transactions?tag=<id>deep-links into a filtered transactions list, adopted onhashchangeas well as mount since pages stay mounted once visited. The link's source affordance is a "View" action on the tag chips rendered on the Transactions page itself, so a tag is a way into its own filtered list rather than only a label. - Destructive and backup manifests updated for the new table:
tag_rulesis listed beforetagsin the Worker's profile-cleanup and backupPROFILE_TABLES(FK ontag_id), included in Worker export/restore withtag_idremapped through the restore's tag map and validated against the backup's tag ids, and added to IndexedDBclearProfileData,clearAllData, export/import, and the backup validator's optional/profile-scoped array lists. - Bulk tag/untag endpoint
POST /api/tags/:id/transactions({ transactionIds, mode: 'add' | 'remove' }) in both runtimes, powering the Transactions selection-bar Tag action (Add/Remove toggle, multi-select chips, inline tag creation). Additive — adding leaves a row's other tags intact (unlike the whole-setPUT /api/transactions/:id/tags), andaddis idempotent viaINSERT OR IGNORE. Transaction ownership is validated against the active profile before linking, sincelinkTransactionsToTagis not itself profile-scoped (its rule-apply caller passes an already-scoped id list).TAG_RULE_SCAN_LIMITmoved intoshared/tagRules.tsso the Worker's SQLLIMITand the IndexedDB runtime's in-memory scan cap agree; the local scan now orders newest-first and reports realscanned/truncated. - Saved import sources ("Connected Sources") — a reusable Google-Sheet link with its column mapping, category types and schedule. Worker migration
0020_import_sources.sqlplusroutes/import-sources.ts; IndexedDB gets the mirror store andhandlers/importSources.ts. The column mapping is persisted BY HEADER NAME rather than column index, resolved back to indices at fetch time (shared/importMapping.ts), so a source survives the sheet owner reordering columns. - Daily cron sheet sync (
worker/src/import-sync.ts), wired into the Worker'sscheduledhandler on the0 8 * * *trigger. Eachschedule='daily'source is fetched server-side and run through the SHAREDexecuteImportwith a freshimportId, so the execute-side dedup lands only genuinely new rows and previously imported transactions are never disturbed. Best-effort per source: one unreachable sheet cannot stop the rest. Public sheets only — no credentials are stored. shared/importNumber.ts— one number parser for both runtimes, replacing the divergent hand-rolled copies. A single.or,is always the decimal separator (never thousands grouping); with both present the last one wins; grouping is validated strictly, so1,2,3and12 34stay rejected. Values are rounded to two decimals, and the result carries flags (ambiguous-separator,rounded) that the caller turns into a per-row warning. Theroundedflag fires only when the value actually moved half a cent, so float residue does not flag hundreds of clean rows.shared/importCsv.ts— a single RFC 4180 scanner that tracks quote state across newlines, replacing two hand-rolled parsers that split into lines first. Both dropped any row containing a quoted line break and replaced it with shifted junk rows, silently. Also handles the""escape and strips a leading BOM, which would otherwise ride along inside the first header and break a saved header→column mapping.shared/importRowChecks.tsandshared/importRowLabel.ts— row-level validation and the human label used in rejections and warnings, shared so the two runtimes cannot diverge on which rows import.- Theme resolution split into
applyTheme()(paints, does not persist) andsetTheme()(persists), withhasExplicitChoice()deciding whether the OS preference is followed. Previously the firstprefers-color-schemechange wrote a preference and the app stopped following the OS from then on. core/hashRoute.tscentralizes hash→page resolution with explicit aliases and non-page routes, so an unknown hash renders a 404 page instead of leaving the previous page mounted.- Loading skeletons for the Transactions, Dashboard and Budgets pages, replacing the bare word "Loading". The app-wide
.sr-onlyclass the status roles depend on was missing and is now defined. - Tests for the daily sheet sync (
worker/test/import-sync.test.ts) and for saved-source CRUD in both runtimes. The cron test pins the schedule string againstwrangler.jsoncper environment — the coupling that would otherwise let a schedule edit switch the sync off with nothing failing — plus dedup across runs, header-name remapping, skip-without-syncing on a lost column, and per-profile isolation.
Changed
- Account and Settings currency selectors now share one complete currency list. Currency inputs are normalized to uppercase three-letter codes instead of being limited by the old six-code frontend validation list.
Fixed
- Local transaction lists now resolve
tagsfromtag_idsagainst thetagsstore rather than trusting each row's denormalized copy, so renaming or recoloring a tag is reflected everywhere without a data migration;tagsUpdate/tagsDeletealso write through to the stored copies, and deleting a tag drops its rules so it cannot keep auto-tagging. - Tag-rule apply/preview no longer exceed D1's ~100 bound-variable limit: the "already tagged"
COUNTchunked its id IN-list at 100, so together withtag_idit bound 101 variables and returned 500 whenever a rule matched ≥100 rows (the "apply to all previous" case). The link helper and the preview loop now chunk at 90; a 105-row apply regression-tests it. - The single-rule date pushdown and the summary date window now compare
substr(date, 1, 10)instead of the rawdatecolumn, matching the shared matcher's day-slice — so a transaction whose storeddatecarries a time component is no longer dropped from a same-daydateToin the Worker while the IndexedDB runtime keeps it. - Tags page layout and affordances (no change to matching, storage or the API). Selection is stated rather than implied — a left rail, tinted surface and focus ring on the selected card, a context bar naming the tag in its own colour, and "Rules for " on the rules card; a lone tag selects itself, since leaving it unselected hid the rules behind a click nobody knew to make. The rule count moved out of the card's main button into its own button that selects the tag and scrolls to its rules ("Add rule" when there are none) — nested inside, it could not be clicked on its own. The rule editor's
repeat(auto-fit, minmax(230px, 1fr))packed ten unrelated fields into four columns on a wide screen; it is now a capped single column in four labelled sections. Multi-rule OR is stated on screen, and#transactions?tag=<id>appends&period=allwhen the tag has nothing in the focus period, so the link cannot land on an empty table that reads as a broken filter. - Tags page: the detail chart and category breakdown refetch after "apply to existing"; an open rule draft resets when the selected tag changes (it no longer silently retargets the rule to the newly-selected tag); an in-flight preview can no longer overwrite a newer edit; the rule editor's category/account chips are scoped to the active profile; and the local
PUT /api/tags/rules/:idreturns{ ok }to match the Worker and the client type. - Destructive operations now use complete, child-first cleanup manifests. Worker/D1 executes profile cleanup atomically with
DB.batch, removes receipt objects from R2, and includes account history, transaction-tag links, loan rate/prepayment children, mappings, import logs, and every profile-owned feature table. IndexedDB uses one multi-store transaction and deletes balance history by the target account IDs.Reset Alltargets every profile owned by the signed-in user while preserving the profile records; client-only demo reseeding is the only action that replaces profiles. Account deletion is enabled with typed confirmation in production and removes user-scoped reports, error logs, reminders, reset tokens, and all profile data. - Category reset preserves canonical default category IDs where possible, updates their metadata, detaches nullable references to removed custom categories, deletes dependent budgets that require a category, and reseeds the same default set in both runtimes. Regression tests cover cross-profile survival, all supported stores/tables, R2 deletion, category referential integrity, account deletion, and D1 rollback on an injected failure.
- Account starting/current-balance fields are locale-safe text inputs: the raw value is preserved while typing so the caret does not jump, and submission accepts either comma or dot decimals while rejecting ambiguous thousands-separated values.
- Manual account creation and import-created accounts now use the configured local currency in both the IndexedDB/serverless and Cloudflare Worker paths. Missing or malformed currency preferences fall back to EUR; currency-less imported transactions use the same fallback so their account and ledger currency cannot diverge. Worker account/settings defaults were aligned to EUR.
- Subscription catalogue custom prices now have separate draft and committed state: typing preserves raw comma/dot input and caret position, the row checkmark validates and visibly commits the normalized price/total, and batch Add validates and commits any remaining drafts. Invalid, zero, or ambiguous values stay highlighted and never reach
/api/bills; component tests cover checkmark commit, API payload, malformed input, and caret preservation. - Bill and Housing modal headers now share the compact
OrbitalAccent, replacing their straight header rule with the branded orbit. Their sharedToggleFieldkeeps Autopay as a borderless title/subtitle and switch row with stable narrow-modal layout andaria-labelledby/aria-describedbywiring. - Bill mutations now include
autopay; IndexedDB create/update responses normalize it to a boolean, and Worker/D1 adds and persists the missingbills.autopaycolumn. Worker partial updates preserve unrelated bill fields. Regression tests cover the form payload plus local and Worker create/list/update/get round trips. - Account recent-activity amounts now use
accountActivityPresentation()for explicit income, expense, and transfer states. Transfers usevar(--transfer)and a neutral±prefix rather than falling through to the green income presentation. - Import no longer rejects a row for having no description, and no longer rejects a row for having no date — a dateless row imports dated today and says so. The blank-description rejection existed only in the IndexedDB runtime, so the same sheet imported cleanly in cloud mode while silently losing hundreds of rows locally.
- Rejected-row messages identify the row by its date and description instead of a bare index, and a self-transfer names the account both legs resolved to and the column each came from. The preview surfaces the per-row warnings (rounded amount, guessed date) alongside the rejections.
- The import preview's row numbers now match the spreadsheet's own row numbers (
sourceRowNumber), instead of being one off. - The daily sheet sync records
rows_skipped_invalidandrows_with_warningsin the session it writes to Recent Imports, and no longer stampslast_synced_atwhenexecuteImportrejected the batch. Nothing is watching a cron run, so a guessed date or a rounded amount had no way to reach the user at all. - E2E: the transaction-create spec pinned a hardcoded future date that the calendar eventually overtook, failing the suite on a date rather than a change.
[5.8.0] — 2026-07-21
Added
- Delete-a-recent-import (undo a batch). Serverless now stamps
import_idon inserted transactions (the worker already did); a newDELETE /api/import-logs/:idon both runtimes deletes the batch's transactions byimport_id, recomputes account balances, and drops the log row. Imports predating batch stamping (noimport_id) delete 0 transactions and just clear the log entry. Frontend: a confirm-guarded "Delete import" button on each Recent Imports entry (toast feedback). (#369) new_accountsin the import dry-run response — serverlessdetectNewAccounts, workernewAccts— surfaced as a "New accounts to create" list in the preview (the account-typed counterpart to the existing new-categories list, which excludes account values). (#368)
Changed
- Import dedup is multiplicity-aware. A row is skipped only when it matches a transaction that already existed before this import, consuming one matching amount per row from a per-key multiset; identical rows within a single import all import instead of collapsing to one. Bank/1money rows carry a date but no time, so genuine same-day repeats (multiple
UPLATA NAKNADEfees, repeated same-amount top-ups) were being silently dropped and balances understated. A re-import still dedupes (existing copies consume the incoming ones one-for-one). Preview: within-batch identical rows are "potential duplicates", selected and imported by default (bank-file uploads, which dedupe on a per-second timestamp, stay deselected), each showing the counterpart row it matches (date · description · amount/= row N). Applied to the serverless (IndexedDB) and Cloudflare worker execute paths +detectDuplicates; the Express backend is intentionally out of scope (see ROADMAP). (#368)
Fixed
- Serverless import now seeds its account map with all existing accounts by name (matching the worker/Express) and falls back to it for the source (means_of_payment) leg of any transaction type — so a transfer whose destination names an existing account resolves both legs instead of one-siding (
transfer_account_idnull) and draining the source. Also adds adetectNewAccountspreview list. (#368) - Account-map keys are trimmed as well as lowercased on both creation/seed and per-row resolution (worker
loadAccountskey + created account name, serverlessnormalizeKeys), so stray whitespace in a category/account value (e.g.Revolutfrom a sheet cell) no longer stores the account underrevolutwhile the trimmed lookuprevolutmisses it. On the worker — which resolves the two legs independently — that mismatch dropped only the destination and showedErste Current → —on a fresh import; gviz strips trailing whitespace, so the sheet looked clean. (#370) fromToLabelsnow renders an account-to-account transfer's destination from the resolvedtransfer_account_idaccount name. The destination of such a transfer lives intransfer_account_id(not a category), socategory_nameis null and the "to" collapsed to—even though the leg was linked and the balance correct.TransactionTablebuilds an id→name map from the accounts it is now passed and hands the resolved from/to names tofromToLabels(falling back to the storedmeans_of_payment/categorytext). Display-only; no data change. (#372)
[5.7.1] — 2026-07-17
Fixed
- SubscriptionCatalogModal: the price ✓ was a decorative
aria-hiddenselected-indicator with no handler — clicking it bubbled to the row toggle and deselected the item, discarding the typed price (re-selecting reset to the catalog default). Now a real apply button:stopPropagation, normalize the raw text (,→., empty → catalog default) and keep the item selected; Enter in the field applies too..checkis inert (pointer-events:none) until.tok.on. The submitted amount always flowed throughpriceOf()at read time, so this is a display/UX fix, not a data fix. - Empty-state create button was left-aligned:
.empty-stateusedtext-align:center, which centers text but not thedisplay:flexbutton. Now a centered flex column across Goals/Housing/Retirement/Budgets/Accounts/Categories (Bills already had it; Dashboard has no CTA). Loans has no empty-state styling at all — separate follow-up. - Quick Add categories (⌘K command bar + Guided Orbit) were loaded once at app mount and never refreshed, so after a profile switch the picker showed the previous profile's categories, the natural-language parser matched foreign ones, and an entry could be saved with a
category_idnot in the active profile (silently failing to add) until a full reload. A sharedreloadQuickAddCategories()now runs on profile switch (profileVersion) + sign-in and on each quick-add open (category CRUD refetches locally without bumpingprofileVersion, so the open-trigger is needed alongside the switch-trigger). Ordering is safe:selectProfilewritescurrentProfileIdbefore bumping the version, and the profile id is read from localStorage at request time. - Guided Orbit (the floating + quick-add) shows on desktop but had no title and forced clicking the on-screen keypad: added an "Add transaction" heading and physical-keyboard entry while open — digits /
./ Backspace / Enter (advance, or submit on the confirm step) / Escape (close), with a modifier-key guard so⌘K/Ctrl+digitshortcuts aren't hijacked. The confirm step's text/date inputs keep their own typing; touch users keep the keypad.
[5.7.0] — 2026-07-17
Added
- Bank import adapters for N26, Wise (per-currency balance statement), ING NL, Sparkasse (CSV-CAMT), DKB (post-2023 + legacy), and a YNAB-format CSV bridge (
Date,Payee,[Category,]Memo,Outflow,Inflow/ signedAmount) — the de-facto interchange format, so bank2ynab (MIT, ~145 banks) output imports directly. All client-side (statements never leave the browser). Adapters detect by header content viaindexHeader(vintage-drift-proof, resolves columns by name); filename hints are word-bounded / full-shape so lookalikes don't false-positive (jan26.csv≠ N26,statement_2026_jan_…≠ Wise). Sharedparse.tsgainedindexHeader,decodeTextSniffed(UTF-8→cp1252 fallback for Sparkasse/DKB legacy), andnormalizeDatesupport forYYYYMMDD/DD-MM-YYYY/DD.MM.YY(century pivot) — strictly day-first with a plausibility gate so a stray number in a date column stays invalid; the YNAB adapter decides date order once per file (a mixed US export can't import under two conventions) and tolerates currency symbols / accounting negatives. Synthetic-fixture tests per adapter + a registry cross-detection guard. Deferred: Croatian RBA/ZABA/Karlovačka (await real exports), a config-driven long-tail adapter, PDF statements. - Reusable
Pillcomponent (glass capsule + satellite dot), used for the importer's supported-bank/format chips. Onboarding welcome-step "Use local-only" switch (server mode): honest confirm about any existing local workspace, then suppress the demo seed, clear the onboarding flag + stale server profile-selection keys, flip storage to serverless, and reload into a pristine local wizard.
Changed
- Register → auto sign-in:
LoginScreen/LoginModalobtain a fresh Turnstile token afterregisterresolves and log in with the just-entered credentials, landing in the app (a pristine profile opens onboarding). Branded "signing you in" transition; on failure (existing email / captcha) a colored success-tinted notice drops to manual sign-in, preserving the worker's anti-enumeration (login is not gated onemail_verified).LoginModaldismissal can't reload the page out from under the user. Fixed staleapi.tsJSDoc claiming register/reset set a session cookie. - Onboarding import step: the wizard footer now carries the flow's true action per sub-step — mapping → "Continue to preview", preview → live "Import selected (N)" (disabled at 0) with a "Don't import" ghost escape — and Back walks the import sub-steps in reverse.
ImportMappingStep/ImportPreviewStephide their in-body action rows in the embedded (wizard) context only; the standalone Import page is unchanged. Dropzones gained a files-only drag-over highlight and an inlineOrbitSpinnerwhile reading, with anextPaint()yield (raced against a timeout so a hidden tab can't hang) so the spinner paints before the synchronousXLSX.read. Removed the internal-sounding "works in serverless mode — no CORS" copy from the paste tab (parsing is client-side in both modes). - Confirmation UX unified:
ConfirmButtonnow opens the shared centeredConfirmDialog(was an inline Confirm?/Yes/No that overflowed narrow cards) across 11 call sites, and the directshowConfirmdelete callers (Transactions, RecurringSection) match;confirmStore.showConfirmgained{confirmText, cancelText, danger}→ a red confirm for destructive actions (role="alertdialog"/aria-modal, icon triggers gainedaria-label). Autopay control → brandedToggle(was an unstyled native checkbox — Bills'.toggleSwitchclass wasn't even defined) in the bill and housing forms;Togglegained adata-test-idpassthrough.BillCalendarday popover uses a solid--surfacebackground (was a 22%-transparent glass that let day numbers bleed through). The import preview's collapsible rules editor is spaced off the action bar and table. NewconfirmStoreunit tests;housing/goals-crudspecs updated to the modal flow.
Fixed
- Deploy-update pipeline hardened end to end after the v5.6.0/v5.6.1 transition storm (multiple reloads, "Update needed" panel, version label reading 5.6.0 while 5.6.1 code ran — full audit in
docs/deploy-update-pipeline.md). Root causes and fixes: (1) the SW precachedindex.htmland served it for all navigations, so a version-mismatch reload was re-served the OLD shell by the OLD worker whose chunks were already deleted server-side —index.htmlis no longer precached,navigateFallbackis off, and navigations are NetworkFirst (finance-manager-pages-v1, 4 s offline-fallback timeout), making a plain reload always land on the current build when online; (2) every auto-reload path (appVersion,bootRecovery) now refreshes the service worker first —activateUpdatedServiceWorker()triggersregistration.update()and waits (bounded 4 s phases) for the skipWaiting+clientsClaim takeover — so one reload suffices; (3) reloads are hard-bounded: one per server sha plus a rolling cap of 3 per 10 minutes across shas (tc-version-reload-times), and the pre-boot watchdog moved from once-per-SESSION to a 2-minute cooldown so the second release of the day auto-recovers instead of landing on the panel; (4)APP_VERSIONnow usesgit describe --tagswithout--abbrev=0, so a non-tag prod build (workflow_dispatch from main, Workers Builds) stamps5.6.0-2-gf6ba930instead of impersonating the previous release — the source of the lying label; (5) the displayed version (login footer, Settings About, crash modal) comes from a reconcileddisplayVersion()signal: whenversion.jsonreports the same sha under a different version string the network string wins, and while an update is pending Settings shows "vNEW available, loads on your next navigation" (serverVersion()); (6) the per-release SW unregister inindex.html(keyed onpackage.jsonversion — a third, divergent version source) became a one-timeSW_CLEANUP_EPOCHmigration that re-registers after unregistering, removing the register/unregister race on every release's first load; (7) the js/css runtime cache maxAge went from 5 minutes to 7 days — online loads are NetworkFirst anyway, and 5 minutes made offline boots fail for any tab older than one poll. Decision logic covered by new unit tests (appVersion.test.ts,bootRecovery.test.ts, 25 cases); the SW handoff itself has documented manual verification steps.
[5.6.1] — 2026-07-17
Fixed
- Subscription scan detected nothing in SERVER (worker/self-hosted) mode — the second instance of the 5.6.0 onboarding-trigger bug:
SubscriptionScanfetched/api/transactionsexpecting a bare array, but the server returns the paginated envelope{ rows, total, limit, offset }; the defensiveArray.isArrayfallback silently scanned an empty list, so every scan (Bills, Import post-import prompt, onboarding wizard step — one shared component) reported "No known subscriptions found". Serverless returns bare arrays, which is why demo-mode testing looked fine. Fixed with a sharedlistRowsnormalizer incore/api.ts(bare array OR{rows}envelope → array; unknown →[]), now the required idiom for anyapiGetof a list endpoint. Covered by unit tests andsubscription-scan-server.spec.ts— a server-mode e2e that seeds recurring charges via the API, pins the envelope shape as a precondition, and asserts detections render (verified to fail against the unfixed code). Detection quality itself was validated against a real 6.5-month Revolut statement: 8 subscriptions found (harness kept out of the repo — personal data).
[5.6.0] — 2026-07-16
Added
- OrbitalDivider — the brand's section separator: a thin orbit arc spanning the row with small planets resting on it (one warm, two muted, placed on the curve), the section title docked left like a station label, and an actions slot on the right. The arc draws itself in and planets drift into place when scrolled into view (rect-check based — no IntersectionObserver/rAF, so it also behaves in throttled tabs; disabled under prefers-reduced-motion). Ships with OrbitalAction, a glass pill button whose leading planet-dot orbits on hover (primary variant uses the warm accent instead of solid blue). First applied across the Budgets page; intended to roll out app-wide.
- SectionRail — a fixed vertical orbit on the right edge (desktop ≥1280px) listing the page's sections as small planets: the one nearest the viewport focus lights up with a slowly rotating dashed orbit ring, hovering shows a label chip, clicking glides to the section. Anchors are OrbitalDivider ids; sampled on Budgets.
Added
- OrbitalToggle — the brand's celestial switch: the knob is the sun riding an orbit-arc track by day; flipping it slides it across into a star-flecked night where it becomes a planet with a slowly turning dashed orbit ring. Swapped in for the light/dark theme toggle in Settings (the plain branded Toggle stays for ordinary settings).
Changed
- Primary buttons across the app (Add Loan, Set Budget, Add Holding, Add Bill, Mark Paid, Add Transaction, Import, …) now use the Settings brand recipe — azure glass tint, azure text, mixed border and glow — instead of the old solid blue fill (12 page stylesheets, appended overrides).
- Calculators joined the orbital design: Compound Interest's Detailed Projection / Scenario Comparison / Scenario Details and Emergency Fund's coverage sections now use OrbitalDividers above their cards; Emergency Fund's coverage chart gained a proper section title ("Coverage by Fund Level" with an explainer tooltip), and the pointless Show/Hide Details toggle on Coverage Levels was removed — the details always show.
- Analytics' Savings Rate instrument: the % and its label no longer sit crammed side by side in a 100px circle (the label wrapped) — it is now a proper hero stat: large value, "Savings Rate" subtitle beneath, and a period note ("across 2026").
- Analytics got the full orbital treatment: every instrument's title moved out of its card header into an OrbitalDivider above the card (dynamic year/period rides in the divider's meta; the Top Categories explainer in its info tooltip), header rows keep their controls right-aligned, the two-column row wraps each card in a plain column so dividers sit on the page background, a 9-stop SectionRail jumps between sections, and the page subtitle became an InfoTip next to the title.
- Divider placement corrected wherever a divider had landed inside a glass card instead of above it (Goals progress/projections, Housing subscription tracker, Retirement projections, Portfolio holdings/allocation — Portfolio's card visuals moved onto the inner surfaces). Verified by walking every divider's ancestor chain on all ten pages: none sit inside a carded container.
- OrbitalDividers rolled out across the app: Goals (Progress, Projections), Loans (Overview), Portfolio (Holdings, Allocation), Retirement (Projections, Goals), Bills (Unpaid/Paid with live counts in the divider's meta slot), Housing (Subscription Tracker with the monthly total as meta), Accounts (Net Worth Map), and Counterparties (Balance Meridian, By Counterparty). The divider gained an optional
metanote (count / total after the label). Analytics is the deliberate holdout — its section titles live inside card headers together with live controls (year pickers, compare toggles, export buttons), so its migration (titles + controls into divider action slots, plus a SectionRail) is a focused follow-up. - Dashboard period stepping polished further: the two dashboard fetches now commit their signals together in one
batch()(a single visual wave instead of widgets repainting as each fetch lands), Chart.js in-place updates skip the update tween (update('none')— rapid stepping reads as calm data changes instead of every chart re-animating), and the OverviewDeck's three internal resources (heatmap, budget radar, portfolio) read.latestso profile/year changes can't re-trigger the page-level Suspense. - Stepping the focus period no longer flashes/reloads the whole view. Two causes fixed: (1) resource-backed pages (Budgets, Bills, Accounts, Categories, Analytics, Bill calendar) read
resource.latestinstead ofresource(), so a refetch keeps the previous data on screen rather than re-triggering the page-level Suspense fallback; (2) the shared Chart.js wrapper now updates the live chart in place (chart.update()) instead of destroy + async re-create, so Dashboard's charts transition smoothly between periods instead of blanking and re-animating from zero. - Budgets: section headers are now OrbitalDividers — the bulk allocation tools and "Add Allocation" dock in the Category Allocations divider, "Add Category" docks in the Categories divider (orbital pill style replaces the solid blue buttons), and the Budget Forecast card lost its duplicate inner title. Sections breathe again (the forecast card no longer sits glued to the chart above), the categories gallery shows ~3–4 rows before scrolling (was ~2), and the "Zero-based budgeting" subtitle moved into an info tooltip next to the page title (it wrapped badly on phones).
Added — Onboarding
- First-run onboarding wizard (
components/onboarding/), a six-step orbital flow shown once to pristine profiles: welcome → name your space (rename the default profile / create one, pick base currency) → first account(s) → bring your data (the real import flow, embedded) → auto-detected subscriptions → orbit-complete celebration. Full-screen night-sky overlay with animated dotted orbit rings + drifting token satellites, a fill-as-you-go progress ring, and a done-state ring that fills to 100% — all continuous motion gated behindprefers-reduced-motion. Every step is skippable (are-you-sure confirms where data would be lost, incl. Escape), and a relaunched wizard recognizes existing accounts instead of pitching "your first account". - Onboarding trigger + memory (
core/onboardingStore.ts): auto-opens only when the profile has zero accounts AND zero transactions AND zero bills AND no recorded decision. Finishing/skipping stampsfinance_onboardingin localStorage AND mirrors the decision into the per-profile settings KV (PUT /api/settings), so in server mode a completion/skip on one device is respected everywhere (the trigger check reads the KV and caches it locally). Relaunch from Settings → About → "Run setup wizard" or What's New → the tour menu. - Subscription auto-detection (
features/subscriptionDetection.ts, pure + 30 table-driven tests): scans transactions for recurring charges matching the catalogue/brand registry (Netflix, Spotify, Claude, 40+), with token matching + a bounded typo budget, cadence inference from the median charge gap (weekly/biweekly/monthly/yearly), catalogue-plan matching (an 18.00 charge → Claude Pro), a dominant-amount-cluster pass that keeps a real Prime cadence detectable amid Amazon shopping, and a guard that only proposes ambiguous mega-retailer tokens with a stable recurring amount. Reviewed viaSubscriptionScan(brand icons, editable price/period, per-row selection) — surfaced in the wizard, Bills → Subscriptions → "Scan transactions", and a post-import prompt on the Import page. AccountSelect— account dropdown with in-place "New account…" creation, used by the bank-statement import's per-file target picker (Import page + wizard) so a multi-bank import can create its target accounts without leaving the flow.- Branded transactional email system (
worker/src/emailTemplates.ts): every mail (welcome, account-exists, password reset, budget alert, spending report, upcoming-bills reminder, support ack, test) rendered by pure functions returning{ subject, html, text }on a shared orbital shell — hosted logo + a small looping orbit GIF ornament (frontend/public/email/orbit.gif), bulletproof 600px table layout, dark-onlycolor-scheme, hidden preheader, and a footer with app/about/GitHub/Terms/Privacy/Contact links + unsubscribe. Plain-text twins now ship with every Resend send. Mail assets load from the SENDING environment's app origin (dev mails never depend on a prod release). Reminder amounts render in the profile's display currency instead of hardcoded dollars. - Orbital loading system (
components/OrbitSpinner.tsx): a binary planet-pair circling a luminous core (warm satellite on the outer ring), plusOrbitBootScreen— the full-screen branded boot gate (hero-sized spinner + wordmark) that replaces the bare "Loading…". Used for the boot gate, the shell Suspense fallback, import overlays, and the subscription scan.
Changed — Onboarding / Import
- Import page decomposed into reusable modules (
features/import/): a headlesscreateImportFlowcontroller holds all pipeline state + actions, andImportDataEntry/ImportMappingStep/ImportPreviewStep/BankRulesEditorrender it — shared verbatim by the Import page and the onboarding wizard. Behavior unchanged on the page. - Import preview rebuilt as a stacked command panel: stats (total/selected/duplicates) + action buttons on the command row, a compact "Backfill budgets from spending" checkbox (full explanation moved into an InfoTip) on an options row, and duplicate/dry-run/new-category notices stacked below — replacing the single cramped flex row.
- Re-import honesty: the preview dry-run now reports how many rows the dedup pass will skip ("Everything here was already imported"), the result message names already-imported counts in both storage modes, and the import log records total duplicates avoided — a repeat import no longer reads as a bare "Imported 0".
- Brand-new Google sign-ins now receive the welcome email (previously only email/password registrations did);
resolveGoogleUserreturns acreatedflag so the OAuth callback sends it best-effort. - Scheduled reminder emails (budget alerts, spending reports, upcoming bills) now fire in PRODUCTION: the
triggers.cronsblock was added toworkerenv.prod — previously it existed only in env.dev, so prod never sent them. The upcoming-bills reminder (daily cron) was ported from the legacy Node backend, with its ownemail_bills_reminderstoggle, Settings UI toggle + preview button, and the same plan/quota/dedup gating. - Login screen: inline email-format validation (the field turns red with "That doesn't look like a valid email address" once touched, rejecting malformed input before it burns a captcha token) and a "Complete the verification above to continue" hint explaining the disabled submit while Turnstile is pending.
Fixed — Onboarding / charts / CSP
- CategoryOrbits (spending/allocation rings on Portfolio, Budgets, Analytics, Loans) rendered as a broken donut at both extremes: sparse charts (2–3 rows) piled every arc onto one side from 12 o'clock with a near-full sweep's caps colliding into a notch, and dense charts (7–9 rows on a fixed 13px step) marched the innermost ring to radius 0 and the core to a negative radius. Ring spacing is now adaptive (fits between the outer radius and a 46px inner minimum, strokes slimming to match), the core radius is clamped, launch angles stagger evenly so arcs interleave like orbits, tiny shares get a pixel floor, and near-full sweeps get a cap-collision clamp.
- Bank-statement drops no longer fail silently: file analysis ran inside a void'ed
Promise.all, so one rejected read vanished and only a second drop "worked". Now snapshots the file list synchronously, shows the loading overlay while parsing, usesallSettledso one bad file can't sink the rest, and surfaces per-file read errors. - Onboarding never auto-opened in SERVER (self-hosted / worker) mode — the pristine-check read
/api/transactionsas a bare array, but the server returns a paginated envelope{ rows, total, limit, offset }, soArray.isArray(transactions)was always false and the wizard never triggered for a real email/Google signup.shouldOfferOnboardingnow uses a shape-tolerantcollectionIsEmpty(handles arrays AND{ rows }/{ total }), covered by unit tests and a new server-mode e2e (onboarding-server.spec.ts) that logs in and asserts a pristine profile opens the wizard. Serverless mode was unaffected (it returns bare arrays), which is why the earlier serverless-only tests passed. - The onboarding account step recognizes accounts already on the profile when the wizard is relaunched (previously a five-account user still saw "Create your first account" and "Continue without an account").
- Zod's JIT-capability probe (
new Function('')) — asecuritypolicyviolationunder the app's CSP — is disabled viaz.config({ jitless: true }), imported first by each schema module (core/zodConfig.ts; the probe fires at schema-definition time and, verified against the production bundle, an entry-level import is too late under Rollup chunking). Parsing behavior is identical; the browser used the interpreter path anyway. - The app icon (
frontend/public/icon-192.png) was a top-left crop of the logo — regenerated fromicon-192.svgas the full mark, fixing both the email masthead and the PWA icon. - Boot/Suspense theme flash removed:
frontend/public/theme-init.js(external, CSP-safe) stamps the saved theme before first paint. - The Node self-hosted backend stubs
GET /api/billing/status(a worker-only Stripe feature) so the client's boot-time plan probe stops logging a 404. - Flaky e2e: the Goals "progress percentage" reactive test asserted an absolute card count (
initialCards + 1) that raced against parallel goal specs on the shared backend (~50% failure on main) — now waits for the uniquely-named goal card, matching its sibling test.
[5.5.0] — 2026-07-15
Added
- Shareable demo links (
?demo=high|mid|low): a link switches the app into client-only demo mode and seeds a sample profile before render (the entry applies it before<App/>reads the storage mode), then strips the?demo=query from the address bar once applied.
Changed
- Self-hosted the web fonts (Inter, Fraunces, JetBrains Mono) via
@fontsource(latin + latin-ext subsets) and removed the render-blocking cross-origin Google Fonts<link>+ preconnects. Removes the third-party dependency and its CSP violations, and lets headings render offline. Fonts are content-hashed into/assetsand precached by the service worker. - The dashboard "Upcoming Bills" widget now shows each bill's real icon instead of a generic clock: known subscriptions/brands use their brand mark, other bills use their category icon, and the clock remains only as a last-resort fallback.
- The Analytics spending heatmap now draws noticeably larger cells (and scales its height to match) so the year reads clearly, instead of the previous small/zoomed-out grid.
Fixed
- Eliminated the "white screen after a deploy" failure class (a stale service worker serving an old
index.html+ the host returningindex.html, 200text/html, for deleted hashed chunks →Failed to load module scriptMIME errors). A front Worker (frontend/server/assets-worker.ts, assetsnot_found_handling: "none") now returns a real 404 for a missing/assets/*and falls back toindex.htmlonly for navigations;_headerscache tiers make hashed assetsimmutableandindex.html/sw.js/version.jsonno-cache; the workbox SW gainedcleanupOutdatedCaches,skipWaiting/clientsClaim, a navigate-fallback denylist for/assets,/api, andversion.json, 200-only caching, and fresh cache names; aversion.jsonpoller reloads onto a new build at the next navigation (toast fallback); and a pre-JS boot watchdog inindex.htmlplus avite:preloadError/chunk-error handler (core/bootRecovery.ts) recover when the bundle itself can't load. The crash modal can now clear the service worker + Cache Storage without wiping user data. - Removed
upgrade-insecure-requestsfrom the report-only CSP (browsers ignore it there and log a warning); it remains in the enforcing policy. Dropped the Google Fonts origins from the policy now that fonts are self-hosted. (Known remaining report-only finding, left visible for a future CSP-enforce decision: a vendored library tripsunsafe-evalvia a benignFunction("return this")global-object probe.) - CI: dev deploys now show the real build version instead of a placeholder.
- The Apple subscription icon was a solid black mark on a near-transparent chip, so it vanished in dark mode; it now sits on Apple's light chip and stays visible in both themes.
- Modals are now responsive on small and short screens: overlays scroll vertically and top-align tall dialogs (with a consistent 16px margin) so nothing is clipped off the top or bottom, and modal containers are capped at
calc(100vw - 2rem)/calc(100dvh - 2rem)withbox-sizing: border-boxso they never force horizontal scrolling. Applied consistently across the feature-page modals (Add Transaction, Add Bill/Subscription, Accounts, Goals, Budgets, Portfolio, Housing, Loans, Retirement, Categories) and the shared modal components. Verified headlessly at 390×844 (phone) and 900×420 (landscape).
[5.3.0] - 2026-07-13
Changed
- The dashboard "Dashboard Views" button is now a compact "Views" button with a properly sized eye icon (the cog rendered oversized because the icon had no explicit dimensions) and a tooltip explaining it shows/hides widgets; dashboard widget cards (Budget Alerts, Savings Rate) now keep the same vertical spacing as the other cards instead of gluing to whatever follows.
- The dashboard header is now two rows: the title on the left with the view actions (Dashboard Views, Refresh) anchored right, and all period controls (month navigator + quick-select) together on their own row below — no more cramming everything onto one line.
- The dashboard period selector is now a compact segmented control (Today / Week / Month / Quarter / Year / 7D / 30D / 90D / All) that fits on one row — about half the header on desktop — and scrolls horizontally on phones instead of wrapping into multiple rows. Full period names show as tooltips.
Fixed
- Budgets: changing an existing category allocation failed with a 400 ("Budget already exists"). Allocating is now an upsert — re-allocating a category for the same month updates the amount — and the per-category action stays available as a Change button (pre-filled with the current amount) once a budget is set, instead of disappearing.
- Budgets: the 6-month forecast under-projected any month that fell in the next year — the inflation adjustment was derived from the month-of-year alone, so a forecast crossing a year boundary (e.g. December → February) computed a negative month offset and applied no inflation. It now accounts for the year.
- Sign-in autofill: the login form inputs regained
name/idattributes and use theusername/current-passwordautocomplete tokens, so Android Chrome and password managers recognize and autofill saved credentials again (the redesign had dropped these; iOS still worked because it fills fromautocompletealone). - The Auto-Categorize dialog now follows the app theme; it previously rendered with a hardcoded white background in dark mode (its dark styles were behind a class that was never applied).
Added
- Preview the real notification emails on demand: Settings → Reminders now has "Preview spending report" and "Preview budget alert" buttons that immediately email you the actual report/alert built from your data (without touching the scheduled sends).
- The Bills calendar now shows small brand icons directly in the day cells for due subscriptions, so you can see what's due at a glance — especially on phones, where the hover tooltips never worked.
- Settings → About now shows which account (email) you are signed in with, or that you're in local mode.
Fixed
-
The Savings Goals doughnut no longer has its bottom edge shaved flat (the ring rendered at exactly the canvas boundary); it now keeps a small margin and is always a full circle.
-
OneDrive gets its own cloud icon instead of the Microsoft four-squares, and five more common services resolve to proper brand icons: Twitch, Adobe (Creative Cloud/Photoshop/Lightroom), Notion, and ChatGPT/OpenAI.
-
The Bills calendar tab failed with "not found" in local/demo mode — the calendar endpoint existed only on the cloud API and is now served locally too.
-
Netflix, Amazon, and Disney+ subscription icons were malformed (Netflix literally rendered the letter "M"); replaced with proper simple marks and audited the whole icon set.
-
The Savings Goals progress chart could grow past its card; it now stays contained.
-
Mobile: transaction summary totals no longer overflow the screen (compact two-column layout), pagination wraps instead of clipping, and the sidebar toggle becomes a back-chevron at the sidebar's top-right when open instead of covering the logo.
-
Storage-mode options renamed to fit the dropdown: "Server (Backend Database)" and "Local (Browser Storage)".
-
Subscriptions: the "Monthly Total" now normalizes each plan to its monthly cost (a yearly plan counts as amount/12, weekly as x52/12) instead of summing raw amounts, and each card shows its real billing period ("/yr", "/wk") instead of always reading like a monthly price. The bill form also offers a Yearly frequency now.
-
Adding a bill or subscription in the local/demo (serverless) mode failed with a validation error — the form sends the same field names as the cloud API (
dueDate), which the local validator did not accept.
Added
- Richer demo data: each example profile now carries a realistic set of subscriptions that scales with income (a lean pair on the low-income profile up to a dozen — streaming, cloud storage, gaming, developer tools — on the high-income one), all using real brand names so the Bills → Subscriptions view shows proper brand icons.
Fixed
-
Profile switching no longer makes a profile vanish from the selector. Switching the active profile could corrupt the in-memory profile list (the previously selected entry was overwritten with the new profile and then deduplicated away), a long-standing annoyance that hit on nearly every switch; the store now replaces instead of merging and never aliases list entries.
-
Demo mode is now resilient to blocked browser storage (strict private browsing / "block all cookies"): the storage-mode setting falls back to an in-session value instead of silently flipping the deployed app into server mode, which made demo sessions fire unauthenticated API calls.
-
Demo (no-account) mode on the hosted app now truly runs offline in the browser. Deployed builds address the API by absolute URL, and the serverless interceptor only recognized relative
/api/*paths — so every call in demo mode bypassed the local IndexedDB, hit the real API without a session (constant 401s), and the local database never initialized. The interceptor now recognizes the deployed URL shape as well; after entering the demo, the app makes zero network calls to the API. -
Guided onboarding tours now navigate to each feature's page and reliably highlight it. They were rebuilt on stable
data-touranchors (instead of the fragile CSS/label selectors that often missed), steps that couldn't be shown without data or extra clicks were removed or re-pointed at always-visible elements, and the walkthrough overlay was hardened against page-navigation timing. -
Mobile: pages no longer render at desktop width and get clipped on phones — the app layout now genuinely shrinks to the viewport (the root container previously refused to shrink below its widest content, ~780px). The menu button no longer covers page titles; the Bills tabs, transaction date-range filters, portfolio holdings, and the Rent-vs-Buy form now fit or scroll properly on small screens.
-
Mobile: opening a dropdown or focusing an input no longer makes iOS Safari zoom/jump the page (form controls now stay at the 16px size iOS requires), which read as the app "crashing" from the Settings chart-export dropdown.
-
Debug logs are now readable on phones (entries stack as cards instead of a fixed five-column table wider than the screen), and "Copy" falls back to a legacy clipboard path or a file download when the clipboard is blocked (iOS).
-
Demo mode: fresh demo data failed the app's own response validation on the accounts, transactions, and categories endpoints (stale
checking/investment/retirementaccount types from before the v4 rename, and seeded rows missing now-required fields), flooding the console with errors and breaking parts of the UI. The seeder now writes schema-complete rows and the serverless read path normalizes legacy rows from existing installs.
Changed
- Public-repo hygiene ahead of open-sourcing: removed operator-specific infrastructure and internal notes from the tree — the
apache/vhost configs, the rootdeploy.sh, and internal planning/postmortem docs that referenced private hostnames, certificate paths, and server directories — and sanitized the remaining path references. Stopped tracking the generated PWA service-worker artifacts (sw.js/sw.js.map), which are rebuilt intodist/at build time. Aligned the root package version and the README badge to 5.2.0. Reverse-proxy and deployment guidance lives indocs/self-hosting.md.
[5.2.0] — 2026-07-01
Security
- Fixed an insecure direct object reference (IDOR) in custom reports. They were held in a shared in-memory map keyed by a guessable id with no ownership check, so one signed-in user could read, edit, or delete another user's report. Custom and saved reports are now persisted in D1 and scoped per user.
- Completed the SheetJS (
xlsx) 0.20.3 security patch on the backend importer (the frontend and worker were patched in 5.1.2), closing the prototype-pollution and ReDoS advisories on server-side Excel parsing. - CORS now fails closed when the allowed origin is unconfigured, instead of reflecting
*with credentials. - Google Sign-In now verifies the token issuer and expiry in addition to the audience.
- Dropped
script-src 'unsafe-inline'from the served production Content-Security-Policy (it is kept only for local Vite HMR in development).
Fixed
- Account balances are now updated atomically with the transaction that changes them, on both the self-host backend and the worker. A failure mid-update can no longer leave a transaction recorded with its balance change half-applied.
- Fixed a crash when more than one profile was selected for a transaction operation (a multi-profile query bound its parameters incorrectly).
- Bulk-deleting a transfer credited only to a destination account now reverses that credit (it was previously skipped, permanently inflating the account).
- Profile names are now unique per user rather than globally, so two users can each have a default "Personal Profile".
- The cross-origin session cookie could be dropped when an API caller passed its own
credentialsoption; it is now always sent. - Money now renders in the user's selected currency across the client PDF reports and dashboard cards (including zero-decimal currencies such as JPY), instead of a hardcoded symbol.
- Transactions page crash caused by a
createMemoTDZ reference in SolidJS. - Missing
swagger-ui-expressandmime-typesbackend dependencies.
Performance
- Import duplicate detection is now O(N+M) instead of O(N·M), and import execution batches all inserts and account-balance updates into a single atomic transaction.
- Budget forecast/history and monthly statistics are computed in a single pass instead of rescanning the transaction list per row.
- The transactions list attaches tags with one batched query instead of one query per row.
- Added indexes on
transactions.account_idandtransfer_account_idfor account-scoped queries.
Changed
- Fixed the API worker deployment (the CI install used
--frozen-lockfileagainst an intentionally unpinned worker), added a pre-migration D1 backup step, made the self-host Docker image buildable again, and added the OWASP baseline security headers to the Apache vhost. - Relicensed the project from MIT to the GNU Affero General Public License v3.0 (AGPL-3.0).
- Vendored the SheetJS (
xlsx) tarball intovendor/and reference it via afile:dependency, so installs no longer depend on the SheetJS CDN being reachable. - The in-app changelog now renders the repository
CHANGELOG.mddirectly (single source of truth) instead of a separate hardcoded copy. - Improved public repo readiness: CODE_OF_CONDUCT, CONTRIBUTING, issue/PR templates
- Cleaned docs/ directory structure with organized specs, postmortems, and archive
- Replaced internal todo.md with public ROADMAP.md
- Added
.env.examplewith documented environment variables
[5.1.2] — 2026-06-30
Security
- Updated SheetJS (
xlsx) to the patched 0.20.3 build in both the worker and the frontend, fixing the known prototype-pollution and ReDoS advisories in spreadsheet (Excel) import.
Changed
- Rewrote the README for the current Cloudflare Worker + D1/R2 architecture (local-first / self-host / managed-cloud), replacing the outdated Express/SQLite description.
[5.1.1] — 2026-06-30
Security
- Sign-up is now rate-limited per email address (not just per IP), curbing unsolicited account creation and email spam.
Fixed
- A reminder email that fails to send is now retried on the next cron run instead of being skipped for that period (the dedup slot is rolled back on a failed send).
[5.1.0] — 2026-06-27
Added
- Account deletion: permanently delete your account and all of its data from Settings → Billing (confirm by typing your account email). Dev = hard delete; production soft-delete to follow; shown on the dev build only for now.
- Optional Cloudflare Turnstile bot protection on the register / login / forgot-password forms (enable by setting
VITE_TURNSTILE_SITE_KEYand the worker secretTURNSTILE_SECRET).
Security
- Per-account login throttle (on top of the per-IP limit) and constant-time password verification, so login no longer reveals whether an email is registered.
- Registration no longer reveals whether an email is already registered: it returns the same neutral response and emails either a welcome or an "account already exists" notice, with no session set (you sign in afterward).
- Profile-limit and rate-limit enforcement made atomic, so concurrent requests cannot slip past a limit.
- Stripe billing webhook hardened ahead of go-live (still inert until keys are set): idempotent + ordered event processing (a redelivered or stale event can't double-apply or resurrect a canceled plan), a dunning grace window for
past_due, and line-itemcurrent_period_endhandling.
Fixed
- The periodic spending-report email could be sent multiple times per month (cron day-of-month/day-of-week OR semantics) — now sent once per period, with per-period idempotency.
- Re-running a failed or interrupted import no longer creates duplicate transactions (idempotent via a stable per-import id; migration
0008). - The billing page could label a paid plan as "Free"; it now shows your real tier and, when a plan is canceled, the date access ends.
[5.0.0] — 2026-06-27
Added
- Cloud sync via a Cloudflare Workers backend (D1 + R2) — sign in to sync across devices.
- Accounts: Google sign-in, email/password register + login, a no-account demo, and forgot-password reset by email.
- Pricing & plans (Free / Basic / Advanced / Ultimate) with a 4-tier comparison in Settings → Billing, plus Stripe billing (checkout, portal, status, webhook).
- Email reminders — budget alerts and a periodic spending report (Resend) — with per-profile toggles and one-click unsubscribe.
- Contact-support form (sign-in, reset, and Settings) with an auto-acknowledgement and a TC-XXXX reference id.
- Tabbed Settings: General / Exports / Billing.
Changed
- Per-plan limits enforced (profiles, receipt storage, monthly reminder quota); advanced reports (tax & P&L) gated to Basic and up.
- Email now sends from a repliable address (hello@) instead of no-reply.
Security
- Pre-merge review hardening: receipt-upload IDOR and cross-profile savings-goal recompute fixed; user-supplied IN-lists chunked to stay under D1's bound-variable limit; rate limiter made atomic; the support auto-acknowledgement no longer reflects arbitrary attacker-supplied content to unverified recipients.
Fixed
- Profile creation failing with a response-validation error (missing
created_at). - "Access denied" for old/profile-less accounts (a default profile is now created automatically); password-reset no longer leaves a half-logged-in state.
- Large transaction pages timing out (N+1 tag query) and import of thousands of rows failing (D1 bound-variable limit); several invalid CSS transforms that silently dropped animations.
[4.0.0] — 2026-05-11
Added
- Portfolio tracker with real-time Yahoo Finance price lookup and allocation pie chart
- Counterparties page showing who-owes-who from beneficiary/payor transaction data
- Account balance auto-update when transactions are created/updated/deleted
- Starting balance and starting date fields for accounts with dynamic balance computation
- Transfer handling between accounts (FROM/TO with balance adjustments on both sides)
- Bulk action bar: Change Category and Change Type modals for multi-transaction editing
- Auto-categorization modal for bulk-mapping uncategorized transactions
- Nuke scripts:
nuke-demo.sh(demo profiles only) andnuke-all.sh(all data) - Google Sheets import improvements: auto-populated account inputs, cash account type
Changed
- Account types aligned with backend: giro/savings/ib/cash (was checking/savings/credit/investment)
- Import now resolves account_id from Means of Payment (FROM) instead of Category (TO)
- Transaction FROM/TO column shows MoP → Category with transfer amounts without
-prefix - Analytics labels changed from "Monthly" to "Period" to reflect actual data range
- Navigation labels simplified: "Loan Calculator" → "Loans", "Housing Calc" → "Housing"
- Dropdown UX: category/tag dropdowns auto-close when clicking outside
Fixed
- Critical import bug: account_id was resolved from Category (TO) instead of Means of Payment (FROM)
- Post-import balance recalculation handling all transfer directions (FROM only, TO only, both)
- Bulk DELETE sets account balance to starting_balance instead of 0
- Import: existing accounts now pre-populated in accountIdMap for MoP resolution
- Portfolio seed data: tier string passed directly instead of undefined config.tier property
- Yahoo Finance v3 ESM import: use
new YahooFinance()pattern - Mobile overflow on all pages: added overflow-x containment, responsive breakpoints for tables/charts
- SolidJS anti-patterns: replaced createEffect+isMounted with onMount, fixed ChartWrapper reactivity
[3.0.0] — 2026-04-01
Added
- Serverless mode with full IndexedDB storage adapter
- Multi-profile support with demo data (low/mid/high income) spanning 2000-2026
- Zero-based budgeting with allocation and rollover
- Daily heatmap visualization (D3.js) for spending patterns
- Sankey flow diagram for income/expense flow visualization
- PDF report generation: monthly spending, annual summary, P&L, tax summary
- Reconciliation workflow with bulk toggle and reconciliation summary
- Transaction tags with filtering and color coding
- Receipt upload and attachment to transactions
- Recurring transactions with auto-populate scheduling
- Quick Add modal (Ctrl+Shift+T) for rapid transaction entry
- Dark/light theme with CSS variables and persistence
- PWA support with service worker for offline access
- Chart export as images
Changed
- Migrated from vanilla JS to SolidJS + TypeScript + Vite
- CSS Modules instead of global CSS
- Hash-based routing with query parameter support
[2.0.0] — 2026-03-15
Added
- Savings goals with progress tracking and contributions
- Loan calculator with amortization tables, prepayments, and variable rates
- Bills tracker with recurring payment scheduling
- Housing cost calculator
- Retirement calculator with projections
- Compound interest calculator
- Emergency fund calculator
- Rent vs Buy comparison calculator
- Budget rollover support
- Category auto-mapping from transaction descriptions
- Google Sheets CSV/XLSX import with column mapping and preview
[1.0.0] — 2026-03-01
Added
- Initial release: vanilla JS SPA with Express/SQLite backend
- Transaction management (CRUD, filtering, search, pagination)
- Category management with colors and icons
- Account tracking with balances
- Dashboard with income/expense charts and metrics
- Basic budgeting per category
- Analytics with category breakdowns
- User authentication (bcrypt + sessions)
- Settings management
- Data export/import (JSON)