Skip to content

Conversation

@BPerlakiH
Copy link
Collaborator

@BPerlakiH BPerlakiH commented Jan 3, 2026

Fixes: #1419

Image Image Image Simulator Screenshot - iPhone 17 Pro Max - 2026-01-03 at 18 55 40

Update log

Update log
@BPerlakiH BPerlakiH force-pushed the 1419-downloads-to-reflect-offline-state branch from 1117ae7 to 4650356 Compare January 3, 2026 17:52
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.59%. Comparing base (3b1cce6) to head (82be961).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1421   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          18       18           
  Lines         878      878           
=======================================
  Hits          813      813           
  Misses         65       65           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good idea to introduced this new status "offline" because it is everything but clear what is offline.

The status has to be "paused" like requested in the issue.

One question left open would be if the user needs additionally (to the "paused" status) to be informed that the underlying reason is the device been offline. I don't think this is necessary.

If you believe that, to the contrary, this is important. We could introduce in the detailed download view, we could replace the "Pause" information item with "Pause (device is offline)".

@BPerlakiH
Copy link
Collaborator Author

BPerlakiH commented Jan 4, 2026

I think the confusion will come from the fact that the download task itself can be paused and resumed, regardless if the user is online or offline.

So let's say, I want to download 2 very large files, and press download on both of them.
After a while I realize it will take a long time, but I want one of them more, so I put the other download on pause (to use my full band-width on the first).
In this situation, after pressing pause, the other file will be marked as "paused", and the first one will continue downloading (hopefully quicker).
Now with the above requirements, if I loose my internet connection, both files will be marked as "paused", and I won't know why.

The other confusing part is that, if I don't have internet connection, I should not have the option to "resume" a download, but that's not going to be clear either.

So in a state machine description, we have:

A) task paused
B) task resumed:
   B1) online
   B2) offline

Maybe this "offline" naming is not clear enough and needs to be changed.
I think re-using the "pause" is not good either, if you look at the screenshot we still have an active "pause" button.

If I understand your idea correctly, that would mean that we try to squeeze our current 3 states:

- paused
- resumed online
- resumed offline

into 2 (visible) states:

- paused*
- resumed

with the *, that if I am offline I won't be able to "resume", and once I get back online it will magically change back to "resumed".

So far the user had the option to "pause" and "resume", now we would magically take away this option from them (if they are offline), without a clear explanation. I think that is confusing.

@BPerlakiH BPerlakiH requested a review from kelson42 January 4, 2026 21:10
@BPerlakiH BPerlakiH force-pushed the 1419-downloads-to-reflect-offline-state branch from 4650356 to 007b513 Compare January 6, 2026 17:35
@kelson42
Copy link
Contributor

kelson42 commented Jan 9, 2026

Decision (when device is offline):

  • Status label should ""Paused (device is offline)"
  • (Pause/Resume) Button label shuld be "Resume" but button should be greyed

@BPerlakiH BPerlakiH force-pushed the 1419-downloads-to-reflect-offline-state branch from 007b513 to 82be961 Compare January 10, 2026 10:07
import Combine
import CoreData
import SwiftUI
import Combine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports should be unique

Suggested change
import Combine

@BPerlakiH
Copy link
Collaborator Author

Closing in favor of: #1424

@BPerlakiH BPerlakiH closed this Jan 10, 2026
@BPerlakiH BPerlakiH deleted the 1419-downloads-to-reflect-offline-state branch January 10, 2026 10:12
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.

Properly handle "going offline/going online" and its impact of download operations

4 participants