KamoCRM

Selecting Quotes no longer bounces back to the first sub-tab

Fixkamo-internal
Shipped
4 ஆகஸ்ட், 2026 அன்று 4:41 AM UTC
Author
kamo
Commit
1f7c35c

Clicking Quotes set the index to 2 and wrote ?sub=quotes, but the effect syncing state back from the URL mapped anything that was not "commitments" to 0 — so it immediately reset to the first tab, which reads as Signups on a subscription market. The second click appeared to work only because the URL no longer changed, so the effect never re-ran. I introduced this in 8294efab: adding the Quotes tab updated the initial state and the click handler, and missed the third copy of the same id-to-index mapping. The order now lives in one place and both directions derive from it, so the next tab added cannot reintroduce it — there is no second mapping left to forget. The remaining index comparisons are addressed by id for the same reason: a reorder would otherwise swap intents and commitments content silently. Round-trip covered by tests, including the specific case that regressed.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing