Skip to content

Conversation

@Justin-MacIntosh
Copy link
Collaborator

  • feat: Updated Configure Benefit to allow for multiple of the same check to be added.
  • feat: Updated Configure Benefit to display the most recent version of each published check.
  • chore: Changed benefitResource to block UI interactions while updates are in progress.

…ck to be added.

feat: Updated Configure Benefit to display the most recent version of each published check.
chore: Changed benefitResource to block UI interactions while updates are in progress.
checkResultsList.add(result);
checkResults.put(checkConfig.getCheckId(), Map.of("name", checkConfig.getCheckName(), "result", result));

String uniqueCheckKey = checkConfig.getCheckId() + checkNum;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was causing issues when there were multiple checks of the same exact ID.

newCheck.setOwnerId(userId);
newCheck.setPublic(true);
newCheck.setVersion(1);
newCheck.setVersion(0);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current logic increments the version and then publishes. It's been a bear to get that function just right, so I decided to set the initial version to 0 here so the first published version isn't "2".

const before = benefit;

setBenefit({ ...newBenefit });
setActionInProgress(true);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to be more in line with how we're doing the other API calls. This removes the last of the "Optimistic UI" in the frontend. As snappy as that was I was experiencing some strange behaviors locally that I think had to do with Optimistic API calls. Better to just unify the pattern, especially if it's buggy.

@Justin-MacIntosh Justin-MacIntosh force-pushed the customize-benefits-update branch from ab2ba84 to 5684067 Compare November 20, 2025 21:44
@Justin-MacIntosh Justin-MacIntosh marked this pull request as ready for review November 20, 2025 21:44
@Michael-Dratch Michael-Dratch merged commit 3f0dd7f into main Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants