Repository navigation
fix(ui): send the Show Changes prompt when launching a job - #1128
Open
MateusRoscoe wants to merge 1 commit into
Open
MateusRoscoe wants to merge 1 commit into
MateusRoscoe wants to merge 1 commit into
Conversation
The launch wizard never added diff_mode to the launch request, so turning Show Changes on at launch had no effect. The toggle also stored the Switch change event instead of its checked state, which left it stuck on once clicked. related ctrliq#1127 Assisted-by: Claude Opus 5.5 Signed-off-by: Mateus Roscoe <mateusroscoe2@gmail.com>
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.
SUMMARY
Assisted-by: Claude Opus 5.5. Drafted with AI assistance; the commit carries the same trailer.
With Prompt on launch enabled for Show Changes, turning the toggle on in the launch wizard had no effect: the job ran with
diff_mode: falseand without--diff. There were two causes, and this fixes both:handleSubmitinLaunchPrompt.tsxbuilds the launch request field by field and never addeddiff_mode. It now postsdiff_modenext toverbosity, in the same way as the other prompted fields.LaunchPromptValuesgains thediff_mode?: booleanfield.ShowChangesToggleinOtherPromptsStep.tsxpassed the form setter straight to PatternFly'sSwitch(onChange={helpers.setValue}).SwitchcallsonChange(event, checked), so the field held the change event. An object is truthy, so the switch stayed on once clicked and could not be turned off. It now storeschecked, and its label shows On or Off, as the Show Changes switch on the job template form already does.The API side needs no change. It already applies a prompted
diff_modewhen it is posted.Fixes #1127
ISSUE TYPE
COMPONENT NAME
ASCENDER VERSION
ADDITIONAL INFORMATION
New tests:
OtherPromptsStep.test.tsx:should turn show changes on and off againclicks the switch on and then off, and checks its state after each click.LaunchPrompt.test.tsx:should launch with show changes when it is turned onandshould launch without show changes when it is left offgo through the wizard to Launch, and check thatonLaunchreceivesdiff_mode: trueanddiff_mode: falserespectively.