Skip to content

Implement paginated enumeration#81

Merged
claucambra merged 24 commits into
mainfrom
feature/pagination
May 30, 2025
Merged

Implement paginated enumeration#81
claucambra merged 24 commits into
mainfrom
feature/pagination

Conversation

@claucambra
Copy link
Copy Markdown
Contributor

No description provided.

@claucambra claucambra requested a review from Copilot May 27, 2025 05:18
@claucambra claucambra self-assigned this May 27, 2025
Copy link
Copy Markdown
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

Adds paginated enumeration support to the file provider by extending both the core Enumerator logic and its mocks/tests.

  • Changed RemoteInterface.enumerate to return AFDataResponse<Data>? and threaded pagination tokens/counts through.
  • Updated Enumerator.readServerUrl and its helpers to accept/produce pagination settings and EnumeratorPageResponse.
  • Added new pagination-focused tests (EnumeratorPageResponseTests, testFolderPaginatedEnumeration) and removed obsolete flags in existing database manager tests.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Tests/NextcloudFileProviderKitTests/FilesDatabaseManagerTests.swift Removed obsolete updateDirectoryEtags parameters from calls.
Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift Updated enumeration tests for paginated behavior; renamed one test.
Tests/NextcloudFileProviderKitTests/EnumeratorPageResponseTests.swift New suite testing header parsing for pagination responses.
Tests/Interface/MockRemoteInterface.swift Enhanced mock to generate pagination headers and token logic.
Sources/.../NKRequestOptions+Extensions.swift Added convenience init for pagination parameters.
Sources/.../Enumeration/EnumeratorPageResponse.swift New type to parse pagination headers from responses.
Sources/.../Enumeration/Enumerator.swift Core changes to drive pagination: pageSize, pageNum, updated enumerateItems and readServerUrl.
Sources/.../Interface/RemoteInterface.swift Updated protocol to return AFDataResponse<Data>?.
Sources/.../Interface/NextcloudKit+RemoteInterface.swift Adjusted continuation to return the new response type.
Sources/.../Database/FilesDatabaseManager.swift Removed updateDirectoryEtags parameter from methods.

Comment thread Tests/Interface/MockRemoteInterface.swift
Comment thread Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift
@claucambra claucambra added the enhancement New feature or request label May 28, 2025
claucambra added 22 commits May 29, 2025 13:20
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
…erate request

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra force-pushed the feature/pagination branch from c0e8e17 to 9db4e5e Compare May 29, 2025 05:21
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2025

Codecov Report

Attention: Patch coverage is 91.30435% with 44 lines in your changes missing coverage. Please review.

Project coverage is 82.53%. Comparing base (b73ca99) to head (4ad01ce).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
...tcloudFileProviderKit/Enumeration/Enumerator.swift 69.73% 23 Missing ⚠️
...roviderKit/Enumeration/Enumerator+SyncEngine.swift 85.00% 15 Missing ⚠️
...ProviderKitTests/EnumeratorPageResponseTests.swift 98.70% 2 Missing ⚠️
...erKit/Interface/NextcloudKit+RemoteInterface.swift 0.00% 1 Missing ⚠️
...es/NextcloudFileProviderKit/Item/Item+Create.swift 50.00% 1 Missing ⚠️
Tests/Interface/MockRemoteInterface.swift 98.30% 1 Missing ⚠️
...oudFileProviderKitTests/RemoteInterfaceTests.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   82.14%   82.53%   +0.38%     
==========================================
  Files          68       71       +3     
  Lines       14369    14603     +234     
==========================================
+ Hits        11804    12053     +249     
+ Misses       2565     2550      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra merged commit af9f484 into main May 30, 2025
3 checks passed
@claucambra claucambra deleted the feature/pagination branch May 30, 2025 03:19
@claucambra claucambra modified the milestone: 3.0 May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants