centraldogma
centraldogma copied to clipboard
Web UI cannot handle numbers larger than `Number.MAX_SAFE_INTEGER` in JSON files
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