-
Notifications
You must be signed in to change notification settings - Fork 142
fix: display errors when adding a new repo #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1120 +/- ##
==========================================
+ Coverage 79.62% 81.30% +1.67%
==========================================
Files 59 59
Lines 2479 2461 -18
Branches 289 279 -10
==========================================
+ Hits 1974 2001 +27
+ Misses 461 416 -45
Partials 44 44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andypols Looks great, thanks for the contribution! 🚀
Our E2E tests are pretty barebones so any improvements here are much appreciated! I just have some minor things to point out - will likely open a few issues for these!
Signed-off-by: Juan Escalada <[email protected]>
Summary
This PR fixes a bug where the client silently ignored server-side errors when adding a new repository. As a result, users were led to believe the repository was added successfully, only to see it disappear upon refreshing the page.
Root Cause
The
NewRepo.tsx
component (src/ui/views/RepoList/Components/NewRepo.tsx
) always closed the modal, regardless of whether the server request succeeded or failed.Fix
Display server errors returned by addRepo in
src/ui/services/repo.js
.Extended Cypress tests to:
Notes
Adding unit tests for the React components is desirable but considered out of scope for this PR.