the discriminated-union transfer state is the right instinct, and the honest framing on near-real-time polling over pretending it's a stream is exactly the kind of clarity that avoids a whole class of confused bug reports later. one thing I'd add to the money-as-floating-point section: even after moving to minor-unit integers, currency conversion/display formatting still needs its own decimal library at the boundary, Intl.NumberFormat is fine for display but silently reintroduces float rounding if you feed it a computed value instead of a stored one.
the discriminated-union transfer state is the right instinct, and the honest framing on near-real-time polling over pretending it's a stream is exactly the kind of clarity that avoids a whole class of confused bug reports later. one thing I'd add to the money-as-floating-point section: even after moving to minor-unit integers, currency conversion/display formatting still needs its own decimal library at the boundary, Intl.NumberFormat is fine for display but silently reintroduces float rounding if you feed it a computed value instead of a stored one.