Skip to content

Add-on store: fix download pending install status loss#14992

Merged
seanbudd merged 4 commits into
masterfrom
addonStoreFixPendingInstallStatusLoss
Jun 20, 2023
Merged

Add-on store: fix download pending install status loss#14992
seanbudd merged 4 commits into
masterfrom
addonStoreFixPendingInstallStatusLoss

Conversation

@seanbudd

@seanbudd seanbudd commented Jun 9, 2023

Copy link
Copy Markdown
Member

Link to issue number:

Based on #15021
Fixes #14978

Summary of the issue:

Downloading and installing an add-on follows these steps:

  1. Download and install is triggered by the user
  2. Download begins and writes to addonStore/_dl/addonId.download
  3. Download completes, and the file is renamed and cached addonStore/_dl/addonId-1.23.nvda-addon
    i. if you change tab here, the add-on state can be lost
  4. User exits NVDA add-on store
  5. Add-on installation is triggered, add-on is unzipped and written to addons/addonId.pendingInstall
  6. User is prompted to restart
  7. On restart addons/addonId.pendingInstall is installed to addons/addonId

When changing tabs before exiting the add-on store, the state "download pending install" is lost.

Description of user facing changes

When changing tabs before exiting the add-on store, the state "download pending install" is no longer lost.

Description of development approach

The pending install state check was updated for the add-on store add-on model to include checks for download state.
Add-ons that are downloaded pending install should now be treated as if they are pending install.

The add-on state determiner now returns the correct state for add-ons which are downloaded but yet to start the install process.

Testing strategy:

Test STR described in issue

Known issues with pull request:

N/A

Change log entries:

N/A

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@seanbudd seanbudd requested a review from a team as a code owner June 9, 2023 02:22
@seanbudd seanbudd requested a review from michaelDCurran June 9, 2023 02:22
Comment thread source/NVDAState.py
@michaelDCurran

michaelDCurran commented Jun 10, 2023

Copy link
Copy Markdown
Member

Additionally, a new datastructure was created to encapsulate all the paths NVDA writes to in globalVars.appArgs.configPath, to easy with discovery.

Is this change absolutely necessary to fix the download status issue? This seems to be a secondary change yet takes up the vast majority of the pr. Is it possible to split this into a separate pr if this is not necessary for the main issue?

@seanbudd seanbudd marked this pull request as draft June 13, 2023 07:59
@seanbudd seanbudd force-pushed the addonStoreFixPendingInstallStatusLoss branch from aa64481 to a9c8cf8 Compare June 19, 2023 01:45
@seanbudd seanbudd changed the base branch from master to createCentralWritePaths June 19, 2023 01:55
@seanbudd seanbudd marked this pull request as ready for review June 19, 2023 01:59
@seanbudd seanbudd added blocked and removed blocked labels Jun 19, 2023
Base automatically changed from createCentralWritePaths to master June 20, 2023 00:17
@seanbudd seanbudd merged commit f6ac801 into master Jun 20, 2023
@seanbudd seanbudd deleted the addonStoreFixPendingInstallStatusLoss branch June 20, 2023 01:13
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Jun 20, 2023
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.

after downloading an add-on from the add-on store and switching to another tab, the add-on status is reset.

3 participants