|
| 1 | +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. |
| 2 | + |
| 3 | +import type { SemanticMigration } from '../../types.js'; |
| 4 | + |
| 5 | +export const entry: SemanticMigration = { |
| 6 | + id: 'ui-page-action-row-operation-declared', |
| 7 | + surface: 'the `operation` of a page action row (`properties.operation` on an `action:button` or `action:icon`, ' |
| 8 | + + 'and `operation` on each `action:group` / `action:menu` member of `properties.actions`): any value but ' |
| 9 | + + '`\'update\'`. Also the `onSuccess` of a page action row that declares `operation: \'update\'`, whatever ' |
| 10 | + + 'executor the row names (`actionType` on a node, `type` on a member, or none)', |
| 11 | + replacement: '`operation: \'update\'` with a `patch` for the declarative single-record write, or no `operation`. ' |
| 12 | + + 'A row delete is the object\'s own delete affordance; a bulk def\'s `\'custom\'` has no row form, because the ' |
| 13 | + + 'row is already the action. Beside `operation: \'update\'`, no `onSuccess`. ⛔ NOT mechanically convertible: ' |
| 14 | + + 'whether a row meant the write or the hop is the author\'s call.', |
| 15 | + reason: |
| 16 | + 'Every page action row forwards `operation` to the console\'s action runner beside its executor, and the runner ' |
| 17 | + + 'reads it before any executor: `operation === \'update\'` performs the declarative write through the platform ' |
| 18 | + + 'action route, and any other value falls through to the executor and does nothing. The rows typed the key as ' |
| 19 | + + 'an open value, so such a value parsed clean, and they never carried `ActionSchema`\'s refusal of `onSuccess` ' |
| 20 | + + 'beside `operation: \'update\'`: a row with an `api` or `script` executor, the write and a hop parsed, while ' |
| 21 | + + 'the same action was refused. The rows now declare `ActionSchema`\'s own `operation` enum and refuse the ' |
| 22 | + + 'pairing with the action\'s own text: the hop would follow the write, which runs no handler and no executor, ' |
| 23 | + + 'so its success carries no result `${result.*}` could read. A page\'s `properties` is not parsed on the ' |
| 24 | + + 'metadata save or load path; `os validate`\'s props gate parses it against these same rows and reports the ' |
| 25 | + + 'refusal at the row\'s `operation` or `onSuccess`. Measured producers: none in this repository; none in ' |
| 26 | + + 'objectui\'s action rows at its pin or main.', |
| 27 | + acceptanceCriteria: |
| 28 | + 'Every page action row\'s `operation` is absent or `\'update\'`, and no row with `operation: \'update\'` carries ' |
| 29 | + + '`onSuccess`; `os validate` reports no `component-props-invalid` finding at `properties.operation`, ' |
| 30 | + + '`properties.actions.N.operation`, or at the `onSuccess` of an `operation: \'update\'` row, and every such row ' |
| 31 | + + 'parses as before.', |
| 32 | +}; |
0 commit comments