Skip to content

Conversation

@Michael-Dratch
Copy link
Collaborator

Updates so that the Benefit configuration pages use the benefit checkConfigs and not EligibilityCheck objects. Also included some naming changes to make names consistent across backend and frontend.

@Michael-Dratch Michael-Dratch requested review from Justin-MacIntosh and removed request for prestoncabe December 7, 2025 01:41
@Michael-Dratch Michael-Dratch changed the title Update evaluation of library checks Update checkConfig class and to benefit configuration flows to use checkConfig Dec 7, 2025
Copy link
Collaborator

@Justin-MacIntosh Justin-MacIntosh left a comment

Choose a reason for hiding this comment

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

Only 2 actual "issues", but this is great work. Thank you for the effort here!

return new ArrayList<>(latestVersionMap.values());
}

private static int compareVersions(String v1, String v2) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I'd really love a file for util functions related to version numbers, but that can be a future change.

return checks.slice().sort((check1, check2) => check2.version - check1.version);
return checks
.slice()
.sort((check1, check2) => check2.version - check1.version);
Copy link
Collaborator

Choose a reason for hiding this comment

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

issue: We need another "normalized compare" here to properly sort these.

if (!benefit) return;

const updatedChecks: CheckConfig[] = [...benefit.checks, newCheck]
console.log("updating benefit");
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Remove logs if unneeded anymore.

public class CheckConfig {
private String checkId;
private String checkName;
private String checkVersion;
Copy link
Collaborator

Choose a reason for hiding this comment

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

issue: I'm wondering about module and whether that should be here too. We can already derive it from the checkId, but that's true of version as well, so maybe we don't even need version here as it's own param? We should try to decide if anything already in checkId is pulled from checkId, or if it's stored redundantly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll add module, I'm worried that storing data in the id itself was a bad idea and would like to rely more on the actual attributes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good 🫡

Copy link
Collaborator

Choose a reason for hiding this comment

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

For what it's worth I think the composite property was a cool idea, but it may make sense to make an Index in the Firestore Database for that purpose instead.

@Michael-Dratch Michael-Dratch merged commit bfb9ad7 into main Dec 8, 2025
@Michael-Dratch Michael-Dratch deleted the update_evaluation_of_library_checks branch December 8, 2025 02:17
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