mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
The list renders a reading through the metric/imperial transform registry, and glucose is not in it, so the list kept saying 95 mg/dL while the dashboard tile said 5.3 mmol/L for the same reading — correct on both counts and disagreeing anyway. The edit sheet is the half that could have done damage. Its label follows the same resolution as the row, so on mmol/L the number in the input is in mmol/L and has to come back the other way before the PATCH. Row, edit seed and inversion move together; converting the display alone would rewrite a 95 mg/dL reading as 5.3 the first time somebody corrected a typo. An mg/dL account edits in the unit the column already holds and stays on the identity path, deliberately: the converter rounds, and sending an mg/dL edit through it would quantise a stored 95.48 the moment somebody opened the sheet to fix a note. A row whose stored unit is not the type's canonical one still shows verbatim, as before.