Skip to content

CRDCDH-3447 Validation Results Node Comparison Tabs#70

Draft
amattu2 wants to merge 4 commits into
3.7.0from
CRDCDH-3759-3762
Draft

CRDCDH-3447 Validation Results Node Comparison Tabs#70
amattu2 wants to merge 4 commits into
3.7.0from
CRDCDH-3759-3762

Conversation

@amattu2

@amattu2 amattu2 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Overview

N/A

Change Details (Specifics)

N/A

Related Ticket(s)

CRDCDH-3759 (Task)
CRDCDH-3762 (Task)
CRDCDH-3447 (US)

@amattu2 amattu2 added this to the 3.7.0 milestone Jul 8, 2026
@relativeci

relativeci Bot commented Jul 8, 2026

Copy link
Copy Markdown

#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  Change 3 changes Regression 1 regression
                 Current
#238
     Baseline
#237
Regression  Initial JS 877.68KiB(+0.06%) 877.16KiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 27.93% 28.67%
No change  Chunks 74 74
No change  Assets 117 117
Change  Modules 9160(+0.01%) 9159
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 320 320
No change  Duplicate Packages 53 53
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#238
     Baseline
#237
Regression  JS 10.35MiB (~+0.01%) 10.35MiB
No change  IMG 1.72MiB 1.72MiB
No change  Fonts 805.07KiB 805.07KiB
No change  CSS 18KiB 18KiB

Bundle analysis reportBranch CRDCDH-3759-3762Project dashboard


Generated by RelativeCIDocumentationReport issue

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 retrieveSubmissionQCComparisons GraphQL API (schema, router wiring, service implementation, DAO-backed comparison retrieval).
  • Update ExportValidationButton to fetch and pass comparison rows into ValidationResultsExcelBuilder so “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<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants