Repository navigation
feat(app-shell): an assignment value can be written as a CEL expression envelope beside {token} text - #10509
Conversation
… stored as the spec's value envelope
The assignment node's `assignments` editor now offers, per value, a text
cell (`{token}` interpolation, stored exactly as typed) or a CEL expression
stored as `{ dialect: 'cel', source }`. The editor learns it is serving a
`value`-role slot from the spec's expression ledger
(`FLOW_NODE_EXPRESSION_PATHS`), so no other key/value map changes. A
malformed envelope shows `AssignmentValueSchema`'s refusal inline, and the
legacy array form names the spec's prescription; an expression row writes
the map, the only shape the spec reads an envelope in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy
… with its changeset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy
…pe type off the spec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy
…, in the flow designer guide The fence carried the flow node `type`, which `check:doc-types` reads as an SDUI component type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: ① Derived judgmentsAll line numbers are at the head
② Semver level
Changeset prose, sentence by sentence: the title sentence, true. "now has a per-value toggle, Write as a CEL expression", true ( README Guide ③ Boundary flags
Implemented-by: VERDICT: PASS |
Fixes #7588
Clause-②: no
Dispatched by the
domain:uiseat 5 (claim comment 5827049024 on this card). Session:https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy.What changes
The
assignmentnode's Assignments editor gets a per-value toggle, "Write as a CEL expression" (a toggle button witharia-pressed).{token}string is stored exactly as typed. It is never rewritten into an envelope.{ dialect: 'cel', source }. The installed spec declares this envelope for the slot (objectstack#14149 ruling A; the spec half is objectstack PR #15113). The released@objectstack/service-automation17.4.0 evaluates it: its dist carriesevaluateValueEnvelope. So the CEL stdlib (joinNonEmpty, …) can now be authored from Studio.Files:
flow-value-envelope.ts(new). Every decision it makes is read from@objectstack/spec/automation:FLOW_NODE_EXPRESSION_PATHSsays which map is avalue-role slot.isExpressionEnvelopeShapedsays what counts as an envelope.AssignmentValueSchemagives the refusal. Its issues start withASSIGNMENT_VALUE_ENVELOPE_REFUSAL.AssignmentExpressionValueSchema.shape.dialect.valuegives the dialect that gets written.FlowKeyValueField.tsx:mode: 'expression'and the envelope it was read from.rowsToValuewrites both storage shapes (the legacy array and the map) through onerowValue, so both shapes handle text rows and expression rows.role="alert". Malformed means: nosource, a blanksource, a dialect other thancel, orastonly.metaand dropsast, following the objectui#3218 write table. An unedited envelope comes back as the same object.FlowNodeConfigField.tsx:valueEnvelopeonly whenisValueEnvelopeSlot(context.node.type, field.path)is true. This is how the editor knows which map it is serving: it takes the node's type and the field'sconfig.KEYpath, and looks upKEY.*with rolevaluein the spec's expression ledger.assignment:config.assignments.metadata-admin/i18n.ts: two keys, en and zh (the designer table's two locales).content/docs/guide/flow-designer.md: a new Assignment paragraph that shows the config JSON first.@object-ui/app-shellminor.The legacy array shape: a conflict between the triage constraint and the spec
assignments: [{ variable, value }], an envelope-shaped object is a literal. The spec'sASSIGNMENT_ARRAY_FORM_PRESCRIPTIONsays: "write the map, which is also the only shape that accepts a CEL value envelope".What this PR does:
{token}value stays byte-identical, and a stored envelope-shaped literal comes back deep-equal.assignments: [in the example trees of objectstackorigin/main8d76c2d3and objectuiorigin/main8c929e6.The dispatch report carries this as an open question with options; the seat decides.
Tests (the targeted set re-run at
f18f425, the head of this PR)pnpm exec vitest runonflow-value-envelope.test.ts,FlowKeyValueField.shape.test.ts,FlowKeyValueField.valueEnvelope.test.tsx,FlowNodeConfigField.test.tsxandFlowNodeInspector.test.tsx→ 5 files, 41 passed.16f2420.f18f425only changescontent/docs/guide/flow-designer.md, and no test or script reads it (git grepflow-designer: 0 hits).pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/→ 93 files, 1143 passed, 1 skipped.pnpm exec vitest run packages/app-shell/src/views/metadata-admin/→ 297 files, 3225 passed, 1 skipped.packages/app-shell/src/__tests__/) → 17 files, 715 passed.pnpm turbo run type-check --filter @object-ui/app-shellatf18f425→ 30/30 tasks successful.tsconfig.test.json --listFilesOnlylists all three new or changed test files.f18f425→ 0 errors, 4 warnings, allreact-refresh/only-export-componentson exported helpers. The base file had 2 of these;toRowsandswitchRowModeare exported for the pins.ablation-replace.mjs. In each, the anchor hit once, the blob changed, the restore matched the HEAD blob, andgit diff HEADwas empty afterwards.{token}byte-identity pin, plus the two existing shape pins).Gates at
f18f425(each exit code written to a file before it was read)These all exited 0:
check:i18n-keys,check:i18n-drift,check:i18n-dead-keys,check:i18n-designer-paritycheck:control-bytes,check:test-path-rootscheck:vi-mock-specifiers,check:vi-mock-inherit,check:vi-mock-override-shapecheck:new-line-citations(0 new citations),check:changeset-claims,check:pending-changeset-literals,check-changeset-presence.mjscheck:doc-types,check:doc-fences,check:doc-example-idscheck:spec-symbols,check:designer-field-key-parity,check:phantom-deps,check:self-importcheck:esm-specifiers,check:unreferenced-sources,check:shell-escape-residue,check:installed-pin-claimscheck:metadata-write-doors,check:docs-route-closurecheck-governed-queue-guard.mjs --test→ NOT GOVERNED.check:changeset-claimspointed at three pending changesets that namemetadata-admin/i18n.ts: the 6310, 7125 and 8632 changesets. I read all three paragraphs. They are about other keys and stay true.check:doc-typeswent red once, on this PR's first guide fence: it read the flow node'stypeas an SDUI type. The fence now shows theconfigmap instead.Not measured
check:doc-snippetsandcheck:doc-examplesexited 2 (PRECONDITION NOT MET: unbuilt packages). Both judge only ts, tsx and typescript fences; this PR adds only json fences.check:readme-exportsexited 1 because theplugin-ganttdist is unbuilt. That README is untouched here, and the gate could not judge anything.check:eager-closureexited 2: there is no console build.@objectstack/spec/automationwas already a runtime import in the same inspector graph (FlowReferenceField, whichFlowNodeConfigFieldimports).views/metadata-adminthat do not read a changed file, and the repo-wide eslint run: declared to CI.Acceptance notes
'30','true') whenever any row of the map is edited. This is the design the file header documents.validateExpressionClientsays "inside a condition" for thevaluerole too. It is a wording issue only.^17.3.0.check:spec-floorsjudges.AssignmentExpressionValueSchemaextendsExpressionSchema, notEvaluatedExpressionSchema. So at the floor, a blank-sourceorast-only envelope is not refused inline.n: 2anddoubledset to an * 2envelope givesdoubledequal to the envelope object.rows.map(r, r.subject)withrowsin scope flagsr. Control:joinNonEmpty(rows, ", ")is clean.FlowNodeConfigField.tsx, which is the editor's only caller and gets a one-prop wire in the same cleared directory. It also did not name the README and guide paragraphs, which AGENTS.md Add automated testing infrastructure and CI/CD workflows #2 requires.Generated by Claude Code