Ask user whether to init a new repo if adding existing repo fails#2483
Open
LY871 wants to merge 1 commit intoborgbase:masterfrom
Open
Ask user whether to init a new repo if adding existing repo fails#2483LY871 wants to merge 1 commit intoborgbase:masterfrom
LY871 wants to merge 1 commit intoborgbase:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a user attempts to add an existing repository but the connection fails (e.g., the folder is not a valid Borg repository), the application now intercepts the error and prompts the user via a QMessageBox. This prompt offers the option to initialize a new repository at that location immediately, improving the onboarding flow for new users.
Related Issue
Closes #1799
#1799
Motivation and Context
Currently, if a user points Vorta to a non-initialized folder, they simply receive an error message. This change reduces friction by suggesting the logical next step
How Has This Been Tested?
Environment: WSL2 (Ubuntu 22.04) running Vorta in a Python 3.12 virtual environment.
Test Case 1: Attempted to add an empty directory. Verified that the "Repository Not Found" dialog appeared.
Test Case 2: Clicked "Yes" on the dialog. Verified that it successfully triggered the new_repo workflow.
Test Case 3: Clicked "No" on the dialog. Verified that the standard error status message was displayed.
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.