You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ed0116
Browse filesBrowse the repository at this point in the historyBrowse files
docs(skills): the actions rule teaches a bulk action placed at selection
A list view's `bulkActions` list was retired in protocol 19: an action that
acts on many records declares `'selection'` in its own `locations`, and the
object's `actionLayout.selection` orders the selection bar. The actions rule,
the i18n key map and two eval cases still taught or graded the retired key.
Neither priced file grows: each new clause is paid for inside its file.
Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7
Co-authored-by: Claude <noreply@anthropic.com>
docs(skills): the objectstack-ui actions rule teaches a bulk action placed at `selection`, in place of a list view's retired `bulkActions` list
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
Protocol 19 retired a list view's `bulkActions` list: an action that acts on many records declares `'selection'` in its own `locations`, and the object's `actionLayout.selection` orders the selection bar. The published skills still taught the retired key, which parse and `tsc` refuse. Text only: no schema, rule or runtime behaviour changes here.
11
+
12
+
`skills/objectstack-ui/rules/actions.md`:
13
+
14
+
- The location table gains the `selection` row: many records, one run per ticked row, on the selection bar of every grid view of the object. The line under the table that names what replaced each retired word now also names a view's `bulkActions` (`selection`).
15
+
- The `actionLayout` paragraph names the third arm: `selection` takes the actions placed at `selection`, with the same `pinned` / `more` parts as the other two.
16
+
- The opening paragraph's `action-no-placement` sentence lists the two ways a view still places an action by name, `rowActions` and `bulkActionDefs`.
17
+
- The bulk bullet says an action that writes each selected row is placed at `selection`, declares `execution: 'perRecord'` and writes the row it is handed. The aggregate form, a view's `bulkActionDefs` entry with `execution: 'aggregate'`, reads as before.
18
+
- The checked `crm_create_campaign` example declares `locations: ['selection']`. Without it the example taught an action no surface draws.
19
+
20
+
`skills/objectstack-i18n/SKILL.md`: the key map's `_views.{view}` row spells its bulk group `bulkActions.{bulkActionDefs_name}`. The translation group keeps its name; it is keyed by the `name` of a view's `bulkActionDefs` entry and was never the retired view key. An action placed at `selection` is translated under `_actions`, like any other action.
21
+
22
+
Neither file grows. In the actions rule the new text is paid for inside the file: the retired key's two mentions, one clause of the bulk bullet that its next clause repeated ("only ids the caller can read", before "one the caller cannot read refuses the whole call"), the bullet's pointer to the example (the example now declares its placement itself), and the location table's column padding. In the i18n entry the flow-step bullet no longer glosses `approvals` as "(approval)" and `screens` as "(screen)".
23
+
24
+
The two `objectstack-ui` eval cases that graded an answer on the retired key (a bulk "Add to campaign" action, and an aggregate body moved to the per-record form) now require `'selection'` and refuse a `bulkActions: [` list.
Copy file name to clipboardExpand all lines: skills/objectstack-ui/evals/views-apps-actions-pages.json
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,11 @@
24
24
{
25
25
"id": 3,
26
26
"prompt": "Add a Convert action on `lead` — only for qualified, not-yet-converted leads, from the record header and each list row, launching the `crm_lead_conversion` flow — and a bulk 'Add to campaign' that asks which campaign, for the selected rows.",
27
-
"expected_output": "Two `defineAction` items. Convert: `type: 'flow'`, `target: 'crm_lead_conversion'`, `locations: ['record']`, `visible: P`record.status == \"qualified\" && record.is_converted == false`` (bare CEL, never brace-wrapped), `confirmText`, `successMessage`, `refreshAfter: true`. Bulk: `type: 'script'`, `execution: 'perRecord'`, wired by the lead list view's `bulkActions: ['<name>']`, a field-backed `params: [{ field: 'campaign_id', objectOverride: 'campaign', required: true }]`, and a `body` that runs once per ticked row and reads that row's id as `ctx.recordId`.",
27
+
"expected_output": "Two `defineAction` items. Convert: `type: 'flow'`, `target: 'crm_lead_conversion'`, `locations: ['record']`, `visible: P`record.status == \"qualified\" && record.is_converted == false`` (bare CEL, never brace-wrapped), `confirmText`, `successMessage`, `refreshAfter: true`. Bulk: `type: 'script'`, `execution: 'perRecord'`, placed at `selection` (`locations: ['selection']`, so no list view names it), a field-backed `params: [{ field: 'campaign_id', objectOverride: 'campaign', required: true }]`, and a `body` that runs once per ticked row and reads that row's id as `ctx.recordId`.",
"prompt": "Our `archive_tasks` script action is wired as a `bulkActionDefs` entry with `execution: 'aggregate'`. Its body loops over the selected ids and updates each task, but some tasks are locked and their update throws, so the whole run is reported as failed even though most rows were archived. Make the result dialog say which rows were archived and why each of the others was not.",
227
-
"expected_output": "`archive_tasks` moves to the per-record form, the form for a body that writes each selected row: the action declares `execution: 'perRecord'`, the list view names it in `bulkActions: ['archive_tasks']` in place of the `bulkActionDefs` aggregate entry, and the body updates only the row it is handed (`ctx.recordId` / `ctx.record`), with no loop over `input._selectedIds`. Each ticked task is then its own run: a locked task's throw fails that row alone and the result dialog lists it with its message, while every other row is archived and counted. Not a `try` / `catch` loop in the aggregate body that returns per-row lists or counts of what it wrote and what refused, not `execution: 'perRecord'` added while the `bulkActionDefs` aggregate entry stays, not a `resultDialog`, and not a rethrow carrying the rows (a rejection's body is dropped).",
227
+
"expected_output": "`archive_tasks` moves to the per-record form, the form for a body that writes each selected row: the action declares `execution: 'perRecord'` and is placed at `selection` (`'selection'` in its `locations`), the view's `bulkActionDefs` aggregate entry is removed, and the body updates only the row it is handed (`ctx.recordId` / `ctx.record`), with no loop over `input._selectedIds`. Each ticked task is then its own run: a locked task's throw fails that row alone and the result dialog lists it with its message, while every other row is archived and counted. Not a `try` / `catch` loop in the aggregate body that returns per-row lists or counts of what it wrote and what refused, not `execution: 'perRecord'` added while the `bulkActionDefs` aggregate entry stays, not a `resultDialog`, and not a rethrow carrying the rows (a rejection's body is dropped).",
scope does not place, on the object or an extension of one the same stack
40
42
defines. On an installed object only its paired `.custom` package's extension
41
43
writes it (as `fieldGroups`, objectstack-data), each arm whole, not judged
@@ -55,7 +57,7 @@ there: a wrong name draws nothing.
55
57
- Copy holes are `{{ }}`: `confirmText`, `description` and a param's `helpText` read `record`; `successMessage` and each `outcomeMessages` entry (`resent: 'Invitation resent to {{ result.email }}'`) read `result` and `record`; `errorMessage` takes none. A `bulkActionDefs` entry's `confirmText` reads `{{ count }}` and its params by bare name (`{{ tier }}`). In all of them `${record.name}`, `{name}`, logic in a hole and a blank sentence fail `os validate`.
56
58
- A param's `helpText`, like `description`, is a sentence or an inline locale map (`{ en: 'Why {{ record.name }} is paused', 'zh-CN': '暂停原因' }`); the map is how a page button's inline `action` (no bundle reaches it) writes its hint per locale.
57
59
-`undoable: true` — an **Undo** in the success toast (and `Ctrl+Z`). Snapshot: runtime on `operation: 'update'`, console on `type: 'api'`; else refused.
58
-
-A list view's `bulkActions: ['<name>']` runs it once per ticked row. A body that writes each selected row takes that form: declare `execution: 'perRecord'` and write the row it is handed (`ctx.record`, `ctx.recordId`; `crm_create_campaign` below); a row whose run throws is listed with its message. A `bulkActionDefs` entry `{ name, operation: 'custom', execution: 'aggregate' }` runs it once for the selection. A script body or a flow receives the ids under the built-in key `params._selectedIds` (`input._selectedIds`), at most 5000 and only ids the caller can read: one the caller cannot read refuses the whole call (`404 RECORD_NOT_FOUND`) before it starts. A throw is one outcome for the selection; a return value's top-level `succeeded` or `failed` is read as a `BulkActionResult` (`@objectstack/spec/ui`), and in any other form (counts, one list) reported as unreadable.
60
+
-An action that writes each selected row is placed at `selection`: declare `execution: 'perRecord'` and write the row it is handed (`ctx.record`, `ctx.recordId`); a row whose run throws is listed with its message. A `bulkActionDefs` entry `{ name, operation: 'custom', execution: 'aggregate' }` runs it once for the selection. A script body or a flow receives the ids under the built-in key `params._selectedIds` (`input._selectedIds`), at most 5000; one the caller cannot read refuses the whole call (`404 RECORD_NOT_FOUND`) before it starts. A throw is one outcome for the selection; a return value's top-level `succeeded` or `failed` is read as a `BulkActionResult` (`@objectstack/spec/ui`), and in any other form (counts, one list) reported as unreadable.
0 commit comments