Each of these was recorded with its reasoning already settled; each is fixed test-first, and two turned out to be worse than the note claimed. EMPTY_FIGURES is frozen. figuresFor returns it by shared reference for every (post, month) the fold has no entry for, so one consumer mutating its result would have moved every other unknown row with it. Split values now round by what they MEAN. A split's value is a percentage in "percent" mode but MONEY in the purchase's currency in "fixed" mode; both were rounded to a hardcoded 2 places. sliceTotal likewise rounded to DKK's minor unit whatever currency the slices carried. Note this is narrower than TODO claimed: round2 is still correct for Rule.percent, which is not money at all. Neither bug is observable while every supported currency uses hundredths, so the tests force CURRENCY_DIGITS for their duration. confirmImport guards its write. A failed import was an unhandled rejection with nothing shown; the dialog now reports it and keeps `pending` so the user can retry. A source-level guard covers the whole UI, in the spirit of eventCapture.test.ts. The manifest has one definition. The dev placeholder did not merely hardcode scope "/" — it was never served at all: the "/*" catch-all answered /manifest.webmanifest with the HTML shell, as text/html, and /icon.svg too. buildManifest moves to src/manifest.ts, the dev server generates both from the base path, and the source file stays as a valueless resolution stub because Bun.serve has no `external` option to skip the <link> href. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4 lines
488 B
JSON
4 lines
488 B
JSON
{
|
|
"$comment": "Not served, and deliberately valueless. This file exists only so Bun's dev-server HTML bundler can resolve the <link rel=\"manifest\"> href in src/index.html; Bun.serve has no `external` option, unlike Bun.build. The manifest actually served comes from src/manifest.ts: the dev server generates it per request, and build.ts writes dist/manifest.webmanifest from it. Adding real values here does nothing except let them go stale - src/manifest.test.ts fails if you do."
|
|
}
|