CRDCDH-3447 Validation Results Node Comparison Tabs#70
Draft
amattu2 wants to merge 4 commits into
Draft
Conversation
#238 Bundle Size — 12.87MiB (~+0.01%).20e138c(current) vs d8dcc5d 3.7.0#237(baseline) Warning Bundle contains 54 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch CRDCDH-3759-3762 Project dashboard Generated by RelativeCI Documentation Report issue |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end support for exporting “updated vs released” node comparisons (e.g., M018) alongside validation results, by introducing a new GraphQL query and backend resolver/service logic, and wiring it into the frontend export flow (including tests and Storybook mocks).
Changes:
- Add
retrieveSubmissionQCComparisonsGraphQL API (schema, router wiring, service implementation, DAO-backed comparison retrieval). - Update
ExportValidationButtonto fetch and pass comparison rows intoValidationResultsExcelBuilderso “Updated ” sheets can be generated. - Extend frontend tests/stories and backend service tests to cover the new comparisons behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/frontend/src/graphql/retrieveSubmissionQCComparisons.ts | Adds frontend TypedDocumentNode + types for the new comparisons query |
| apps/frontend/src/graphql/index.ts | Re-exports the new query and types from the graphql barrel |
| apps/frontend/src/components/ExportValidationButton/index.tsx | Fetches comparisons during expanded export and passes them to the Excel builder |
| apps/frontend/src/components/ExportValidationButton/index.test.tsx | Adds mocks/test coverage ensuring comparison variables flow through |
| apps/frontend/src/components/ExportValidationButton/index.stories.tsx | Adds Storybook Apollo mocks for comparisons results |
| apps/backend/test/services/qc-result-service.test.js | Adds unit tests for retrieveSubmissionQCComparisonsAPI |
| apps/backend/services/qc-result-service.js | Implements retrieveSubmissionQCComparisonsAPI resolver logic |
| apps/backend/services/data-record-service.js | Adds batched released/new node retrieval for comparison export |
| apps/backend/routers/graphql-router.js | Wires the new GraphQL query name to the qc service method and injects DataRecordService |
| apps/backend/resources/graphql/crdc-datahub.graphql | Adds new query + response types for comparisons |
| apps/backend/constants/submission-constants.js | Adds VALIDATION.CODES.UPDATE_EXISTING_DATA constant (M018) |
| apps/backend/app.js | Ensures qcResultsService gets DataRecordService injected at app startup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+195
to
+206
| const [exportRows, comparisonResponse] = await Promise.all([ | ||
| fetchAllData<SubmissionQCResultsResp, SubmissionQCResultsInput, QCResult>( | ||
| getSubmissionQCResults, | ||
| variables, | ||
| (resp) => resp?.submissionQCResults?.results ?? [], | ||
| (resp) => resp?.submissionQCResults?.total ?? 0, | ||
| { pageSize: 5_000 } | ||
| ), | ||
| getSubmissionQCComparisons({ | ||
| variables, | ||
| }), | ||
| ]); |
Comment on lines
+145
to
+155
| const qcResults = await this.qcResultDAO.submissionQCResults( | ||
| params._id, | ||
| params.nodeTypes, | ||
| params.batchIDs, | ||
| params.severities, | ||
| params.issueCode, | ||
| -1, | ||
| 0, | ||
| "uploadedDate", | ||
| "DESC" | ||
| ); |
| } | ||
| acc[row.nodeType].add(row.submittedID); | ||
| return acc; | ||
| }, {}); |
| current: defaultFilters, | ||
| }; | ||
|
|
||
| const mockQCComparsions: MockedResponse< |
| maxUsageCount: Infinity, | ||
| }; | ||
|
|
||
| const mockQCComparsions: MockedResponse< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
N/A
Change Details (Specifics)
N/A
Related Ticket(s)
CRDCDH-3759 (Task)
CRDCDH-3762 (Task)
CRDCDH-3447 (US)