Skip to content

Conversation

@ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Oct 30, 2025

What this PR does / why we need it:

Based on JS-dataverse changes about Adding pagination query parameters to Dataset&File Version Summaries use case IQSS/dataverse-client-javascript#395
This PR adds pagination support to the Dataset and File Version Summaries use cases by introducing optional limit and offset query parameters. This allows clients to retrieve version summaries in paginated chunks rather than loading all versions at once.

Front-end also needs to update these use cases accordingly

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

it should be good if all checks pass, no ui change

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

no

Is there a release notes or changelog update needed for this change?:

yes, breaking change

Additional documentation:

@ChengShi-1 ChengShi-1 linked an issue Oct 30, 2025 that may be closed by this pull request
@github-actions github-actions bot added FY26 Sprint 9 FY26 Sprint 9 (2025-10-22 - 2025-11-05) GREI Re-arch GREI re-architecture-related SPA SPA.Q3.2025 labels Oct 30, 2025
@coveralls
Copy link

coveralls commented Oct 30, 2025

Coverage Status

coverage: 97.807% (-0.02%) from 97.823%
when pulling fd6874f on 885-update-query-parameters-to-datasetfile-version-summaries-use-case
into e1957ab on develop.

@ChengShi-1 ChengShi-1 requested a review from Copilot October 31, 2025 18:02
Copy link
Contributor

Copilot AI left a comment

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 updates the file and dataset version summaries API to support pagination by introducing limit and offset parameters. The changes update the @iqss/dataverse-client-javascript dependency to version 2.1.0-pr395.061ad8e which provides pagination support for version summaries.

Key changes:

  • Introduces FileVersionSummarySubset and DatasetVersionSummarySubset interfaces that wrap summaries with a totalCount field
  • Updates repository methods to accept optional limit and offset parameters for pagination
  • Updates all test mocks to return the new subset structure

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updates the dataverse-client-javascript dependency to version with pagination support
package-lock.json Updates lock file for the new dependency version
src/files/domain/models/FileVersionSummaryInfo.ts Adds FileVersionSummarySubset interface
src/dataset/domain/models/DatasetVersionSummaryInfo.ts Adds DatasetVersionSummarySubset interface
src/files/domain/repositories/FileRepository.ts Updates getFileVersionSummaries signature with pagination parameters
src/dataset/domain/repositories/DatasetRepository.ts Updates getDatasetVersionsSummaries signature with pagination parameters
src/files/domain/useCases/getFileVersionSummaries.ts Updates use case to pass pagination parameters
src/dataset/domain/useCases/getDatasetVersionsSummaries.ts Updates use case to pass pagination parameters
src/files/infrastructure/FileJSDataverseRepository.ts Implements pagination parameters in repository
src/dataset/infrastructure/repositories/DatasetJSDataverseRepository.ts Implements pagination parameters in repository
src/sections/file/file-version/useGetFileVersionsSummaries.ts Updates hook to support pagination and extract summaries from subset
src/sections/dataset/dataset-versions/useGetDatasetVersionsSummaries.ts Updates hook to support pagination and extract summaries from subset
src/stories/file/FileMockRepository.ts Updates mock to return FileVersionSummarySubset
src/stories/dataset/DatasetMockRepository.ts Updates mock to return DatasetVersionSummarySubset
src/stories/dataset/DatasetLoadingMockRepository.ts Updates mock signature for pagination
src/stories/dataset/DatasetErrorMockRepository.ts Updates mock signature for pagination
src/stories/dataset/deaccession-dataset/DeaccessionDatasetModal.stories.tsx Updates story to return new subset structure
tests/component/dataset/domain/models/DatasetVersionsSummariesMother.ts Updates test data factory to return subset structure
All test files Updates test mocks to return new subset structures with totalCount

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChengShi-1 ChengShi-1 marked this pull request as ready for review October 31, 2025 18:35
@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Oct 31, 2025
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Oct 31, 2025
@ekraffmiller ekraffmiller self-assigned this Nov 5, 2025
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Nov 5, 2025
@cmbz cmbz added the FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) label Nov 5, 2025
Copy link
Contributor

@ekraffmiller ekraffmiller 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! just a suggestion about using a pagination param in the definition of the use case.

@ChengShi-1 ChengShi-1 requested a review from Copilot November 6, 2025 15:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@ekraffmiller ekraffmiller 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, approved!

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Nov 6, 2025
@ekraffmiller ekraffmiller removed their assignment Nov 6, 2025
@ekraffmiller ekraffmiller moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Nov 10, 2025
@ekraffmiller
Copy link
Contributor

all tests pass and no merge conflicts, ok to merge

@ekraffmiller ekraffmiller merged commit 8909e14 into develop Nov 10, 2025
12 of 16 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Nov 10, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 9 FY26 Sprint 9 (2025-10-22 - 2025-11-05) FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q3.2025 SPA

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Update query parameters to Dataset&File Version Summaries use case

5 participants