Repository navigation
Task modal: show a failed form fetch's reason instead of hanging - #2091
Merged
Merged
Conversation
Forum topic 18314. Capture on a host with no image left "Create new
tasking" on "Loading, please wait..." for good. ?sub=deploy answers 400
"Assigned image is invalid", and the error handler called
modal('hide') inside Bootstrap 5's show transition, which drops it.
The group Tasks tab did not try to hide at all, and hung the same way.
$.taskFormFailed ends the loading state and writes the escaped reason
into the modal, as $.registerMassEdit already does. The host Tasks
tab, the group Tasks tab and the task list re-deploy all use it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAdRb4vjzwmwYP54GuG1dH
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.
Problem
Forum topic 18314 (1.6.0.14). On a host with no image, Tasks > Capture opens "Create new tasking", and the modal stays on "Loading, please wait..." for good.
?node=host&sub=deployanswers 400{"error":"Assigned image is invalid"}. The error handler calledtaskModal.modal('hide'). Bootstrap 5 drops ahide()that lands inside the show transition, and the 400 comes back faster than the fade. So the modal stayed open, and only a toast said why.The same handler is on the task list's Recent re-deploy. The group Tasks tab did not try to hide the modal at all, and hung the same way.
Change
$.taskFormFailedinfog.common.jsends the loading state, sets the title, writes the escaped reason into the modal as a red alert, and shows the toast.$.registerMassEditalready fixed the same race this way.The reporter also asked for Deploy and Capture to be greyed out on a host with no image. This PR does not do that. The modal now states the reason, which removes the confusion.
Tests
tests/task-form-error-stays-in-modal.test.phppins each page's error handler and the helper. It goes red when any of the three handlers is put back to the old code.tests/run-all.sh: 484 passed, 0 failed.page.route(). Nothing was deployed:🤖 Generated with Claude Code
https://claude.ai/code/session_01JAdRb4vjzwmwYP54GuG1dH