Skip to content

feat: Dynamic island review - #1963

Draft
adrien-coye wants to merge 6 commits into
feat/Dynamic-Islandfrom
feat/Dynamic-Island-review
Draft

adrien-coye wants to merge 6 commits into
feat/Dynamic-Islandfrom
feat/Dynamic-Island-review

Conversation

@adrien-coye

Copy link
Copy Markdown
Contributor

No description provided.

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 refactors the Dynamic Island upload integration to be concurrency-safe by moving the Dynamic Island service to an actor, making the service protocol async/Sendable, and extracting upload progress tracking into a dedicated tracker object.

Changes:

  • Convert DynamicIslandServiceable APIs to async and update call sites to await them.
  • Replace DynamicIslandManager with DynamicIslandUploadProgressTracker and adjust DI wiring.
  • Rework DynamicIslandService execution flow around continuations and progress updates.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
kDriveTests/kDrive/Launch/UTRootViewControllerState.swift Updates test DI registrations to use DynamicIslandUploadProgressTracker instead of the previous manager.
kDriveCore/DI/CoreTargetAssembly.swift Updates core DI registrations for the Dynamic Island tracker and provides BGTaskScheduler.shared.
kDriveCore/Data/Upload/UploadQueue/Operation/UploadOperation+Error.swift Wraps Dynamic Island cancellation calls in Task { await ... } to match async service APIs.
kDriveCore/Data/Upload/Servicies/UploadService/Parallelism/UploadParallelismOrchestrator.swift Wraps queue activity updates in a task to call the async Dynamic Island API.
kDriveCore/Data/Upload/Servicies/DynamicIslandServiceable.swift Makes the Dynamic Island service protocol Sendable and all methods async.
kDriveCore/Data/Upload/Servicies/DynamicIslandService.swift Converts the service to an actor, injects BGTaskScheduler, and updates progress/title handling logic.
kDriveCore/Data/Upload/DynamicIslandUploadProgressTracker.swift Renames/extracts progress tracking into DynamicIslandUploadProgressTracker, adds async snapshot/reset helpers.
kDrive/AppDelegate.swift Calls registerTask() via Task { await ... } to match the new async API.
Comments suppressed due to low confidence (1)

kDriveCore/Data/Upload/Servicies/DynamicIslandService.swift:103

  • updateQueueActivity(globalQueueActive:photoQueueActive:) is async in the protocol, but implemented synchronously here. After making it async, the internal call to submitTask() also needs to be awaited.
    public func updateQueueActivity(globalQueueActive: Bool, photoQueueActive: Bool) {
        uploadProgressTracker.updateQueueActivity(
            globalQueueActive: globalQueueActive,
            photoQueueActive: photoQueueActive
        )

        if globalQueueActive || photoQueueActive {
            submitTask()
        }
    }

taskIdentifier = "com.infomaniak.drive.background-upload-dynamic-island"
}

public func registerTask() {
hasRegisteredLaunchHandler = true
}

public func submitTask() {
@@ -88,19 +82,17 @@ public class DynamicIslandService: DynamicIslandServiceable {
Self.logger.error("Uploading error in task: \(error)")
@adrien-coye
adrien-coye force-pushed the feat/Dynamic-Island branch from b99024a to 9f1772e Compare July 7, 2026 14:42
@adrien-coye
adrien-coye force-pushed the feat/Dynamic-Island-review branch from a175f99 to 9d6ccb9 Compare July 7, 2026 14:44
@adrien-coye adrien-coye added this to the 6.1.0 milestone Jul 9, 2026
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from 9f1772e to b3730a3 Compare July 13, 2026 13:11
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 9d6ccb9 to 4280ba9 Compare July 13, 2026 13:12
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from b3730a3 to e8f9e45 Compare July 23, 2026 06:04
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 4280ba9 to 64820ee Compare July 23, 2026 06:11
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from e8f9e45 to 956743b Compare July 27, 2026 12:04
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch 2 times, most recently from e2ba7f7 to 81c7c17 Compare July 27, 2026 12:37
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from d1752c7 to 668b218 Compare July 30, 2026 13:21
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 81c7c17 to 680a3c8 Compare July 30, 2026 13:22
@adrien-coye adrien-coye modified the milestones: 6.1.0, 6.2.0 Aug 14, 2026
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from 668b218 to 66af390 Compare August 17, 2026 07:34
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 680a3c8 to cbe246e Compare August 17, 2026 07:34
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from 66af390 to 654d1cb Compare August 21, 2026 11:48
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from cbe246e to 9b675e8 Compare August 21, 2026 11:48
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from 654d1cb to e3462d7 Compare August 21, 2026 13:54
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 9b675e8 to 11ee78e Compare August 21, 2026 13:54
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from e3462d7 to cf1f5f2 Compare August 25, 2026 07:36
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 11ee78e to 89fbe7f Compare August 25, 2026 07:36
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island branch from cf1f5f2 to 4b8ced2 Compare August 25, 2026 14:13
@Muuushuuu
Muuushuuu force-pushed the feat/Dynamic-Island-review branch from 89fbe7f to 55569ea Compare August 25, 2026 14:13
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants