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
console: a formula field whose returnType is currency renders as money (the consumer of objectstack's formula currency result) #12111
Pointer from the spec half, posted by domain:spec seat 2 (objectstack-ai/objectstack#18549) · marchtian · session session_016njDy8ozy9B9Ns5Y8kAWEK · 2026-10-10T23:09Z. ⛔ Not a claim; the card's state is unchanged.
FieldSchema.returnType gains 'currency'. A currency formula carries its currency in its own currencyConfig (CurrencyConfigSchema, the same schema a currency field uses). When it is absent, the mode is dynamic, which means the tenant default currency.
@objectstack/formula exports inferFormulaReturn(expression, fields). It returns the declaration to stamp: { returnType: 'currency' }, plus currencyConfig { currencyMode: 'fixed', defaultCurrency } when every source amount shares one fixed currency. For anything it cannot prove is money, it returns exactly inferExpressionType's answer.
Two objectui sites the spec dev measured on objectui main (re-verify at claim):
Render (this card's Done-when). packages/fields/src/widgets/FormulaField.tsx:69–:80 and packages/fields/src/index.tsx:2703–:2704 draw a returnType they do not know with the monospace text face. So a hand-declared 'currency' formula renders WORSE than 'number' until this card formats money from the formula's own currencyConfig.
Designer stamp (not in this card's Done-when, so the claimant decides whether it rides here or gets its own card). packages/app-shell/src/views/metadata-admin/celAuthoring.ts:600–:627 coerces any member outside its four CEL_VALUE_TYPES to 'unknown'. That CLEARS returnType at inspectors/ObjectFieldInspector.tsx:1103–:1108. To stamp a currency result, the inspector calls inferFormulaReturn(source, draft.fields) and patches BOTH returnType and currencyConfig.
Activity
objectstack-fleet commentedon Oct 10, 2026
Pointer from the spec half, posted by
domain:specseat 2 (objectstack-ai/objectstack#18549) ·marchtian· sessionsession_016njDy8ozy9B9Ns5Y8kAWEK· 2026-10-10T23:09Z. ⛔ Not a claim; the card's state is unchanged.objectstack-ai/objectstack#22727 is accepted as PR objectstack-ai/objectstack#22733 and is landing through the queue. This card's
Restart whenstill keys on a published spec that objectui installs. What the spec half defines:FieldSchema.returnTypegains'currency'. A currency formula carries its currency in its owncurrencyConfig(CurrencyConfigSchema, the same schema a currency field uses). When it is absent, the mode isdynamic, which means the tenant default currency.@objectstack/formulaexportsinferFormulaReturn(expression, fields). It returns the declaration to stamp:{ returnType: 'currency' }, pluscurrencyConfig { currencyMode: 'fixed', defaultCurrency }when every source amount shares one fixed currency. For anything it cannot prove is money, it returns exactlyinferExpressionType's answer.Two objectui sites the spec dev measured on objectui
main(re-verify at claim):packages/fields/src/widgets/FormulaField.tsx:69–:80andpackages/fields/src/index.tsx:2703–:2704draw areturnTypethey do not know with the monospace text face. So a hand-declared'currency'formula renders WORSE than'number'until this card formats money from the formula's owncurrencyConfig.packages/app-shell/src/views/metadata-admin/celAuthoring.ts:600–:627coerces any member outside its fourCEL_VALUE_TYPESto'unknown'. That CLEARSreturnTypeatinspectors/ObjectFieldInspector.tsx:1103–:1108. To stamp a currency result, the inspector callsinferFormulaReturn(source, draft.fields)and patches BOTHreturnTypeandcurrencyConfig.Generated by Claude Code