…ld [MST-16146]
QuickFormField now renders every value mode itself. Variable mode is a
picker over `variables` (VariableValueControl), and prompt mode is a
PromptValueControl in the agent-tinted InputGroup, which grows with it.
`renderModeControl` still replaces the control for any mode.
- `valueModes` lists the modes the built-in menu offers, in order. It
defaults to literal and expression, as before.
- `confirmModeChange(from, to)` asks before a switch the consumer knows
is lossy, through ValueModeSwitchDialog. It returns true, false, or the
dialog's wording.
- A variable-mode pick goes to `onInsertVariable` when supplied, with the
consumer's own entry, so a consumer can adopt its type. The header's
Insert action is hidden while the picker is the value control.
- VariableValueControl's `onChange` also gets the picked entry when its
own picker made the pick. A host picker reports only the reference, so
its pick has none.
- Multi-select keeps to one row with `overflow="collapse"`.
- New strings: `valueModes` (ValueModeStrings), `multiSelect`
(MultiSelectStrings), and the multi-select's search, empty and
Clear all text.
- Clear value is styled as destructive.
- Focus on a mode switch waits a frame: a popover trigger remounts once
its anchor registers, which dropped focus given straight away.
- The menu and the confirm dialog leave focus on the new control as they
close, instead of returning it to the trigger after their exit
animation. FieldMenu and ValueModeSwitchDialog gain `onCloseAutoFocus`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
QuickFormFieldnow renders every value mode itself, so a consumer no longer has to supply its own variable and prompt controls throughrenderModeControl(MST-16146, items 1, 6, 7, 12 and 16).valueModeslists the modes the built-in menu offers, in order. It defaults to Fixed value and Expression, as before. With fewer than two modes the menu offers no switch.variables, usingVariableValueControl.onInsertVariableis supplied, a pick goes there with the consumer's own entry (type included) andcaret: null, so a consumer can adopt the variable's type. Otherwise it callsonValueChange.onInsertVariable.VariableValueControl'sonChangenow also receives the picked item, as a second argument.PromptValueControlin anInputGroupwithvariant="agent", which grows with the prompt.confirmModeChange(from, to)asks before a switch the consumer knows would lose the value, usingValueModeSwitchDialog. It returnsfalse,true, or the dialog's wording. Picking the active mode never asks.overflow="collapse"and shows the rest as "+N more".valueModes(ValueModeStrings),multiSelect(MultiSelectStrings), and the multi-select's search, empty and Clear all text.renderModeControlstill replaces the control for any mode.Decisions worth a look
renderModeControl.PopoverTriggerremounts once its anchor registers, which dropped focus given straight away to the variable trigger.Demo
Screen.Recording.2026-10-21.at.5.32.41.PM.mov
Test plan
confirmModeChangepath, and the new stringsStack
🤖 Generated with Claude Code