Conversation
In Upload to Webonary dialog, Submit stayed enabled with Site name, Username, or Password blank. Clicking Submit started an upload that the controller refused immediately, but the refusal only reached the upload log, and the progress bar was left in marquee style, so the dialog appeared to upload forever. Gate Submit on all three fields, and complete a refused upload so the dialog stops showing one as running when a publication or configuration is missing.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1112 +/- ##
==========================================
+ Coverage 38.35% 38.43% +0.08%
==========================================
Files 1507 1507
Lines 350617 350661 +44
Branches 40298 40307 +9
==========================================
+ Hits 134471 134787 +316
+ Misses 186916 186641 -275
- Partials 29230 29233 +3
🚀 New features to boost your workflow:
|
UploadCompleted flushes the upload log before the report reads it. The flush waited on the background write tasks unguarded, so a failed write raised AggregateException from the finally block of UploadToWebonary, where it would replace the exception already propagating and escape the upload entirely. The queued tasks are never cleared, so one failed write resurfaced on every later flush in the session. Make the flush best effort. A caller flushing the log cannot recover from a failed write, and losing log content must not lose what it describes.
A credential of only whitespace passed the upload guards, and a padded site name reached Webonary as a URL path segment and as a directory name, both of which carried the padding along. Widen the site name, user name, and password guards to reject blank values, and trim the site name when it is normalized. A null or blank site name now normalizes to empty, which the guards report as missing. Publication and configuration stay on an emptiness test, since they are selections rather than typed entries.
| { | ||
| publishButton.Enabled = !string.IsNullOrWhiteSpace(webonarySiteNameTextbox.Text) | ||
| && !string.IsNullOrWhiteSpace(webonaryUsernameTextbox.Text) | ||
| && !string.IsNullOrWhiteSpace(webonaryPasswordTextbox.Text); |
There was a problem hiding this comment.
I would validate this assumption that a webonary password can't be just whitespace. Eg if my password is " " then I can no longer login. If Webonary prevents you from using a password which is empty then that's maybe ok, but that could change in the future and should probably just be handled by the case where auth fails.
There was a problem hiding this comment.
Good catch, I'll fix this for password and username for same reason.
There was a problem hiding this comment.
This is fixed now.
| { | ||
| publishButton.Enabled = !string.IsNullOrWhiteSpace(webonarySiteNameTextbox.Text) | ||
| && !string.IsNullOrWhiteSpace(webonaryUsernameTextbox.Text) | ||
| && !string.IsNullOrWhiteSpace(webonaryPasswordTextbox.Text); |
There was a problem hiding this comment.
Good catch, I'll fix this for password and username for same reason.
The user name and password guards rejected a value of only whitespace. Webonary may not do the same, so we need to allow whitespace values. Treat only an empty credential as absent. The site name keeps rejecting whitespace, since it is normalized into a URL path segment and a directory name rather than passed through.
Comment hygiene (advisory)No comment-style violations in the lines this branch adds since |
| { | ||
| publishButton.Enabled = !string.IsNullOrWhiteSpace(webonarySiteNameTextbox.Text) | ||
| && !string.IsNullOrWhiteSpace(webonaryUsernameTextbox.Text) | ||
| && !string.IsNullOrWhiteSpace(webonaryPasswordTextbox.Text); |
There was a problem hiding this comment.
This is fixed now.
Quick Summary
In Upload to Webonary dialog, Submit stayed enabled with Site name, Username, or Password blank. Clicking Submit started an upload that the controller refused immediately, but the refusal only reached the upload log, and the progress bar was left in marquee style, so the dialog appeared to upload forever.
Gate Submit on all three fields, and complete a refused upload so the dialog stops showing one as running when a publication or configuration is missing.
CI-ready checklist
.github/commit-guidelines.md.build.ps1,test.ps1, or MSBuild).Docs/workflows/ai-pr-workflow.mdand ranpr-preflightor the equivalent branch-readiness review before requesting review.Src/**folders touched, correspondingAGENTS.mdfiles are updated or explicitly confirmed still accurate.Notes for reviewers (optional)
This change is