Skip to content

Enhance batch archive extraction and improve navigation UX - #385

Open
ScottRFrost wants to merge 4 commits into
Ruben2776:devfrom
ScottRFrost:Improve-Archive-Loading
Open

Enhance batch archive extraction and improve navigation UX#385
ScottRFrost wants to merge 4 commits into
Ruben2776:devfrom
ScottRFrost:Improve-Archive-Loading

Conversation

@ScottRFrost

@ScottRFrost ScottRFrost commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

I was pretty happy with the new 'Navigation > Always uncompress entire archive folder' feature I added in my last PR, but I wanted to improve it further. In the last version, when you had the new option checked it would extract the whole archive, but the UI would block with a spinner while it was extracting. In the new version, it now uncompresses the first 10 images, then unblocks the UI so you can start viewing them while the remaining images are uncompressed in batches of 10 with a small status indicator in the bottom right corner.

Obviously up to @Ruben2776 but I think this feature is ready to be enabled by default, as it makes image archive / comic viewing a much better experience.

Motivation and Context

The primary motivation was that waiting for the entire archive to uncompress made the user wait unnecessarily. With the new batch decompression, the user can begin viewing the images in the archive almost immediately, while the rest of the archive decompresses in the background.

How Has This Been Tested?

All tests were updated to work with the new logic. New tests were added to cover. I also ensured that the default path (with the Always uncompress entire archive folder option disabled) was unaffected and worked the same as before.

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Refactor archive extraction to improve performance and UX: introduce ExtractEntriesAsync (and an ExtractEntryAsync wrapper) to extract multiple entries with a single archive open, and make PrepareArchiveAsync return ordered entry keys for staged extraction. NavigationService now shows a loading indicator, seeds the iterator with up to 10 extracted files for immediate viewing, and extracts the rest in the background. ImageTitleFormatter guards FileInfo.Exists before accessing Length. Update and add tests for the new extraction flow and navigation behavior.
Adds archive extraction progress tracking and background extraction scheduling for archive content loading. The navigation and file watcher flow now waits for newly extracted files and updates navigation state while archive imports are in progress. File picker and save operations are guarded against missing UI/storage providers, and several tests were serialized to avoid interference in headless/parallel execution.
The archive navigation flow now stages the first extracted item(s) for immediate viewing while background extraction continues, and navigation checks allow moving past the final extracted entry during staged extraction. Cleanup logic was tightened to avoid canceling the active extraction token when deleting old temp directories, and the UI progress indicator now follows the actual archive progress text instead of the raw extraction state. Tests cover both the full-archive and staged-archive paths.
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.

2 participants