centraldogma icon indicating copy to clipboard operation
centraldogma copied to clipboard

Web UI cannot handle numbers larger than `Number.MAX_SAFE_INTEGER` in JSON files

Open KarboniteKream opened this issue 1 year ago • 3 comments

If I try to create a JSON file, where a field has the value 9223372036854775807 (Long.MAX_VALUE), the UI displays it as 9223372036854776000.

Editing the file to replace this value with the original number displays the error You did not change anything when trying to save it. If I try to update the value with Long.MAX_VALUE - 1, the value is updated correctly (verified by looking at the API response), but the UI still displays 9223372036854776000.

It seems like this is caused by the value using JavaScript's Number instead of BigInt. I'm not sure this is a problem with the Central Dogma UI or some library it's using.

You can reproduce it by creating a file with the following contents:

{
  "test": 9223372036854775807
}

YAML files are unaffected:

test: 9223372036854775807

KarboniteKream avatar Jul 24 '23 12:07 KarboniteKream