A healthcare market could not be edited

Fixkamo-internal
已装运
2026年8月26日 18:46 UTC
作者
kamo
提交
890fb29

The edit screen still built its picker by mapping over a hardcoded array of seven verticals. HEALTHCARE was not among them, so a healthcare market opened to a select with no matching option — and this is the page whose own comment warns that when the current type is missing, "saving would silently rewrite commerceType to whatever the Select fell back to". The invariant it depended on was defeated by the array simply not having caught up. The create screen was fixed for this a few commits ago. Fixing the second copy the same way would leave two copies to go wrong a third time, so the logic moves to app/lib and both pages call it. That also makes it testable: app/settings is not in the vitest include allowlist, so a test written beside those pages would never have run. The builder takes membership from the server and order from the constant, so a vertical added server-side appears without a frontend change. The current type is added unconditionally, which makes the edit screen's guarantee true by construction rather than by the array happening to be complete. Ten tests, including one that fails if a third copy appears.

所有更改

就像你看到的运输?

每一个都自动更新您工作空间的地盘。 开始自由,看它成长 一周又一周.

永远开始自由查看定价