Skip to content

Commit 6a959c5

Browse files
committed
feat(spec): the submitText ledger row goes live and the Studio action form offers it
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzPbVCsG2npDkDqikd
1 parent 153ef58 commit 6a959c5

10 files changed

Lines changed: 21 additions & 20 deletions

File tree

‎packages/spec/liveness/action.json‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
"note": "Added #7367 — the RENDERER half predates the key by design: the consumer chain above shipped while `ActionSchema` (strictObject) refused `description`, so no producer could reach it (the mirror image of declared-but-unenforced). Live from the moment this key exists: the dialog reads `action.description` directly, no second input required. Mechanism for the 2026-08-10 ruling on #7278 — an action with `params` carries its confirm question here instead of in `confirmText`, so one decision is one dialog. Moved out of spec source, #23434: packages/spec/src/ui/action.zod.ts (this key's docblock) and packages/spec/src/system/translation.zod.ts (the translation slot's comment) cited this chain by line, sha-less. Re-read at objectui @b9814b334 on 2026-10-15: the object-then-global fallback both described, and this entry's evidence with them, is gone — objectui#11439 retired it, so the client resolves one bundle entry the way packages/spec/src/system/i18n-resolver.ts#actionTranslationNode does."
1818
},
1919
"submitText": {
20-
"status": "planned",
21-
"verifiedAt": "2026-10-30",
22-
"authorWarn": true,
23-
"authorHint": "Keep it, but nothing reads it yet: no console draws an action's `submitText`, so the param dialog's button still says \"Confirm\" until the console's param dialog reads the key.",
24-
"evidence": "packages/spec/src/system/i18n-resolver.ts#translateAction overlays the translated `objects.{o}._actions.{a}.submitText` (or `globalActions.{a}.submitText`) onto the served action when it declares `params`; packages/spec/src/system/translation.zod.ts declares the translation slot; packages/lint/src/validate-translation-references.ts#checkActionSubmitText refuses a translation under an action with no `params`.",
25-
"note": "PLANNED until the console half of #27944 lands (spec PR first, console card second). The framework half is live — parse, blank refusal, the refusal without `params`, translation slot, translateAction overlay, the dangling-translation lint — but no renderer reads the key yet: ui/packages/app-shell/src/views/ActionParamDialog.tsx still draws `actionDialog.confirm`, fed by the two param-collection handlers (ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx#paramCollectionHandler, ui/packages/app-shell/src/views/RecordDetailView.tsx#paramCollectionHandler). `authorWarn` is set because an author who writes the key today sees \"Confirm\", not their verb. The console PR flips this row to `live` with those read points, and drops `authorWarn` / `authorHint` in that same edit (a warned `live` row reds this gate, #21127)."
20+
"status": "live",
21+
"verifiedAt": "2026-10-31",
22+
"evidenceScope": "in-repo",
23+
"evidence": "ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx#paramCollectionHandler and ui/packages/app-shell/src/views/RecordDetailView.tsx#paramCollectionHandler (the two param-collection handlers: the bundle's `objects.{o}._actions.{a}.submitText`, or `globalActions.{a}.submitText` for an object-less action, through `actionSubmitText`, then the authored `I18nLabel` collapsed to the active language); ui/packages/app-shell/src/views/ActionParamDialog.tsx (draws it on the submit button, `actionDialog.confirm` when absent, `actionDialog.uploading` while a file uploads); ui/packages/components/src/renderers/action/action-button.tsx, ui/packages/components/src/renderers/action/action-icon.tsx, ui/packages/components/src/renderers/action/action-group.tsx, ui/packages/components/src/renderers/action/action-menu.tsx (the four action renderers forward it to the runner); ui/packages/core/src/actions/ActionRunner.ts#ActionDef (the key derived from the spec); packages/spec/src/system/i18n-resolver.ts#translateAction (the served overlay); packages/lint/src/validate-translation-references.ts#checkActionSubmitText (a translation under an action with no `params` is refused)",
24+
"note": "LIVE since #28158 (the console half of #27944). An action that collects `params` names its own submit verb (\"Send\", \"Log Call\"): the param dialog's submit button draws the translated or authored `submitText` and falls back to \"Confirm\" when the action declares none. While a file param uploads, the button says \"Uploading…\" either way. The Studio action form offers the key (`action.form.ts`). `authorWarn` / `authorHint` were dropped in the same edit (a warned `live` row reds this gate)."
2625
},
2726
"objectName": {
2827
"status": "live",

‎packages/spec/liveness/state-counts/action.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ committed anywhere: `check:liveness` sums the shards when it reads them.
1212

1313
| Type | live | exp | elsewhere | dead | planned | classified |
1414
|---|---|---|---|---|---|---|
15-
| `action` | 49 | 0 | 0 | 1 | 1 | 51 |
15+
| `action` | 50 | 0 | 0 | 1 | 0 | 51 |

‎packages/spec/src/system/metadata-form-zod-reconciliation.test.ts‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -365,17 +365,6 @@ const LEDGER: ReadonlyArray<OmitEntry | SubsetEntry> = [
365365
key: 'conditionalFormatting',
366366
why: "planned, not yet rendered — a field's cell formatting rules (`[{ condition, style }]`, the list view's own rule element) are validated at parse and their CEL is judged at the authoring doors (it parses, it reads only `value` and `record`), but no renderer styles a cell from them until objectui's cell renderers read them, after the spec publishes. A form control offered today would let an author set a style nothing paints",
367367
},
368-
// #27944 — the param dialog's submit label lands spec-first the same way:
369-
// `planned` in the liveness ledger, drawn by no renderer until the console's
370-
// param dialog reads it. The console change that flips the ledger row
371-
// deletes this row and offers the key in `action.form.ts`.
372-
{
373-
kind: 'omit',
374-
type: 'action',
375-
path: ROOT_PATH,
376-
key: 'submitText',
377-
why: "planned, not yet rendered — the param dialog's submit button label is validated at parse (an I18nLabel, never blank, only beside a non-empty `params`) and translated by `translateAction`, but the console's param dialog still draws its default \"Confirm\" until it reads the key. A form control offered today would let an author set a button label nothing shows",
378-
},
379368
// [ADR-0144 D5] A record-mode amount's home-currency projection lands
380369
// spec-first the same way: declared and judged at parse, written by nothing
381370
// until the engine's write-time projection lands in the same release (D9).

‎packages/spec/src/system/translation.zod.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const actionTranslationSchema = (surface: string) => strictObject({
220220
// `ActionSchema.submitText` (#27944) — the param dialog's submit button
221221
// label; overlaid by `translateAction` like `description`, the same
222222
// dialog's line under its title, for an action that declares `params`.
223-
submitText: z.string().optional().describe('Translated label of the submit button in the action\'s param dialog (the action must declare `params`; no renderer shows it yet)'),
223+
submitText: z.string().optional().describe('Translated label of the submit button in the action\'s param dialog (the action must declare `params`)'),
224224
// `ActionSchema.outcomeMessages` (#21095) — one translated message per
225225
// declared outcome, keyed by the same snake_case outcome name, so a bundle
226226
// key that could never match a handler's `outcome` is refused here rather

‎packages/spec/src/ui/action.form.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ export const actionForm = defineForm({
114114
// map resolves to its own branch and opens the raw JSON editor rather
115115
// than being read as text.
116116
{ field: 'description', widget: 'textarea', helpText: "Explanatory line under the title of this action's param dialog. On an action that collects params, the confirm question goes here rather than in confirmText — one dialog, not two. Not ai.description, which is the text an AI agent reads." },
117+
// `submitText` is an I18nLabel too, the same node as `description` above,
118+
// so it takes the same plain row and the renderer derives the same face.
119+
// Not gated on `params`: the parse refuses the key beside an empty
120+
// `params` by name, so a misplaced label is refused, never kept unshown.
121+
{ field: 'submitText', helpText: 'Label of the submit button in this action\'s param dialog, the verb the button performs (e.g. "Send", "Log Call"). Only for an action that collects params. Leave empty to show "Confirm".' },
117122
{ field: 'confirmText', helpText: 'Confirmation message (e.g., "Are you sure?")' },
118123
{ field: 'successMessage', helpText: 'Success message after completion' },
119124
// `errorMessage` is the twin of the row above: same node (I18nLabel), same

‎packages/spec/src/ui/action.zod.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ const actionObject = () => strictObject({
14191419
* The submit button label of the dialog `params` opens — the contract is
14201420
* on {@link actionSubmitText}.
14211421
*/
1422-
submitText: actionSubmitText().optional().describe('Label of the submit button in the action\'s param dialog, the verb the button performs (e.g. "Send", "Log Call"), in place of the default "Confirm" (declared ahead of its console reader: no renderer shows it yet) — the default-language string, or an inline locale map; translated at `objects.OBJECT._actions.ACTION.submitText` (`globalActions.ACTION.submitText` for an object-less action). Only on an action with a non-empty `params`: without one no param dialog opens, so it is refused. Not `confirmText`, which is the message of a param-less action\'s confirm dialog. A blank label is refused.'),
1422+
submitText: actionSubmitText().optional().describe('Label of the submit button in the action\'s param dialog, the verb the button performs (e.g. "Send", "Log Call"), in place of the default "Confirm" — the default-language string, or an inline locale map; translated at `objects.OBJECT._actions.ACTION.submitText` (`globalActions.ACTION.submitText` for an object-less action). Only on an action with a non-empty `params`: without one no param dialog opens, so it is refused. Not `confirmText`, which is the message of a param-less action\'s confirm dialog. A blank label is refused.'),
14231423

14241424
/** Visual Style */
14251425
variant: z.enum(['primary', 'secondary', 'danger', 'ghost', 'link']).optional().describe('Button visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)'),

‎ui/packages/components/src/renderers/action/action-button.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ const ActionButtonRenderer = forwardRef<
294294
// generic "Action parameters" prompt.
295295
label: schema.label,
296296
description: (schema as any).description,
297+
// The param dialog's submit-button verb, read by the same dialog.
298+
submitText: schema.submitText,
297299
target: schema.target,
298300
// Static "open in new tab" switch for url actions — forward so the
299301
// runner's executeUrl honors it (dropped, the toggle is silently lost).

‎ui/packages/components/src/renderers/action/action-group.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ const ActionGroupRenderer = forwardRef<HTMLDivElement, { schema: ActionGroupSche
358358
// and found here by `check:action-forward-parity`).
359359
label: action.label,
360360
description: (action as any).description,
361+
// The param dialog's submit-button verb, read by the same dialog.
362+
submitText: action.submitText,
361363
target: action.target,
362364
openIn: (action as any).openIn,
363365
endpoint: action.endpoint,

‎ui/packages/components/src/renderers/action/action-icon.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ const ActionIconRenderer = forwardRef<
174174
// and found here by `check:action-forward-parity`).
175175
label: schema.label,
176176
description: (schema as any).description,
177+
// The param dialog's submit-button verb, read by the same dialog.
178+
submitText: schema.submitText,
177179
target: schema.target,
178180
openIn: (schema as any).openIn,
179181
endpoint: schema.endpoint,

‎ui/packages/components/src/renderers/action/action-menu.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ const ActionMenuRenderer = forwardRef<HTMLButtonElement, { schema: ActionMenuSch
290290
// / 1 mobile — changed the dialog's title (objectui#4192).
291291
label: action.label,
292292
description: (action as any).description,
293+
// The param dialog's submit-button verb, read by the same dialog.
294+
submitText: action.submitText,
293295
target: action.target,
294296
openIn: (action as any).openIn,
295297
endpoint: action.endpoint,

0 commit comments

Comments
 (0)