Skip to content

Conversation

@isabellaenriquez
Copy link
Member

@isabellaenriquez isabellaenriquez commented Nov 20, 2025

Pt 1 of BIL-1796

This introduces the new value for the AddOnCategory enum, as well as compatibility with the new enum in the _admin Change Plan action and checkout (the two places where you can enable or disable Seer).

Follow up PRs will update the backend and the rest of the frontend. This PR is necessary for maintaining compatibility in the limbo state when the backend is updated but the rest of the frontend still needs to be updated.

See https://github.com/getsentry/getsentry/pull/18869 for order of operations.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 20, 2025
@isabellaenriquez isabellaenriquez marked this pull request as ready for review November 20, 2025 16:17
@isabellaenriquez isabellaenriquez requested a review from a team as a code owner November 20, 2025 16:17
const addOnKey = `addOn${toTitleCase(productInfo.apiName, {allowInnerUpperCase: true})}`;
const enabled = subscription.addOns?.[productInfo.apiName]?.enabled;
formModel.setValue(addOnKey, enabled);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Form values for add-ons initialized during render, causing overwrite on re-render

Form values are being set directly in the component render function using formModel.setValue(). This is a side effect that gets executed on every re-render. When the parent component re-renders, this code runs again and resets form values to the current subscription state, overwriting any user changes. For example, if a user enables a checkbox, then the parent re-renders for any reason, the form value gets reset back to the subscription's disabled state. This should use a useEffect hook to initialize form values only when the subscription prop actually changes.

Fix in Cursor Fix in Web

@isabellaenriquez isabellaenriquez merged commit db745e9 into master Nov 21, 2025
48 checks passed
@isabellaenriquez isabellaenriquez deleted the isabella/addon-fe-pt-1 branch November 21, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants