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 f915b87
Browse filesBrowse the repository at this point in the historyBrowse files
docs(spec,service-automation): the Clause-② line reads yes (narrowing; widening) — recordId newly accepts an envelope — and three sentences the screen value slots made false (#19939 S2, patch round 1)
Copy file name to clipboardExpand all lines: .changeset/19939-flow-screen-value-slots.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@
3
3
'@objectstack/service-automation': major
4
4
---
5
5
6
-
A `screen` node's three positions that hand a value to the client are value slots now: an object form's `defaults` (each field's prefill), a field's `defaultValue`, and an object form's `recordId` (the record an `edit` form opens). Each value is a CEL value envelope, `{ dialect: 'cel', source: '…' }`, that the executor evaluates in the run's scope before the screen goes on the wire, so the client receives the value it computes, never the envelope; or a literal, served as written. A `{…}` template token there is refused at `objectstack validate`, at `registerFlow` and by the executor, naming its CEL spelling, as in every other value slot. `recordId` gains the envelope arm, and its literal stays a string.
6
+
A `screen` node's three positions that hand a value to the client are value slots now: an object form's `defaults` (each field's prefill), a field's `defaultValue`, and an object form's `recordId` (the record an `edit` form opens). Each value is a CEL value envelope, `{ dialect: 'cel', source: '…' }`, that the executor evaluates in the run's scope before the screen goes on the wire, so the client receives the value it computes, never the envelope; or a literal, served as written. A `{…}` template token there is refused at `objectstack validate`, at `registerFlow` and by the executor, naming its CEL spelling, as in every other value slot. `recordId` gains the envelope arm, which it refused before this change, and its literal stays a string.
7
7
8
-
Clause-②: no (narrowing)
8
+
Clause-②: yes (narrowing: a {…} token is refused at screen.defaults.*, a field's defaultValue and screen.recordId; widening: screen.recordId accepts a CEL value envelope it refused, and its published JSON Schema and inferred type gain the envelope arm)
9
9
10
10
<!-- adr-0087: not-required (already-registered flow-value-slot-template-dialect-refused) The value-slot retirement's step-18 D3 entry, registered on this line before this change, is amended in this diff: its surface widens to a screen's defaults map, a field's defaultValue and recordId, and its replacement, reason and acceptance criteria say what each serves where the template served nothing. No new D3 entry and no D2 conversion: every whole-path spelling answers differently for an absent value. -->
11
11
12
-
**BREAKING**: an accept-set narrowing on a published authoring surface, shipped as `major` on the v18 line (`.changeset/pre.json` is open on `main` in `next` pre mode, so the release is `18.0.0-next.*`).
12
+
**BREAKING**: an accept-set narrowing on a published authoring surface, beside one widening (`recordId` accepts a CEL value envelope), shipped as `major` on the v18 line (`.changeset/pre.json` is open on `main` in `next` pre mode, so the release is `18.0.0-next.*`).
13
13
14
14
**Why.** ADR-0032 Decision 2 makes a computed value whole-field CEL, and Decision 3 deletes the single brace. A screen's prefill and its record id are computed values handed to the client. Until now the executor ran each through the single-brace interpolator: a `{token}` resolved there, an envelope written in `defaults` or a `defaultValue` went to the client as the object `{ dialect: 'cel', source: '…' }` it spells, and `recordId` was the text of whatever the token found, so a token that found a record served the id `[object Object]`.
15
15
@@ -36,7 +36,9 @@ The refusal at each position says what it serves.
36
36
37
37
**Who is affected, measured.** In this repository: the CRM example's lead conversion (`crm_convert_lead_wizard`: 3 `defaults` values in its two object-form steps), the object-form example in the flows guide, and test fixtures; all are migrated in this change. hotcrm's sites at these positions were not measured.
38
38
39
-
**Still accepted, unchanged.** A CEL value envelope and every literal, a string `recordId` included. The single-brace dialect keeps resolving where it still lives: a `map` or `loop``collection`, a `filter` value, a `notify``recipients` entry, an `http` body. The value-slot retirement's earlier changesets on this line list a screen's `defaults` among those positions; this one supersedes that line.
39
+
**Newly accepted.** A CEL value envelope at `recordId`, which `z.string()` refused before this change: the published JSON Schema for `recordId` gains the envelope arm (a string, or the envelope object), and so does the inferred `ScreenConfig['recordId']`.
40
+
41
+
**Still accepted, unchanged.** A CEL value envelope at `defaults` and at a field's `defaultValue`, and every literal at all three, a string `recordId` included. The single-brace dialect keeps resolving where it still lives: a `map` or `loop``collection`, a `filter` value, a `notify``recipients` entry, an `http` body. The value-slot retirement's earlier changesets on this line list a screen's `defaults` among those positions; this one supersedes that line.
Copy file name to clipboardExpand all lines: packages/services/service-automation/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,7 @@ a CEL value envelope, and text is a `{{ }}` template.**
188
188
| Start-node `condition`| CEL — bare, no braces |`record.amount > 500`|
189
189
| Edge `condition`| CEL — bare, no braces |`record.status == 'open'`|
190
190
| Decision `conditions[].expression`| CEL — bare, no braces |`order_amount > 10000`|
191
-
| Value slots — `create_record` / `update_record``fields`, `assignment` values, and the maps handed to a callee: `subflow` / `map``input`, `script``inputs`| CEL value envelope; a plain string is the literal text it spells |`{ dialect: 'cel', source: "'Follow up on ' + record.name" }`, `'open'`|
191
+
| Value slots — `create_record` / `update_record``fields`, `assignment` values, the maps handed to a callee: `subflow` / `map``input`, `script``inputs`, and a `screen`'s `defaults`, field `defaultValue` and `recordId`, each evaluated before the screen is served | CEL value envelope; a plain string is the literal text it spells (`recordId`'s literal is the id, a string)|`{ dialect: 'cel', source: "'Follow up on ' + record.name" }`, `'open'`|
0 commit comments