cadence-web icon indicating copy to clipboard operation
cadence-web copied to clipboard

Represent large integer values in UI

Open Erich-e opened this issue 7 years ago • 3 comments

Large integer values (> 10e17) appear to lose precision in the UI. I'm currently using the ubercadence/web:2.4.1 image. For example, this DeviceID is passed to the worker as 321588685835436831 but appears as 321588685835436800 screen shot 2018-07-13 at 2 50 50 pm

Erich-e avatar Jul 13 '18 19:07 Erich-e

Yes, this stems from an unfortunate JavaScript limitation where there is only the number type that is a 32-bit floating point value. Currently the code is explicitly processing all Long types from tchannel structs as numbers, but to fix this as best as possible, values exceeding the precision can be kept as strings.

FYI the export API uses a custom JSON serializer so these numbers will still be numbers in JSON, to be compatible with the CLI, so this may be sufficient for you for the short term until this is fixed.

nathanboktae avatar Jul 16 '18 17:07 nathanboktae

Ok, thanks for the clarification.

Erich-e avatar Jul 19 '18 15:07 Erich-e

Looks like this issue hasn't been fixed (see https://github.com/uber/cadence-web/issues/144)

just-at-uber avatar Apr 21 '20 19:04 just-at-uber