Skip to content

intent: a call dialog's record default no longer refills an input the user emptied (#8598) - #8604

Merged
iliyan-velichkov merged 1 commit into
masterfrom
issue-8598-call-dialog-edited-input
Nov 13, 2026
Merged

iliyan-velichkov merged 1 commit into
masterfrom
issue-8598-call-dialog-edited-input

Conversation

@iliyan-velichkov

@iliyan-velichkov iliyan-velichkov commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Cause

A call: action's default: "{property}" is read off the record asynchronously after the dialog opens (openPrompt in customActions.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 of null.

Change

  • application-core/.../stores/customActions.js: new state promptEdited (col.name → the user changed this input since the dialog opened), reset next to promptBlurred on open and on close. New method promptEdit(col). The deferred fill now tests !this.promptEdited[col.name] instead of isEmptyInput(...), so the user's change decides, not the value. setPromptDefault, literal defaults and the handed-over-record pre-fill are unchanged.
  • All six copies of the prompt dialog get @input="s.promptEdit(col)" @change="s.promptEdit(col)" on the per-input x-h-field wrapper: the application, admin, partner and personal shells, the generated index.html.template, and the ShellRuntimeVintageIT fixture. input/change bubble from every control inside it.
  • I checked Harmonia 3.7.1's source so the listener can't mark an input changed on its own. The select dispatches change only on option activation, and the number field input/change only on its step buttons. The date picker's programmatic change does 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.md already 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:validate with the formatter cache wiped: BUILD SUCCESS.
  • CustomActionsCallIT (the store, polyglot): 23/23. New tests:
    • aLateRecordDefaultSparesAnInputTheUserChanged holds 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.
    • everyShellReportsAChangedPromptInput checks that all six dialog copies carry the listener.
  • IntentCallActionSampleIT (browser): 6/6. New Set capacity action on Team (integer capacity, default "{capacity}"). The new case aLateRecordDefaultSparesAnInputTheUserEmptied holds the record read in the page, types 7 and Backspace into the number input, releases the read, and checks the input stays empty and the endpoint gets capacity: null. As a control it reopens the dialog untouched, releases the read, and checks the input shows 5. 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.
  • How the browser case clears the input, per the issue's correction: through the keyboard, never Selenide's setValue(""). WebDriver's clear() fires change and blur but no input, so x-model never 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 no input. The case types 7 and erases it instead, which fires input twice.
  • GeneratesPromptHarmoniaIT: 1/1.
  • Both new cases fail against the old condition. I temporarily restored isEmptyInput and re-ran: the store test sees 3 instead of empty, and the browser test sees the input at value="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

… 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>
@iliyan-velichkov
iliyan-velichkov merged commit 34fcda7 into master Nov 13, 2026
16 checks passed
@iliyan-velichkov
iliyan-velichkov deleted the issue-8598-call-dialog-edited-input branch November 13, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

intent: a call dialog's input emptied before its record default arrives is filled again - the user's change, not an empty value, should stop the default

1 participant