|
| 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-confirm-text-beside-params-refused', |
| 7 | + surface: 'the `confirmText` of a page action row beside a non-empty array `params`: `properties.confirmText` ' |
| 8 | + + 'beside a non-empty array `properties.params` on an `action:button` or `action:icon`, and `confirmText` ' |
| 9 | + + 'beside a non-empty array `params` on each `action:group` / `action:menu` member of `properties.actions`. ' |
| 10 | + + 'Not `params: []`, not an object `params` (an `action:button` / `action:icon` row\'s static parameter ' |
| 11 | + + 'values, a `type: \'api\'` member\'s request payload), and not a row with no `params`', |
| 12 | + replacement: 'the confirm question on the row\'s `description`, which the param dialog draws under its title, ' |
| 13 | + + 'and no `confirmText`: one dialog that asks the question and collects the inputs. A row that collects ' |
| 14 | + + 'nothing keeps its `confirmText` and drops the `params`. ⛔ NOT mechanically convertible: whether the ' |
| 15 | + + 'confirm sentence reads as the param dialog\'s description line, or should be reworded, is the ' |
| 16 | + + 'author\'s call.', |
| 17 | + reason: |
| 18 | + 'The console\'s action runner awaits the confirm dialog and only then opens the param dialog for an array ' |
| 19 | + + '`params`, and all four rows forward both keys to it (an array `params` as `actionParams`), so a row ' |
| 20 | + + 'carrying both showed the user TWO dialogs for one decision: a confirm that already read as "the action ' |
| 21 | + + 'ran" while nothing had been sent, then the param prompt. `ActionSchema` and `InlineActionSchema` already ' |
| 22 | + + 'refuse the pair; the four page rows now carry that rule with the same predicate and the same refusal ' |
| 23 | + + 'text. On an `action:icon` with no `label`, `description` is also the tooltip text, so moving the ' |
| 24 | + + 'question there changes the hover text too; give the icon a `label` to keep them apart. A page\'s ' |
| 25 | + + '`properties` is not parsed on the metadata load path, so a stored page keeps loading; `os validate`\'s ' |
| 26 | + + 'props gate, which the metadata save door also runs on the next save of the page, parses it against ' |
| 27 | + + 'these same rows and reports the refusal at the row\'s `confirmText`. Measured producers: none shipped ' |
| 28 | + + 'in this repository; the one carrier was a spec test fixture, respelled.', |
| 29 | + acceptanceCriteria: |
| 30 | + 'No `action:button` / `action:icon` `properties` and no `action:group` / `action:menu` member declares ' |
| 31 | + + '`confirmText` beside a non-empty array `params`; `os validate` reports no `component-props-invalid` ' |
| 32 | + + 'finding at `properties.confirmText` or `properties.actions.N.confirmText` for the pair, and every row ' |
| 33 | + + 'with no `params`, `params: []` or an object `params` parses as before.', |
| 34 | +}; |
0 commit comments