diff --git a/.changeset/21863-action-on-success-outcome-messages-form-rows.md b/.changeset/21863-action-on-success-outcome-messages-form-rows.md new file mode 100644 index 00000000000..79751a21386 --- /dev/null +++ b/.changeset/21863-action-on-success-outcome-messages-form-rows.md @@ -0,0 +1,6 @@ +--- +'@objectstack/spec': patch +'@objectstack/platform-objects': patch +--- + +Studio's action form now offers `onSuccess` (the route an `api` or `script` action opens once it succeeds, and whether it opens in place or in a new tab) and `outcomeMessages` (a JSON map from each `outcome` the handler returns to the success message shown for it), with their labels and help text translated for `zh-CN`, `ja-JP` and `es-ES`. diff --git a/packages/cli/test/i18n-extract-outcome-messages.test.ts b/packages/cli/test/i18n-extract-outcome-messages.test.ts index d2ed0146be3..31bcbfca440 100644 --- a/packages/cli/test/i18n-extract-outcome-messages.test.ts +++ b/packages/cli/test/i18n-extract-outcome-messages.test.ts @@ -70,7 +70,11 @@ describe('i18n extraction — outcomeMessages (#21095)', () => { }); it('emits nothing for an outcome nobody declared, and nothing for an action without the map', () => { - const outcomeKeys = paths().filter((k) => k.includes('.outcomeMessages.')); + // The `metadataForms.` subtree is left out: the action form's own + // `outcomeMessages` row puts its label / helpText / placeholder strings at + // `metadataForms.action.fields.outcomeMessages.*`, which are form-row text, + // not the copy of any declared outcome. + const outcomeKeys = paths().filter((k) => k.includes('.outcomeMessages.') && !k.startsWith('metadataForms.')); expect(outcomeKeys.sort()).toEqual([ 'globalActions.check_app_updates.outcomeMessages.up_to_date', 'objects.sys_environment._actions.archive_environment.outcomeMessages.already_archived', diff --git a/packages/lint/src/validate-predicate-path-refs.test.ts b/packages/lint/src/validate-predicate-path-refs.test.ts index 6fdf7489d8b..82c9798b58b 100644 --- a/packages/lint/src/validate-predicate-path-refs.test.ts +++ b/packages/lint/src/validate-predicate-path-refs.test.ts @@ -630,7 +630,15 @@ describe('#7010 corpus — shipped METADATA_FORM_REGISTRY', () => { // shipped `*.form.ts` corpus differenced against the merge base // `d78a0bda07` adds exactly `field :: useGrouping :: data.type == 'number'` // and removes none. - expect(predicates, 'the shipped metadata forms carry no predicates at all').toBe(83); + // It is 85 today, an ADDITION of TWO: #21863 offered the action form's + // `outcomeMessages` and `onSuccess` rows, each gated on the two action types + // whose parse accepts the key. Measured, not inferred: the shipped + // `*.form.ts` corpus differenced against the merge base `607463d736` by + // `