Repository navigation
intent: a call dialog's record default no longer refills an input the user emptied (#8598) - #8604
Merged
Merged
Conversation
… user emptied (#8598) A call action's "{property}" default is read off the record asynchronously after the dialog opens, and openPrompt let it fill the input only while the input was EMPTY. An input the user emptied on purpose before the read came back was filled again, and Submit sent the record's old value instead of null. The store now tracks which inputs the user changed since the dialog opened (promptEdited, reset with promptBlurred on open and close), and the deferred fill skips any changed input, whatever its value. Every shell copy of the dialog marks a change from the per-input field wrapper (@input/@change, which bubble from every control in it): the application, admin, partner and personal shells, the generated shell template and the ShellRuntimeVintageIT fixture. A default sets the model and dispatches no event, so it never marks an input changed; Harmonia's select, date picker and number controls dispatch bubbling input/change only on user actions. Literal defaults and the handed-over-record pre-fill are unchanged. Verified: formatter:validate (cache wiped); CustomActionsCallIT (23, including a held-read store case and a check that every shell carries the listener); IntentCallActionSampleIT (6, including a new browser case that holds the record read, types and erases the input, releases the read and gets null at the endpoint, then shows the record's value when untouched); GeneratesPromptHarmoniaIT. Both new cases fail against the old condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Cause
A
call:action'sdefault: "{property}"is read off the record asynchronously after the dialog opens (openPromptincustomActions.js). The deferred fill was guarded by "the input is empty", so an input the user emptied on purpose before the read came back was filled again, and Submit sent the record's old value instead ofnull.Change
application-core/.../stores/customActions.js: new statepromptEdited(col.name → the user changed this input since the dialog opened), reset next topromptBlurredon open and on close. New methodpromptEdit(col). The deferred fill now tests!this.promptEdited[col.name]instead ofisEmptyInput(...), so the user's change decides, not the value.setPromptDefault, literal defaults and the handed-over-record pre-fill are unchanged.@input="s.promptEdit(col)" @change="s.promptEdit(col)"on the per-inputx-h-fieldwrapper: theapplication,admin,partnerandpersonalshells, the generatedindex.html.template, and theShellRuntimeVintageITfixture.input/changebubble from every control inside it.changeonly on option activation, and the number fieldinput/changeonly on its step buttons. The date picker's programmaticchangedoes not bubble. A default sets the model and fires no DOM event.This is not a DSL change: no key, default or refusal changes.
intent-dsl-features.mdalready promises that a record default fills "only an input the user has not touched", and this makes the shell keep that promise. So no spec, site or dirigible.io doc PRs.Verification
mvn -T 1C formatter:validatewith the formatter cache wiped: BUILD SUCCESS.CustomActionsCallIT(the store, polyglot): 23/23. New tests:aLateRecordDefaultSparesAnInputTheUserChangedholds the record read, then changes and empties the input. After the read is released the input stays empty and the request body is{"level":null}. Reopened and left alone, the input gets the record's value.everyShellReportsAChangedPromptInputchecks that all six dialog copies carry the listener.IntentCallActionSampleIT(browser): 6/6. NewSet capacityaction onTeam(integercapacity, default"{capacity}"). The new caseaLateRecordDefaultSparesAnInputTheUserEmptiedholds the record read in the page, types7and Backspace into the number input, releases the read, and checks the input stays empty and the endpoint getscapacity: null. As a control it reopens the dialog untouched, releases the read, and checks the input shows5. The existing intent: a call action's dialog says what it acts on - description with the record, submit label, multiselect input, defaults and help #8296 / intent: a call dialog may open with a record's child rows ticked - default: "{skills.skill}" names a listed collection path #8323 journey stays green.setValue(""). WebDriver'sclear()fireschangeandblurbut noinput, sox-modelnever sees it and the case would not test the bug. Because the read is held, the input is still empty, so select-all + Backspace alone would change nothing and fire noinput. The case types7and erases it instead, which firesinputtwice.GeneratesPromptHarmoniaIT: 1/1.isEmptyInputand re-ran: the store test sees3instead of empty, and the browser test sees the input atvalue="5".Not run: the full IT suite, PostgreSQL, and Windows (front-end-only change). The multiselect default case (#8323) is covered only by the existing journey in
IntentCallActionSampleIT, which passed.Fixes #8598
🤖 Generated with Claude Code