Skip to content

Commit 208d16f

Browse files
committed
wip: cancelText liveness row, form omit row, authorable surface, SPEC_ACTION_KEYS, meta-types pin
Claude-Session: https://claude.ai/code/session_01ADHkmNhdF5oapRdMKNBctQ Co-authored-by: Claude <noreply@anthropic.com>
1 parent bb25c9b commit 208d16f

5 files changed

Lines changed: 31 additions & 2 deletions

File tree

‎packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,13 @@ describe('#17501 — /meta/types serves a real schema for `action`, and moves no
262262
// [#28404] 50 → 51: `overrides` (the ADR-0146 D2 override declaration
263263
// a `<base>.custom` item carries) joined the accepted set, and the
264264
// sample names it.
265-
expect(Object.keys(properties).length + retiredTopLevelCount('action')).toBe(51);
265+
// [#28519] 51 → 52: `cancelText` (the dismiss button label of the
266+
// action's confirm or param dialog) joined the accepted set, and the
267+
// sample names it.
268+
expect(Object.keys(properties).length + retiredTopLevelCount('action')).toBe(52);
266269
// A sample an author would actually address, and the one #17500's
267270
// repeater titles need a node to sit on.
268-
for (const key of ['name', 'label', 'objectName', 'type', 'params', 'locations', 'outcomeMessages', 'requiresMembershipReach', 'disabledReason', 'pressed', 'submitText', 'overrides']) {
271+
for (const key of ['name', 'label', 'objectName', 'type', 'params', 'locations', 'outcomeMessages', 'requiresMembershipReach', 'disabledReason', 'pressed', 'submitText', 'cancelText', 'overrides']) {
269272
expect(Object.keys(properties)).toContain(key);
270273
}
271274
});

‎packages/spec/authorable-surface/ui.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"ui/Action:body",
1515
"ui/Action:bodyExtra",
1616
"ui/Action:bodyShape",
17+
"ui/Action:cancelText",
1718
"ui/Action:component",
1819
"ui/Action:confirmText",
1920
"ui/Action:description",

‎packages/spec/liveness/action.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
"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)",
2424
"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)."
2525
},
26+
"cancelText": {
27+
"status": "planned",
28+
"verifiedAt": "2026-11-02",
29+
"authorWarn": true,
30+
"authorHint": "Keep it, but nothing reads it yet: no console draws an action's `cancelText`, so the dismiss button of its confirm or param dialog still says \"Cancel\" until the console's two action dialogs read the key.",
31+
"evidence": "packages/spec/src/ui/action.zod.ts#cancelText (the parse: an I18nLabel, never blank, only on an action that declares `confirmText` or a non-empty `params`); packages/spec/src/system/i18n-resolver.ts#translateAction overlays the translated `objects.{o}._actions.{a}.cancelText` (or `globalActions.{a}.cancelText`) onto the served action when it opens either dialog; packages/spec/src/system/translation.zod.ts declares the translation slot; packages/lint/src/validate-translation-references.ts#checkActionCancelText refuses a translation under an action that opens neither dialog.",
32+
"note": "PLANNED until the console half of #28519 lands (spec PR first, console card second, the #27944 split). The framework half is live, but no renderer reads the key yet. The confirm dialog: ui/packages/app-shell/src/views/ActionConfirmDialog.tsx already draws `options.cancelText` over `actionConfirm.cancel`, but ui/packages/core/src/actions/ActionRunner.ts#confirmOptions hands it only `title` / `confirmText` / `destructive`, never the action's `cancelText`, and `ActionDef` does not declare the key. The param dialog: ui/packages/app-shell/src/views/ActionParamDialog.tsx draws `actionDialog.cancel` unconditionally, 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 \"Cancel\", not their label. 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)."
33+
},
2634
"objectName": {
2735
"status": "live",
2836
"verifiedAt": "2026-09-15",

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,18 @@ const LEDGER: ReadonlyArray<OmitEntry | SubsetEntry> = [
396396
key: 'pressed',
397397
why: "planned, not yet rendered — the reader's pressed-state predicate is validated at parse (CEL only, no boolean literal) and judged at the authoring doors in the `record` scope, but no action surface draws the pressed face until the console's header buttons read it. A form control offered today would let an author write a predicate nothing shows",
398398
},
399+
// #28519 — the dismiss label of an action's confirm and param dialogs lands
400+
// spec-first the way `submitText` did: `planned` in the liveness ledger,
401+
// drawn by neither dialog until the console reads it. The console change
402+
// that flips the ledger row deletes this row and offers the key in
403+
// `action.form.ts`, beside `submitText`.
404+
{
405+
kind: 'omit',
406+
type: 'action',
407+
path: ROOT_PATH,
408+
key: 'cancelText',
409+
why: "planned, not yet rendered — the dialogs' dismiss button label is validated at parse (an I18nLabel, never blank, only on an action that declares `confirmText` or a non-empty `params`) and translated by `translateAction`, but the console's confirm and param dialogs still draw their default \"Cancel\" until they read the key. A form control offered today would let an author set a button label nothing shows",
410+
},
399411
// #27945 — a lookup's pick autofill lands spec-first the same way: `planned`
400412
// in the liveness ledger, read by no form or grid until the ui card's lookup
401413
// widget writes the declared targets on pick.

‎ui/packages/core/src/actions/actionKeys.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ export const SPEC_ACTION_KEYS = [
242242
'body',
243243
'bodyExtra',
244244
'bodyShape',
245+
// Added to `ActionSchema` by objectstack#28519: the dismiss button label of
246+
// the action's confirm or param dialog. Listed for this array's contract
247+
// alone, like `description` below: `ActionDef` does not declare it yet, and
248+
// the dialogs reading it are the console's own follow-up.
249+
'cancelText',
245250
'component',
246251
'confirmText',
247252
// Added to `ActionSchema` in @objectstack/spec 17.0.0-rc.6. Listed here purely

0 commit comments

Comments
 (0)