Repository navigation
intent: a call action's dialog says what it acts on - description with the record, submit label, multiselect input, defaults and help (#8296) - #8305
Merged
Conversation
…h the record, submit label, multiselect input, defaults and help (#8296) The #8090 dialog was generic: it never named the record it acted on, its button always said Run, a choice of several values had to be one boolean per value, no input could open with a value, and none could explain itself. - ActionIntent gains description: and submit:; ActionPromptIntent gains default:, help: and options:, and the multiselect type (options as { value, label?, help? } or a bare string). - The parser normalises bare options and unquoted date defaults on the raw tree, and refuses: an unknown {property} in description/confirm/default (fields, to-one relations and a label:'s Name are properties), any placeholder on scope: page, options on another type, a multiselect without options, a literal default that does not fit its type or names no option, and description/submit on a page action. - The descriptor carries description, submit and recordFields (property plus, for a to-one, the lookup of its display text, shared with the create-from prompt via PromptColumns.toOneLookup); PromptColumns.declared emits the MULTISELECT widget with options, help and default. Every key only when declared, so existing models generate byte-identical descriptors. - customActions.js fills literal and record defaults, resolves the description and confirm placeholders against the clicked record, sends a MULTISELECT as a JSON array in options order ([] when nothing ticked) and refuses a required one left empty. - The dialogs in all five shells (generated index.html.template, application, admin, partner, personal) show the description, the submit caption, help lines, the multiselect group, and a checkbox whose caption sits beside it and toggles it. Verified: engine-intent unit suite (1892 green, incl. new CallActionIntentTest / CallActionDescriptorTest cases); CustomActionsCallIT, IntentCallActionSampleIT (browser, the issue's Invite example end to end), GeneratesPromptHarmoniaIT, ShellRuntimeVintageIT, HarmoniaContractIT; formatter:validate with the cache wiped; release-profile javadoc on engine-intent. 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
The
call:action dialog (#8090) was generic. It never named the record it acted on, and its button always said Run. A choice of several values had to be one boolean per value, with "at least one" unenforceable. No input could open with a value, and none could explain itself.Change
Implements decisions 1-6 of the issue as written.
DSL (
engine-intent)ActionIntentgainsdescription:andsubmit:.ActionPromptIntentgainsdefault:,help:,options:and themultiselecttype. A newActionPromptOptionIntentholds{ value, label?, help? }; a bare string is its own value and label.IntentParser.normalizeActionPromptsexpands bare options on the raw tree. It also keeps an unquoted date default as ISO text; SnakeYAML would otherwise hand Gson ajava.util.Date.validateActionCall. Every message names the action and the key. The parser refuses:{property}indescription,confirmor a recorddefault. Fields, to-one relations and theNamealabel:generates are properties, resolved by the newActionPlaceholders;scope: page;optionson a non-multiselect, and a multiselect without them;descriptionorsubmiton a page action.description,submitandrecordFields. EachrecordFieldsentry is{property, lookup?}, wherelookupreads a to-one's display text.PromptColumns.toOneLookupwas extracted from the create-from prompt's column code and is shared by both.PromptColumns.declaredemits theMULTISELECTwidget with itsoptions,helpanddefault. Every key is emitted only when declared, so a model without them generates byte-identical descriptors.Shell
customActions.js:openPromptfills literal defaults at once and record defaults when they resolve, but only into an input still empty.describefillsdialogDescriptionandconfirmTextfrom the clicked record. A to-one is fetched for its display text; a property the record lacks renders empty.typedInputsends a MULTISELECT as a JSON array in options order,[]when nothing is ticked.promptRuntreats an empty array as a missing required input.index.html.templateand theapplication,admin,partnerandpersonalshells.x-h-dialog-descriptionunder the title.submit(default "Run").helpis anx-h-field-descriptionline.x-h-fieldsetof horizontalx-h-fields, each option's label beside its box with its help under it.for). This applies to the dialog only; generated forms are unchanged.Docs
intent-assistant-guide.md§call:and.claude/docs/intent-dsl-features.md.Verification
engine-intentunit suite: 1892 tests, all green. New cases:CallActionIntentTest:aMultiselectNeedsOptionsAndAKnownDefault,optionsOnAnotherTypeAreRefused,aDescriptionPlaceholderMustNameAPropertyOfTheEntity,aDefaultMustFitItsType, plus bare options, ISO date defaults, labelName, and page-action refusal.CallActionDescriptorTest: the description, submit and inputs,recordFieldswith the to-one lookup, and that the existing actions emit none of the new keys.CustomActionsCallIT(the shipped store in GraalJS):"{roles}"sent as["Member","Lead"]in options order and[]when nothing is ticked; a required multiselect refused before any request; literal and{property}defaults fill the dialog; the description and confirm text resolved against the record, a to-one by its display text.IntentCallActionSampleIT(browser): the issue's Invite example on aTeam. The description names the team, the help lines show and Member is pre-ticked. Clicking the caption Lead ticks it, the button reads Invite, and the controller receivesroles: ["Member", "Lead"].GeneratesPromptHarmoniaITandShellRuntimeVintageIT: the shared prompt dialog and store, including an older generated page against the new runtime.HarmoniaContractIT: everyx-h-*directive and utility class used is one Harmonia 3.6.2 ships.mvn -T 1C formatter:validatewith the formatter cache wiped: BUILD SUCCESS.engine-intent: BUILD SUCCESS.Not run locally: the full IT suite, and the PostgreSQL leg. The change touches no SQL.
Fixes #8296
🤖 Generated with Claude Code