Skip to content

refactor: remove redundant networking task registry - #4336

Merged
marinofaggiana merged 12 commits into
masterfrom
normalized
Sep 25, 2026
Merged

marinofaggiana merged 12 commits into
masterfrom
normalized

Conversation

@marinofaggiana

@marinofaggiana marinofaggiana commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace the global NetworkingTasks registry with locally owned URLSessionTask references where cancellation and duplicate-request prevention are required.
  • Keep request cancellation scoped to the view controller that started the request.
  • Remove redundant task tracking from networking operations that never consumed the registered tasks.
  • Remove the unused NetworkingTasks actor, its logging tag, and its Xcode project references.

Motivation

NetworkingTasks registered requests globally, but most registered tasks were never queried or cancelled. In addition, replacing an existing task could remove it from the registry without cancelling it, making later cancellation unreliable.

Keeping cancellable requests close to their owner makes their lifecycle explicit and avoids collisions between screens, accounts, or scenes using shared string identifiers.

Testing

Not run locally, following the repository guidance. Xcode build and test verification should be performed manually or by CI.

  • The content of this PR was partly or fully generated using AI (N/A)

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Cancel the active notification data source task when leaving the view and prevent duplicate in-flight requests.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Track and cancel trash loading directly through its URL session task.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Track the folder request directly and prevent duplicate reads while it is running or suspended.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Track the current metadata sync request directly and cancel it when metadata synchronization stops.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana marinofaggiana changed the title Normalized refactor: remove redundant networking task registry Sep 24, 2026
@marinofaggiana
marinofaggiana merged commit e0a3570 into master Sep 25, 2026
6 checks passed
@marinofaggiana
marinofaggiana deleted the normalized branch September 25, 2026 14:24
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.

1 participant