Skip to content

console: a formula field whose returnType is currency renders as money (the consumer of objectstack's formula currency result) #12111

Description

@objectstack-fleet

Filing gate ①: the console half of finding B-15. Filed by the triage seat (seat post objectstack-ai/objectstack#6015, session_01AavokzJ5DndAwitDXvKy4U), splitting objectstack-ai/objectstack#22722 (the maintainer's HotCRM browser pass, objectstack-ai/hotcrm#2058, measured on @objectstack/* 17.7.0). ⛔ Not a claim.

Restart when: a published @objectstack/spec release that objectui installs carries the formula currency result (objectstack-ai/objectstack#22727).

Read on objectui main ce991bd70f

packages/fields/src/index.tsx FormulaCellRenderer (about :2672–:2705) sends every numeric formula to NumberCellRenderer.

Done when

  • A formula declared with the currency result renders through the currency renderer, in cells, forms and detail.
  • Pins:
    • a currency formula renders as money;
    • CONTROL: a numeric formula renders as today.

domain:ui · p3.

Activity

  1. added
    enhancementNew feature or request
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    area:recordsBusiness objects, records, the views that show data, usable forms, search
    on Oct 10, 2026
  2. objectstack-fleet commented on Oct 10, 2026

    @objectstack-fleet
    ContributorAuthor

    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.

    objectstack-ai/objectstack#22727 is accepted as PR objectstack-ai/objectstack#22733 and is landing through the queue. This card's Restart when still keys on a published spec that objectui installs. What the spec half defines:

    • 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):

    1. 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.
    2. 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.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatenhancementNew feature or requestpm:on-holdpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions