Paging with skip by maoyama · Pull Request #179 · maoyama/Changes (original) (raw)
Pull Request Overview
This PR introduces paging functionality through a new "skip" parameter for paginating git log retrieval and updates related tests. Key changes include:
- Updating the expected commit count in LogStoreTests.
- Adding cancellation checks in FolderView.
- Refactoring LogStore and GitLog to use a "skip" parameter instead of a revision range for pagination.
- Adjusting pagination logic in loadMore to align with the new skip-based approach.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| GitClientTests/LogStoreTests.swift | Updates the expected commit count for testing the refreshed paging behavior. |
| GitClient/Views/Folder/FolderView.swift | Adds cancellation checks during folder refresh and synchronization. |
| GitClient/Models/Observables/LogStore.swift | Refactors gitLog signature, updates documentation/comments, and adjusts pagination logic. |
| GitClient/Models/Commands/GitLog.swift | Introduces the new skip parameter and updates git arguments accordingly. |
Comments suppressed due to low confidence (2)
GitClientTests/LogStoreTests.swift:89
- The change in expected commit count from 2 to 1 indicates a functional change; please verify that the new expectation correctly reflects the intended paging behavior.
#expect(store.commits.count == 1)
GitClient/Models/Observables/LogStore.swift:168
- Switching from 'number + 1' to 'number' in the loadMore pagination logic may affect the range of commits retrieved; please double-check that the new pagination calculation meets the intended data retrieval requirements.