Skip to content

Allow reader Retry after image decode failures - #3770

Open
rodrigdoliveira wants to merge 1 commit into
mihonapp:mainfrom
rodrigdoliveira:agent/retry-reader-decode-failure
Open

Allow reader Retry after image decode failures#3770
rodrigdoliveira wants to merge 1 commit into
mihonapp:mainfrom
rodrigdoliveira:agent/retry-reader-decode-failure

Conversation

@rodrigdoliveira

Copy link
Copy Markdown

Summary

  • always return a reader page to the queue when the user presses Retry
  • cover the ready-page case with a focused unit test

Problem

A page can finish downloading and enter Page.State.Ready, then fail while the reader is decoding or displaying its image.

HttpPageLoader.retryPage() currently changes the page back to Queue only when its state is Error. For a display failure on an otherwise ready page, Retry adds the page to the priority queue without changing it back to a loadable state. The loader can then skip the new image request.

Change

Retry now unconditionally sets the selected page to Page.State.Queue before placing it in the retry queue.

The method is only called from the reader's explicit Retry action, so this keeps the existing forced-reload behavior while also covering failures that happen after the download was marked ready.

Validation

  • ./gradlew spotlessCheck
  • ./gradlew :app:testDebugUnitTest
  • focused test starts with a ready page, calls Retry, and verifies that the source is asked for the image again

No reader UI or normal page-loading behavior is changed.

@rodrigdoliveira
rodrigdoliveira marked this pull request as ready for review August 15, 2026 13:53
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