feat(studio): filter editor for roll-up summary fields (framework#1868)#2669
Merged
Merged
Conversation
The object-designer field inspector now edits `summaryOperations.filter` on a
`summary` field, backing the framework's filtered roll-ups (one child object
feeding several parent totals, each aggregating only the rows a predicate
matches).
- SummaryConfigFields gains a structured field/operator/value row editor under
Rollup Options (mirrors the lookupFilters editor), reading/writing the spec's
FilterCondition object via summaryFilterToRows / summaryRowsToFilter.
- Values are coerced to the child field's stored type: a boolean field emits
`{ billable: true }` (not "true"), a numeric operator emits
`{ amount: { $gte: 500 } }`, so the FilterCondition matches the real column.
- Rows map to/from the flat form and a top-level `$and`; an advanced filter
(`$or` / nested) is shown read-only with a note rather than clobbered.
- New designer.field.summary.filter* i18n keys (en + zh-CN); 6 new inspector
tests (render, read existing, add condition, boolean coercion, numeric
operator coercion, advanced-filter note) + a changeset.
Verified live against a running showcase backend: the editor parses a seeded
`{ status: 'approved' }` into a Field=Line Status / Operator==equals /
Value=approved row in the Studio inspector.
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
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 02:04
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.
Studio-side companion to the framework's filtered roll-up summaries (objectstack-ai/framework#1868, framework PR objectstack-ai/framework#3227).
Context
The framework adds
summaryOperations.filter— asummaryfield can now aggregate only the child rows matching awherepredicate, so one child object feeds several different parent totals (an approved-only sum vs the grand total). Until now the object-designer field inspector could edit a summary's object / function / field / relationship but not its filter, so that capability was un-authorable from Studio.Change
SummaryConfigFields(inObjectFieldInspector.tsx) gains a filter editor under Rollup Options:lookupFilterseditor), reading and writing the spec'sFilterConditionobject viasummaryFilterToRows/summaryRowsToFilter.booleanfield emits{ billable: true }(not the string"true") and a numeric operator emits{ amount: { $gte: 500 } }— the FilterCondition then matches the real column.$and; a filter using logic the row editor can't represent ($or/ nested) is shown read-only with a note rather than being clobbered on the next edit.designer.field.summary.filter*i18n keys (en + zh-CN).Verification
type-checkclean (0 errors in the changed files).ObjectFieldInspector.test.tsx: 43/43, including 6 new tests — renders the filter section, reads an existing{ status: 'approved' }into a row, adds a defaulted condition, coerces a boolean value, coerces a numeric-operator value, and shows the read-only note for an advanced$orfilter.apps/consoledev) against a running showcase backend carrying the framework change; opened theshowcase_expense_reportobject →approved_amountfield, and the editor parsed the seeded{ status: 'approved' }into a Field = Line Status / Operator = "= equals" / Value = approved row.🤖 Generated with Claude Code
Generated by Claude Code