[PR #23419] [CLOSED] refactor(mobile): migrate from cancellation_token_http to native Dart… #17528

Closed
opened 2026-02-05 16:23:25 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/23419
Author: @vfreex
Created: 10/31/2025
Status: Closed

Base: mainHead: migrate-to-http-abortable


📝 Commits (1)

  • 5bf54ef refactor(mobile): migrate from cancellation_token_http to native Dart HTTP Abortable interface

📊 Changes

11 files changed (+89 additions, -75 deletions)

View changed files

📝 mobile/lib/domain/services/background_worker.service.dart (+5 -4)
📝 mobile/lib/models/backup/backup_state.model.dart (+9 -8)
📝 mobile/lib/models/backup/manual_upload_state.model.dart (+9 -8)
📝 mobile/lib/providers/backup/backup.provider.dart (+7 -5)
📝 mobile/lib/providers/backup/manual_upload.provider.dart (+8 -7)
📝 mobile/lib/repositories/upload.repository.dart (+11 -6)
📝 mobile/lib/services/background.service.dart (+7 -6)
📝 mobile/lib/services/backup.service.dart (+30 -10)
📝 mobile/lib/services/upload.service.dart (+3 -4)
📝 mobile/pubspec.lock (+0 -16)
📝 mobile/pubspec.yaml (+0 -1)

📄 Description

… HTTP Abortable interface

Migrate HTTP request cancellation from the third-party cancellation_token_http package to the native Dart http package v1.5.0+ Abortable interface.

This is to use official Dart HTTP package features for better long-term support and a step forward to move to native http clients.

  • Removed external dependency on cancellation_token_http package
  • Using official Dart HTTP package features for better long-term support
  • Maintains all existing HTTP request cancellation functionality
  • Simpler dependency tree

Description

Fixes # (issue)

How Has This Been Tested?

  • I have run local unit tests
  • I tried ion my phone and didn't notice anything broken so far

Screenshots (if appropriate)

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

...


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/23419 **Author:** [@vfreex](https://github.com/vfreex) **Created:** 10/31/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `migrate-to-http-abortable` --- ### 📝 Commits (1) - [`5bf54ef`](https://github.com/immich-app/immich/commit/5bf54ef49290d596bb07ee8c69a2b7caa7c26417) refactor(mobile): migrate from cancellation_token_http to native Dart HTTP Abortable interface ### 📊 Changes **11 files changed** (+89 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/domain/services/background_worker.service.dart` (+5 -4) 📝 `mobile/lib/models/backup/backup_state.model.dart` (+9 -8) 📝 `mobile/lib/models/backup/manual_upload_state.model.dart` (+9 -8) 📝 `mobile/lib/providers/backup/backup.provider.dart` (+7 -5) 📝 `mobile/lib/providers/backup/manual_upload.provider.dart` (+8 -7) 📝 `mobile/lib/repositories/upload.repository.dart` (+11 -6) 📝 `mobile/lib/services/background.service.dart` (+7 -6) 📝 `mobile/lib/services/backup.service.dart` (+30 -10) 📝 `mobile/lib/services/upload.service.dart` (+3 -4) 📝 `mobile/pubspec.lock` (+0 -16) 📝 `mobile/pubspec.yaml` (+0 -1) </details> ### 📄 Description … HTTP Abortable interface Migrate HTTP request cancellation from the third-party `cancellation_token_http` package to the native Dart `http` package v1.5.0+ Abortable interface. This is to use official Dart HTTP package features for better long-term support and a step forward to move to native http clients. - Removed external dependency on cancellation_token_http package - Using official Dart HTTP package features for better long-term support - Maintains all existing HTTP request cancellation functionality - Simpler dependency tree ## Description <!--- Describe your changes in detail --> <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> Fixes # (issue) ## How Has This Been Tested? <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> - [x] I have run local unit tests - [x] I tried ion my phone and didn't notice anything broken so far <details><summary><h2>Screenshots (if appropriate)</h2></summary> <!-- Images go below this line. --> </details> <!-- API endpoint changes (if relevant) ## API Changes The `/api/something` endpoint is now `/api/something-else` --> ## Checklist: - [x] I have performed a self-review of my own code - [x] I have made corresponding changes to the documentation if applicable - [x] I have no unrelated changes in the PR. - [x] I have confirmed that any new dependencies are strictly necessary. - [ ] I have written tests for new code (if applicable) - [x] I have followed naming conventions/patterns in the surrounding code - [ ] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc. - [ ] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services/`) ## Please describe to which degree, if any, an LLM was used in creating this pull request. ... --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 16:23:25 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#17528