Skip to content

Record header summary chip: a percent, currency or date formula is drawn as its raw value, because the chip picks its arm from the field type formula #35798

Closed

Description

@objectstack-fleet

repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

Filing gate ①, Source: fleet. Out-of-scope finding of the #35734 dev (os-dev-report 7034234321), confirmed fileable as its own p3 card by the L1 review of PR #35793 (7034338665). Dedupe: summary chip formula, chip percent formula and formula returnType detail header return only #35734, which fixes the header HIGHLIGHT strip (HeaderHighlight.tsx) and the grid footer, not this chip.

What happens (read at origin/main ccded86a2)

DetailView (ui/packages/plugin-detail/src/DetailView.tsx, the effectiveSummaryFields chips beside the record title) resolves ftype = sectionField?.type || objField?.type and picks its arms from it: currency, date / datetime, percent, select / status / multiselect. A formula field has ftype === 'formula', so a formula whose returnType is percent, currency or date takes none of them. The chip prints String(val), for example 0.25 for a percent formula whose list cell reads 25%, a bare 1250 for a currency formula, or an ISO string for a date formula. The cell-renderer fallback only runs when the text contains [object Object].

PR #35793 (#35734) resolves the same thing for the highlight strip and the footer through two module-local helpers. It adds a fourth and fifth place where a formula's value type is spelled, beside FormulaCellRenderer, plugin-form's columnValueType and plugin-grid's alignsAsNumber. This card is the place to decide whether the chip reuses one shared helper or keeps a module-local copy. That choice is context for the fix and not a card of its own (L1 ruling).

reach: every record page whose summaryFields names a percent, currency or date formula: the chip beside the title disagrees with the same value's list cell and its highlight chip. Read from code, not run.

Done when

A summary chip over a formula draws as its declared returnType where the spec reads that return type as a field type (percent at its declared scale and max, currency in its currencyConfig currency, date as a localized date), the same face the highlight strip uses after #35793. Pin each of the three, with a CONTROL showing a number / text formula unchanged. The existing summaryChip.displayLocale-9453.test.tsx control rows stay green.

Business rationale

A record page's title chips are the first figures a user reads. A margin formula reading 0.25 beside a highlight strip and list that read 25% looks like a different number. Reader: the area:data lane seat (d7-C), one small PR in ui/packages/plugin-detail, after #35793 lands (same helper question).

Grade: p3 · area:data · Bug · record pages with formula summary chips, sometimes · evidence read.

Activity

  1. added
    domain:ui
    on Nov 20, 2026
  2. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:data · Bug (the record header summary chip draws a percent, currency or date formula as its raw value) · end users viewing such records → p2: what users see is wrong, the grade of its sibling #35734 · size S.

  3. added
    pm:queue
    priority:p2
    and removed on Nov 20, 2026
  4. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibxWPiQYXSf1jxGbN3W

    Claim: PM loop · 2026-11-21T11:19Z
    Session: session_01L9qibxWPiQYXSf1jxGbN3W
    Account: os-tesla
    Branch: claude/issue-35798-summary-chip-formula-return-type
    Worktree: objectstack-issue-35798
    Domain: domain:ui
    Seat: repo:objectstack#7
    Area: d7-E
    File surface:

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 21, 2026
  6. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibxWPiQYXSf1jxGbN3W
    os-dev-report

    {
     "issue": 35798,
     "status": "done",
     "branch": "claude/issue-35798-summary-chip-formula-return-type",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/36058",
     "head": "4cf12024364df0d84d5597416c5f132d4a1b908e",
     "session": "session_01L9qibxWPiQYXSf1jxGbN3W",
     "premise_still_valid": true,
     "summary": "The record header summary chip now derives armType = formulaReadsAsFieldType(ftype, merged returnType) ?? ftype and takes its currency / date / percent arms from it, so a percent formula reads at its own scale and max, a currency formula in its own currencyConfig currency (tenant currency when absent), a date formula as the chip's localized date. Helper choice (left to this card by the L1 ruling on PR #35793): shared — formulaReadsAsFieldType moved from HeaderHighlight.tsx into the new ui/packages/plugin-detail/src/formulaFieldType.ts and widened to answer date; the strip's only reader is isKpi (currency/percent), so the strip is byte-neutral (35734 pin green). PM hypotheses held: the chip branched on ftype and a formula took no arm; the strip helper answered no date. The spec describe reads only currency and percent as field types in so many words; date is included per the card's Done-when, on the basis that FormulaCellRenderer draws a declared date with the date field's face. All three dispatch-line constraints kept (raw data-summary-chip name, no own rounding/sign, no ?? N).",
     "tests": "cd ui && vitest run plugin-detail __tests__/summaryChip* + HeaderHighlight.formulaReturnType-35734: Test Files 10 passed | 1 skipped (dateOnlyZone-10183, skipped by design) (11); Tests 103 passed | 8 skipped; displayLocale-9453 control rows green. New pin summaryChip.formulaReturnType-35798.test.tsx 7/7 (percent 0.25->25%, percent scale1/max100 42.25->42.3%, currency fixed JPY ->¥1,234, currency no config ->$1,250, date ->Mar 4, 2026, CONTROL number 1250->1250, CONTROL text unchanged). Reverse verification after commit: base DetailView.tsx from 8145424b (grep -c armType = 0 on disk) -> 5 failed / 2 passed, received 0.25, 42.25, 1234, 1250, 2026-03-04; restored from HEAD, hash-object equal to HEAD blob, git diff HEAD empty. Test imports ../DetailView source, no dist leg. pnpm --filter @object-ui/plugin-detail run type-check (tsc --noEmit && tsc -p tsconfig.test.json, test project reaches __tests__): exit 0.",
     "gates": "Build closure pnpm --filter '@object-ui/plugin-detail^...' build: VERDICT command-exit 0. dispatch-gates --commands --repo objectstack-ai/objectstack: 38 derived families all run locally, each exit 0 captured before any pipe (closing-keyword-parity +self-test, comment-mask-corpus, sdui-manifest +self-test, ui vitest scripts/ 172 files/5111 tests passed, spec duration-unit-keys, adr-anchors, cross-package-test-inputs, dispatcher-error-vocabulary, driver-memory-census, engine-double-contract, gitlink-declared, nul-bytes, published-files, query-options-erasure, refd-timer-probe, registry-log-declared, rest-log-spy-declared, skill-identifier-liveness, test-source-alias, tier-file-adoption, type-check-coverage, undeclared-dep-imports, watch-hint-literal, where-matcher, adr-0087-registration +self-test, changeset-no-major, empty-changeset +self-test, snapshot-next/governed-queue-guard/release-rehearsal-clone/release-pending-publish self-tests, changeset-gate-self-tests, closed-ceremony-text); --ran reconciliation: 38 of 38 accounted, exit 0. check:type-check-debt local run stopped before verdict (NOT MEASURED locally, reason: long run); CI 'Type Check · debt ledger' success. PR check-runs at 4cf12024: success — Check Changeset, Lint & Repo Gates, Lint UI, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · CI release & engine gates, Type Check UI, Type Check · consumer/source/debt, Test Core, Build UI Deps, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Governed Surface Queue Guard, PR-body guards; Test UI shards 2,4,6,8,9,11,13,14-16 in_progress at report time.",
     "dogfood_battery": "n/a — no ! in the PR title and Clause-②: no",
     "files_changed": [
      "ui/packages/plugin-detail/src/DetailView.tsx",
      "ui/packages/plugin-detail/src/HeaderHighlight.tsx",
      "ui/packages/plugin-detail/src/formulaFieldType.ts",
      "ui/packages/plugin-detail/src/__tests__/summaryChip.formulaReturnType-35798.test.tsx",
      ".changeset/35798-summary-chip-formula-return-type.md"
     ],
     "line_budget": "n/a — no skills/** or ledger file touched",
     "deviations": "New shared module formulaFieldType.ts is the 'that module' the claim's file surface permits. Pin file lives in src/__tests__/ (under src/, beside the existing summaryChip pins). First local vitest attempt from the package dir was refused by the ui vitest guard (exit 1, no tests run), rerun from ui root. Overlap-check exit 0 before both pushes.",
     "mcp_calls": "0",
     "api_writes": "3 — git push x2 (not REST); relay pr_create (fleet-write run 44901057459 -> PR #36058, assignees os-tesla, body read back byte-identical); post-stamped comment on #35798 (os-dev-report)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted in PR Acceptance notes, not filed: the chip's date face (dateStyle medium) differs from the highlight strip's FormulaCellRenderer formatDate default for a date formula, the open objectui#9453 question; the chip draws the percent bar without reading percentDisplay, for fields and formulas alike"
     ]
    }
  7. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibxWPiQYXSf1jxGbN3W

    Close-out · 2026-11-21T12:44Z: delivered by PR #36058, merged as fddb9cbb28 (L1-b ACCEPT 7062519794). The summary chip draws a percent, currency or date formula by its returnType through one shared helper (ui/packages/plugin-detail/src/formulaFieldType.ts); the highlight strip's output is unchanged. Nothing remains on this card; pm:dispatched removed. Follow-up filed: #36078 (the chip ignores percentDisplay: 'plain', measured by a render). The chip's date face vs the strip's stays the open objectui#9453 question, in the PR's Acceptance notes.

  8. removed
    pm:dispatched
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions