Skip to content

Conversation

@rtavernaea
Copy link
Collaborator

image

Copy link
Collaborator

@edandylytics edandylytics left a comment

Choose a reason for hiding this comment

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

I think we can get this there pretty quickly. There are a number of comments, but really just three main themes:

  1. Let's tighten up the typing. There's a prisma generator that'll help with that. That will catch some of the cases where this code might bomb out.
  2. Refactoring the resourceErrors getter a bit should allow us to simplify things
  3. Let's optimize the summary for concision and scan-ability. It's OK if it doesn't read like a sentence.

const allProcessedRecordsFailed =
runSummary.studentAssessments.records_processed ===
runSummary.studentAssessments.records_failed;
const unmatchedStudentsInfo = run.unmatchedStudentsInfo as any;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use the prisma generator to type this more specifically. The as any causes us to miss the case where unmatchedStudentsInfo can be null.

Copy link
Collaborator

@edandylytics edandylytics left a comment

Choose a reason for hiding this comment

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

Submitting with some notes from our pairing

Copy link
Collaborator

@edandylytics edandylytics left a comment

Choose a reason for hiding this comment

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

This is looking good. Just a few small things and we're there.

resource: reportableFailedResource,
failed: this.resourceSummaries?.[reportableFailedResource]?.failed ?? 0,
total:
this.resourceSummaries?.[reportableFailedResource]?.success! +
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need to assert the presence of success?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh hm that may have been an ai autocomplete that was unintentional. But i think it's because resourceSummaries is possibly undefined. I can change this line to
this.resourceSummaries?.[reportableFailedResource].success ?? 0 +

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

@edandylytics edandylytics left a comment

Choose a reason for hiding this comment

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

Seems we lost the PrismaJson types at some point. Once those are back in and the app builds, should be good to go

Copy link
Collaborator

@edandylytics edandylytics left a comment

Choose a reason for hiding this comment

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

Looks good. Let's get this in!

@rtavernaea rtavernaea merged commit 6e58bf6 into development Jan 14, 2026
7 checks passed
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