A healthcare market could not be edited

Fixkamo-internal
Shipped
August 26, 2026 at 6:46 PM UTC
Author
kamo
Commit
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.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing