Steps to reproduce:
- Open Unity Hub
- In the Projects tab, click Add > Add from repository
- Select Gitub or GitLab as Source control provider and Authorize token
- Select any repository
- Disconnect the Personal Authorization Token
- Observe "Detecting Unity projects..." with loading indicator is shown
- While it is still loading, click on "Add project" button
- Observe the task appears in Hub
- Try to cancel the task
- Observe the behavior
Actual results: The task appears stuck and cannot be canceled. The "Add project" button remains active after the token is disconnected, and if the button is not clicked, Hub shows "Failed to detect Unity projects in this repository and branch."
Expected results: Disconnecting the token should immediately reset and disable all dependent fields, including the "Add project" button and a clearer error message should be shown
Reproducible with versions: 3.17.2
Tested on (OS): macOS 26.4, Ubuntu 24.04
Notes:
- The error "Failed to detect Unity projects in this repository and branch." is not very informative in this case. A message such as "Personal access token is no longer valid. Please reauthorize to continue." would better reflect the actual problem