MrFastZombie reported on the ModDB listing that in 1.7.0-beta.4, pressing the pencil button to edit an Installation lands on a blank grey screen. Nothing renders and the page never recovers.
Reproduced on the shipped 1.7.0-beta.4 build and again on a build of current dev, with a config holding two registered VS Versions where one of them is not a parseable version string. Opening the edit route leaves the window empty and the renderer console carries:
TypeError: Invalid Version: Vintage Story 1.21.0
at new SemVer
at compare
at Object.rcompare
at Array.sort
at GameVersionPicker
The picker sorts the registered versions with semver.rcompare inside a sort callback that runs during render. rcompare throws on a string it cannot parse, the throw escapes the render pass, and React unmounts the whole tree.
A registered version is whatever the game printed when the launcher probed it with -v. src/domain/versions/detect.ts trims that stdout and stores it as it came, with no format check, so a modded build, a pre-release or a probe that answered with more than a bare number puts something like "Vintage Story 1.21.0" into the config. Once that entry exists, the edit form stops opening. The Add Installation form picks its default version by sorting the same list, so it went blank on the same data too: a player in this state can neither edit an existing Installation nor create a new one.
This is the same failure as #148, which hit the versions list page and was fixed in #154 with a guarded comparator written inline there. The two Installation forms were never covered by that fix.
Affected versions: every build carrying the unguarded sort, which is at least 1.7.0-beta.1 through 1.7.0-beta.4 and current dev. It only shows for players whose config holds a version string semver cannot parse, which is why it went unnoticed.
Fixed by #284, which moves the guard into one comparator used by all three sort sites, with tests on the comparator and on both Installation forms.
Worth naming separately: the reason a single throw shows as a blank grey window is that the app has no error boundary above the routes. Whether it should get one, so a future render failure degrades to a message instead of an empty screen, is its own decision and is not part of #284.
MrFastZombie reported on the ModDB listing that in 1.7.0-beta.4, pressing the pencil button to edit an Installation lands on a blank grey screen. Nothing renders and the page never recovers.
Reproduced on the shipped 1.7.0-beta.4 build and again on a build of current dev, with a config holding two registered VS Versions where one of them is not a parseable version string. Opening the edit route leaves the window empty and the renderer console carries:
The picker sorts the registered versions with
semver.rcompareinside a sort callback that runs during render.rcomparethrows on a string it cannot parse, the throw escapes the render pass, and React unmounts the whole tree.A registered version is whatever the game printed when the launcher probed it with
-v.src/domain/versions/detect.tstrims that stdout and stores it as it came, with no format check, so a modded build, a pre-release or a probe that answered with more than a bare number puts something like "Vintage Story 1.21.0" into the config. Once that entry exists, the edit form stops opening. The Add Installation form picks its default version by sorting the same list, so it went blank on the same data too: a player in this state can neither edit an existing Installation nor create a new one.This is the same failure as #148, which hit the versions list page and was fixed in #154 with a guarded comparator written inline there. The two Installation forms were never covered by that fix.
Affected versions: every build carrying the unguarded sort, which is at least 1.7.0-beta.1 through 1.7.0-beta.4 and current dev. It only shows for players whose config holds a version string semver cannot parse, which is why it went unnoticed.
Fixed by #284, which moves the guard into one comparator used by all three sort sites, with tests on the comparator and on both Installation forms.
Worth naming separately: the reason a single throw shows as a blank grey window is that the app has no error boundary above the routes. Whether it should get one, so a future render failure degrades to a message instead of an empty screen, is its own decision and is not part of #284.