Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Show progress if export is already running #50

Merged

Conversation

idpaterson
Copy link
Contributor

@idpaterson idpaterson commented Dec 22, 2023

Balance and transaction exports continue to run in the background when the popup is closed or the back button is clicked as long as Mint is still open. However, the download buttons that you see on the main popup screen clear the existing state and start a new export. Now we have two balance exports running simultaneously and the progress bar jumps erratically between the first and second export job progress.

This pull request simply shows the progress screen for those download tasks if a job is already running. Since it is possible for a job to get hung up and never finish the extension will show the error screen after a certain period of inactivity. There is probably a more idiomatic way to accomplish that than a setTimeout(), but it works.

The "abandoned job" state can be tested easily with the unpacked extension.

  1. Start an export for all account balance history
  2. Go to chrome://extensions in a separate tab
  3. Press the reload button next to the extension which will kill the service worker but not reset the state
  4. Open the popup and wait for the error screen to appear

@oaosman84 oaosman84 merged commit a3f9f27 into monarchmoney:main Dec 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants