Skip to content

Ask user whether to init a new repo if adding existing repo fails#2483

Open
LY871 wants to merge 1 commit intoborgbase:masterfrom
LY871:master
Open

Ask user whether to init a new repo if adding existing repo fails#2483
LY871 wants to merge 1 commit intoborgbase:masterfrom
LY871:master

Conversation

@LY871
Copy link
Copy Markdown

@LY871 LY871 commented Mar 28, 2026

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

  • [x ] 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 change)

Checklist:

  • [ x] I have read the CONTRIBUTING guide.
  • [ x] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • [ x] All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

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.

FR: Ask user whether to init a new repo if adding existing repo fails

1 participant