[BW-DL-03] Correct download row actions: Pause, Resume and Retry #18

Closed
opened 2026-09-18 08:46:06 +02:00 by alexander · 0 comments
Owner

Migrated from GitHub issue #108. Forgejo issue: #18. GitHub source content synchronized on 2026-09-19. Migrated issue references below use Forgejo numbers where an equivalent issue exists; historical references without a Forgejo counterpart remain explicit GitHub links.

Classification

Active follow-up from #15 / GitHub PR #106.

Problem / opportunity

The current Downloads row shows a Pause icon for every incomplete row that is not Paused. That includes DownloadState.Failed. Pressing it calls PauseDownloadUseCase, which can turn a failed manifest into Paused and clear its stored failure reason instead of retrying.

User value

The action beside a download should always match what will happen: pause something that is actually transferring, resume something the listener paused, and retry something that failed.

Scope

  • Drive row actions from the recovery/presentation state introduced by BW-DL-02.
  • Running -> Pause.
  • Paused -> Resume.
  • Terminal/recoverable Failed -> Retry.
  • Queued/waiting/retrying states must have an explicitly chosen action/disabled/no-action behavior rather than falling through to Pause by accident.
  • Update verification/recovery copy so it only promises Retry where Retry is actually available on that surface.
  • Preserve partial bytes on Retry/Resume.

Explicitly out of scope

  • No WorkManager state adapter beyond what BW-DL-02 can represent; BW-DL-04 owns live constraint/backoff observation.
  • No removable-storage semantics.
  • No device-wide deletion changes.
  • No visual redesign unrelated to recovery actions.

Dependencies

  • BW-DL-02 / #17 — presentation/recovery state is the owner of which action applies.
  • Parent audit #15 / GitHub PR #106.

Architecture seams affected

  • DownloadsViewModel action routing.
  • DownloadsScreen row semantics/content descriptions.
  • Existing PauseDownloadUseCase and DownloadBookUseCase calls.

Server / API assumptions

No new API. Retry/resume continues through DownloadBookUseCase, which rechecks current profile download permission, asset metadata and allocatable storage before enqueueing.

Storage / migration implications

None. Retry must preserve .part data and committed files. Pausing remains a durable manifest state as today.

Privacy / security

No change to profile visibility. A hidden/title-redacted device-storage row may expose a generic recovery action/state but must not reveal media identity through error copy.

Automated-test level

  • ViewModel tests proving each recovery state calls exactly the intended use case.
  • Regression: Failed can never call PauseDownloadUseCase.
  • Regression: Paused Resume goes through DownloadBookUseCase, so authorization/free-space checks still run.
  • Compose/Robolectric semantics tests for action labels/content descriptions.
  • Verification summary test so the screen does not say 'offers a retry' when no Retry action exists.

Device / platform acceptance

  • Start a download and Pause it; process restart; row remains Paused and Resume works.
  • Force a non-retryable failure; row says Failed and offers Retry, not Pause.
  • Retry and confirm already-downloaded/partial bytes are retained and reused.

Estimated effort

Small.

Implementation risk

Low to Medium. It changes user-triggered state transitions and must not make destructive restart behavior the default.

After #17, before BW-DL-04.

Acceptance criteria

  • Running, Paused and Failed have distinct correct actions.
  • Failed -> Retry never passes through a fake Paused state.
  • Retry/Resume preserves valid partial/committed data.
  • Accessibility labels describe the action, not merely the icon.
  • Verification/recovery text matches the controls actually available.
> Migrated from [GitHub issue #108](https://github.com/AlexanderWilhelmsenBerg/Audiobookshelf-Manager-Claude/issues/108). Forgejo issue: #18. GitHub source content synchronized on 2026-09-19. Migrated issue references below use Forgejo numbers where an equivalent issue exists; historical references without a Forgejo counterpart remain explicit GitHub links. ## Classification Active follow-up from #15 / [GitHub PR #106](https://github.com/AlexanderWilhelmsenBerg/Audiobookshelf-Manager-Claude/pull/106). ## Problem / opportunity The current Downloads row shows a Pause icon for every incomplete row that is not `Paused`. That includes `DownloadState.Failed`. Pressing it calls `PauseDownloadUseCase`, which can turn a failed manifest into `Paused` and clear its stored failure reason instead of retrying. ## User value The action beside a download should always match what will happen: pause something that is actually transferring, resume something the listener paused, and retry something that failed. ## Scope - Drive row actions from the recovery/presentation state introduced by BW-DL-02. - Running -> Pause. - Paused -> Resume. - Terminal/recoverable Failed -> Retry. - Queued/waiting/retrying states must have an explicitly chosen action/disabled/no-action behavior rather than falling through to Pause by accident. - Update verification/recovery copy so it only promises Retry where Retry is actually available on that surface. - Preserve partial bytes on Retry/Resume. ## Explicitly out of scope - No WorkManager state adapter beyond what BW-DL-02 can represent; BW-DL-04 owns live constraint/backoff observation. - No removable-storage semantics. - No device-wide deletion changes. - No visual redesign unrelated to recovery actions. ## Dependencies - **BW-DL-02 / #17** — presentation/recovery state is the owner of which action applies. - Parent audit #15 / [GitHub PR #106](https://github.com/AlexanderWilhelmsenBerg/Audiobookshelf-Manager-Claude/pull/106). ## Architecture seams affected - `DownloadsViewModel` action routing. - `DownloadsScreen` row semantics/content descriptions. - Existing `PauseDownloadUseCase` and `DownloadBookUseCase` calls. ## Server / API assumptions No new API. Retry/resume continues through `DownloadBookUseCase`, which rechecks current profile download permission, asset metadata and allocatable storage before enqueueing. ## Storage / migration implications None. Retry must preserve `.part` data and committed files. Pausing remains a durable manifest state as today. ## Privacy / security No change to profile visibility. A hidden/title-redacted device-storage row may expose a generic recovery action/state but must not reveal media identity through error copy. ## Automated-test level - ViewModel tests proving each recovery state calls exactly the intended use case. - Regression: Failed can never call `PauseDownloadUseCase`. - Regression: Paused Resume goes through `DownloadBookUseCase`, so authorization/free-space checks still run. - Compose/Robolectric semantics tests for action labels/content descriptions. - Verification summary test so the screen does not say 'offers a retry' when no Retry action exists. ## Device / platform acceptance - Start a download and Pause it; process restart; row remains Paused and Resume works. - Force a non-retryable failure; row says Failed and offers Retry, not Pause. - Retry and confirm already-downloaded/partial bytes are retained and reused. ## Estimated effort Small. ## Implementation risk Low to Medium. It changes user-triggered state transitions and must not make destructive restart behavior the default. ## Recommended sequence After #17, before BW-DL-04. ## Acceptance criteria - Running, Paused and Failed have distinct correct actions. - Failed -> Retry never passes through a fake Paused state. - Retry/Resume preserves valid partial/committed data. - Accessibility labels describe the action, not merely the icon. - Verification/recovery text matches the controls actually available. ## Links - Parent audit: #15 - Audit PR: [GitHub #106](https://github.com/AlexanderWilhelmsenBerg/Audiobookshelf-Manager-Claude/issues/106) - Depends on: #17
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alexander/Audiobookshelf-Manager-Claude#18
No description provided.