Add a computation property to field metadata
FE
17h ago+353+353+012345678901234567890123456789-14-14-01234567890123456789
First PR of the computed fields stack. It adds the computation property to field metadata and makes a field that has one a field that stores nothing. No computation can be evaluated yet, so this PR changes no behaviour: creating a field with a computation is rejected until #30498.
It is split out because it is the wide, mechanical part: one new property carried through every place that builds or maps a field.
Changes
- Property:
fieldMetadata.computation, nullable jsonb, fast instance command2.60.0_AddFieldMetadataComputationFastInstanceCommand_1794827866337. The shared typeFieldMetadataComputationdescribes a formula or a rollup, with fields referenced by name. - Exposed on the field DTO and on the create and update field inputs, and on the app manifest (
computationon a field). Front metadata schema and client SDK regenerated. - Plumbing: flat entity configuration (compared and stringified, not overridable), editable properties, entity ↔ flat ↔ DTO ↔ manifest mappings, and
computation: nullin every place that builds a field. - A computed field stores nothing:
- no column is created for it, and schema changes skip it on create and update;
- it is absent from the GraphQL record create and update inputs;
- the record write processor rejects it, for GraphQL and REST.
- Validation: a field with a computation is rejected with "computed fields are not available yet". #30498 replaces this rule with the real validation.
Why the upgrade-guard label
ci:allow-previous-version-upgrade-mutation is needed because two legacy upgrade commands (2.10 and 2.23) build field metadata literals and need computation: null to compile, as they did for disabledFieldPermissionActions. Their logic is unchanged.
Stack
| PR | What it does | Builds on |
|---|---|---|
| This PR 👈 | The computation property, no storage, write guards | main |
| #30498 | Formulas and rollups | this PR |
| #30499 | Filtered relations | #30498 and #30347 |
Testing
- Integration
failing-create-one-computed-field-metadata: a stored field exposescomputation: null; a field with a computation is rejected. - Integration
successful-sync-application-workspace-migration: snapshot updated withcomputation: null. - Unit: the
flat-field-metadata,flat-entity,application-manifest,workspace-migrationandapisuites pass (2298 tests), with snapshots updated for the new key. - Server typecheck and oxlint.
Generated by Claude Code