Josh Rogers b31ff77548 Fix unit/product kind enums serializing as integers
Two bugs found during exploratory testing:

1. UnitKind and ProductKind enums were serialized as 0/1 instead of
   "Global"/"Family" because no global JSON converter was registered.
   Added JsonStringEnumConverter to ConfigureHttpJsonOptions so all
   enum responses (kind, category) serialize as strings. This also
   fixes UnitCategory coming back as a number.

2. units.svelte.ts triggered a Svelte 5 state_unsafe_mutation error
   because the `all` getter called load() (which mutates $state) from
   inside a $derived expression in QuantityInput. Wrapped the load()
   call in untrack() so the side-effect runs outside the reactive
   tracking context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 19:37:16 -05:00
S
Description
No description provided
446 KiB
Languages
C# 71.8%
Svelte 17.7%
TypeScript 8.7%
PowerShell 1%
CSS 0.5%
Other 0.2%