I feel your pain ☒ . It is especially frustrating when all of this is getting ran in a docker container where the same version of things (ruby, node, yarn) haven't changed. I agree with the whole Rails 4 aspect of things where it was just simple and works, but at the same time, I feel like my JS was in a much worse way in terms of organization. It wouldn't be uncommon that one js file would end up conflicting with another. To mitigate that we did page specific javascript, but that had its own complications. I don't know what the right solution will be, but I'd love something that gave us best of both worlds.
It looks like if it doesn't exist, it would send the values over to the app. But, likely, it would just send the Value back to the server. From here, we could separate values from integer and strings and create the new categories. This can be nice too since we can limit who can make these changes.