[BW-DL-02] Expose safe download failure reason and recovery presentation state #17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Classification
Implementation-ready follow-up from completed audit #15. Unblocked.
Problem / opportunity
BookWave already persists
DownloadedBookEntity.failureSummaryandDefaultDownloadRepository.markFailed(...)writes a safeAppError.summary, butDownloadMappers.toDomaindrops that field andOfflineBookcannot carry it. The Downloads UI therefore knows onlyisFailed, not why the transfer stopped.At the same time, durable manifest state and transient WorkManager execution state answer different questions. The UI needs a named presentation policy before later slices add Wi-Fi/backoff state.
User value
A failed or interrupted download can explain the problem in actionable language while preserving partial bytes and existing download correctness semantics.
Scope
Explicitly out of scope
Dependencies
None remaining. Parent audit #15 is completed. GitHub PR #106 was planning-only and closed without merge.
Architecture seams affected
core:modeldownload model or an equivalent domain-facing safe failure representation.data:downloadsentity -> domain mapping.DownloadsViewModelpresentation projection.Server / API assumptions
No new Audiobookshelf API. The persisted failure text must continue to derive from BookWave's sanitized
AppError.summary, not raw server bodies.Storage / migration implications
No Room migration should be required for the failure reason:
failureSummaryis already stored indownloaded_books.If the implementation proposes any other durable field, justify it separately rather than expanding this slice by default.
Privacy / security
Automated-test level
Device / platform acceptance
No special hardware is required for the core slice. A normal device smoke test should confirm a forced non-retryable failure shows the intended safe explanation without losing partial data.
Estimated effort
Small to Medium.
Implementation risk
Low. The main risk is accidentally turning a presentation need into a second durable state machine.
Recommended sequence
Acceptance criteria
Links