BillTracker/client/components/tracker
null 9b805e60b2 refactor(ts): convert the API client to TypeScript (TS9)
client/api.js -> api.ts. Types the fetch infrastructure: generic _fetch<T>
and get/post/put/patch/del<T> helpers, an ApiError interface (status/code/
details/data), a QueryParams type for the query-string builder, and File-typed
upload helpers. Endpoint response shapes are typed incrementally — most methods
default to Promise<unknown>; the ones consumed by typed .ts files get real
shapes (quickPay -> PaymentRecord, togglePaid -> TogglePaidResult, settings ->
settings map).

Typing togglePaid's result surfaced a latent narrowing bug in usePaymentActions:
the un-pay Undo closure read result.paymentId (number|undefined) inside a
deferred async callback where TS re-widens the if-narrowed value — fixed by
capturing the id in a const before the closure.

The 16 files importing '@/api.js' with an explicit extension were normalized to
'@/api' so Vite/TS resolve the .ts.

Verified: typecheck 0, lint 0 errors (47 warns), build green, 48 client tests,
and 17/17 e2e probe (every page renders, all API paths respond) — the central
fetch-module rename is runtime-safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 22:09:04 -05:00
..
AutopaySuggestionActions.jsx 0.34.3 2026-05-31 15:06:10 -05:00
CashFlowCard.jsx feat(cashflow): safe-to-spend projection with timeline, vitest setup, package upgrades 2026-06-12 01:32:28 -05:00
DriftInsightPanel.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
EditableCell.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
FilterChip.jsx 0.34.3 2026-05-31 15:06:10 -05:00
LowerThisMonthButton.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
MobileTrackerRow.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
MonthlyStateDialog.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
NotesCell.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
OverdueCommandCenter.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
PaymentLedgerDialog.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
PaymentModal.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
PaymentProgress.jsx fix(tracker): update payment progress and bills service (batch 0.37.1) 2026-06-08 11:54:47 -05:00
StartingAmountsEditDialog.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
StatusBadge.jsx refactor(tracker): consolidate isPaidStatus + rowOutstanding + toast gap (T5) 2026-07-03 18:36:30 -05:00
SummaryCards.jsx 0.34.3 2026-05-31 15:06:10 -05:00
TrackerBucket.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
TrackerRow.jsx refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00