fix(spec): declare summaryOperations sub-fields in the Field metadata form (#3257)#3258
Merged
Merged
Conversation
… form (#3257) `fieldForm` declared `summaryOperations` as a bare `composite` (no sub-fields), so the protocol-driven form renderer fell back to a raw JSON editor. Declare the inner shape explicitly — object (ref:object), function (select), field, relationshipField, and filter (widget: 'filter-condition') — mirroring the `summaryOperations` Zod schema and surfacing the roll-up filter from #1868. Gate the block to `data.type == 'summary'`. Small step toward #3257 (metadata-driven Studio field designer); the live objectui inspector already edits these fields. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HbK4FqcHwp9jSwdhTtxYuC
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 102 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 11:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small, concrete step toward #3257 (making the Studio field designer metadata-driven instead of hand-coded). Follows the filtered roll-up work in #1868 / #3227 (merged).
Problem
fieldForm— the registered metadata form for editing a Field (packages/spec/src/data/field.form.ts, wired viametadata-form-registry.ts) — declaredsummaryOperationsas a barecompositewith no sub-fields:So any protocol-driven renderer of
fieldFormfalls back to a raw JSON editor for the roll-up config — and there was no protocol-level surface for thefilteradded in #1868.Change
Declare the composite's inner shape explicitly (
FormFieldSchema.fieldsalready supports this), mirroring thesummaryOperationsZod schema:object→widget: 'ref:object'(required)function→select(count / sum / min / max / avg, required)field(required)relationshipField(optional; auto-detected when omitted)filter→widget: 'filter-condition'— the roll-up predicate from [P0] Add native cross-object rollup/summary capability (parent aggregates of child rows) #1868Also gates the whole block to
visibleWhen: data.type == 'summary'(matching theconfigurationsection's type-conditional pattern).The protocol path now renders structured sub-fields instead of a raw JSON blob. The live objectui inspector (
ObjectFieldInspector— objectstack-ai/objectui#2669, merged) already edits these fields; this closes the gap on the metadata side that the #3257 investigation found.Scope
This is only the small
fieldFormcompleteness fix. The larger convergence — objectui's Studio renderingfieldFormfrommetadata-form-registryand declaring the design-time widgets (filter-conditionrow editor, dependent child-field picker, CEL editors) in the protocol — is tracked in #3257 and deliberately out of scope here.Verification
tsc --noEmit(@objectstack/spec) — clean.check:docs,check:skill-refs— in sync. (check:api-surfaceis unaffected — the exports don't change; a stale localdistproduced a false positive that reproduces on pristinemain.)@objectstack/specpatch).🤖 Generated with Claude Code
Generated by Claude Code