Skip to content

fix(plugin-detail): a returnType currency formula reads as money in related lists and the quick-look panel - #27800

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-28figz
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-28figz

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

Requested by Bill · project thread
Refs #27430 (row 1's remainder only; rows 2 to 4 stay open)
Refs #27494

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

Triage ruling (6495354739 on #27494): the formula cell reads returnType and uses the currency field's existing currency face. PR #27689 did that for the list grid's configured columns and the record page's ENRICHED_FIELD_METADATA_KEYS. Two more places in @object-ui/plugin-detail rebuild a field from a hand-picked key list and dropped returnType, so FormulaCellRenderer / FormulaField's existing currency branch never saw it:

  1. RelatedList.tsx, the makeCell field bag: returnType is forwarded beside currencyConfig, only when the def declares it (the bag's own ...(x && { k }) idiom).
  2. RecordDetailPanel.tsx, buildRecordDetailFields (the quick-look overlay, a published export): returnType is copied beside currencyConfig.

No second money formatter, no spec change, no new key. buildRecordDetailFields's signature and return type (Array of Record string-to-any) are unchanged, so Clause-②: no; returnType is already a declared FieldSchema key, so Metadata-protocol: none.

Changeset: @object-ui/plugin-detail patch.

Tests

New ui/packages/plugin-detail/src/__tests__/formulaReturnTypeRelay-27430.test.tsx, the same pin shape as #27689 (a formula with returnType: 'currency', currencyConfig: { currencyMode: 'fixed', defaultCurrency: 'USD' }, scale: 2, value 90000; a returnType: 'number' control at 1234.5):

  • CONTROL: the fixture formula is spec-valid (FieldSchema.safeParse).
  • buildRecordDetailFields carries returnType for both formulas.
  • RecordDetailPanel draws $90,000.00 beside $150,000.00; the number formula draws 1,234.50 with no currency sign.
  • RelatedList table cells: $90,000.00; the number formula cell is 1,234.50 with no currency sign.

Ablation (scripts/ablation-replace.mjs, each fix line deleted on its own, anchor 1 to 0, restored to the HEAD blob with git diff HEAD empty; vitest resolves the package from src):

  • RelatedList line deleted: 1 failed, 3 passed; the cells read ["Tower","$150,000.00","90,000.00","1,234.50"].
  • RecordDetailPanel line deleted: 2 failed, 2 passed (expected undefined to be 'currency'; the panel text lacks $90,000.00).

Acceptance notes

  • The related list's page totals (BodyTableTotals) sum only TOTALLED_FIELD_TYPES and take the currency from a currency field's def; a formula column gets no total, as before. Not changed here.

Verification

Targeted tests, typecheck and lint
  • New file: Test Files 1 passed (1), Tests 4 passed (4).
  • pnpm --filter @object-ui/plugin-detail test (whole package, before the origin/main merge): Test Files 338 passed | 1 skipped (339), Tests 3078 passed | 18 skipped (3096), lock VERDICT command-exit 0.
  • pnpm --filter @object-ui/plugin-detail type-check exit 0 and lint exit 0 (before the merge); type-check exit 0 again at merged head 60638520.
  • At merged head 60638520 (main moved 8 commits, none under ui/packages/plugin-detail, fields or the components renderers): the new file plus currencyConfigRelay-12242 and formulaReturnTypeRelay-27494, exit 0.
Derived gates (dispatch-gates --commands, 34 families)

Run twice, at 4d4d462b+changeset and again at merged head 60638520; the derivation was identical both times. All 34 exit 0; dispatch-gates --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN. Includes check-sdui-manifest (and its self-test), check:nul-bytes, check:type-check-debt, check:type-check-coverage, check:published-files, check:test-source-alias, check-empty-changeset, check-changeset-no-major, check-closing-keyword-parity. Every other family is CI's; the seat reads the PR's check-runs.


Generated by Claude Code

…he related list and the quick-look panel

Claude-Session: https://claude.ai/code/session_01Utp6CYEbuRp8dS61F3RKwo
Co-authored-by: Claude <noreply@anthropic.com>
…formula currency

Claude-Session: https://claude.ai/code/session_01Utp6CYEbuRp8dS61F3RKwo
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 29, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

Seat note — Lint & Repo Gates red on head 60638520 judged a flake; the branch takes origin/main to get a fresh run (2026-10-30T00:15Z).

  • The roster failed only because member lint-ci-engine concluded cancelled (run 40974536704, job 123799196526). The job never asserted anything; it stopped when it hit its 30-minute job timeout.
  • It hung in step 59, "No committed pnpm call spells a flag the pnpm 11 frontend rejects". That step started at 2026-10-29T23:43Z and was still running when the job was cancelled at 2026-10-30T00:13Z. Every step after it shows no conclusion. The steps before it all passed.
  • This PR touches only ui/packages/plugin-detail files and a changeset. It changes no pnpm invocation, no workflow and no manifest.
  • In the same window, the same workflow went green on other PRs and merge groups (40977365555, 40977298782, 40977068868, 40976885459).
  • The relay re-runs only ci.yml failures, so this lint.yml cancel cannot be re-run in place. The card thread merges origin/main into the branch and pushes, which starts a fresh run. A second red on that run counts as real.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

席位核对

ACCEPT · head 1aea8b8f876d06ec20ea62d344d58397fffe04d8 · 2026-10-30T00:32Z

  1. Shape: draft → main, Refs #27430 (row 1's remainder only; rows 2–4 stay open) and Refs #27494, attribution block on top, root changeset. Four files: RelatedList.tsx (+5), RecordDetailPanel.tsx (+5), the new test formulaReturnTypeRelay-27430.test.tsx (+112), and the changeset (+10). No assignee, no reviewer.

  2. Card rule met (seat read the diff): the two hand-picked field rebuilds that fix(plugin-grid, plugin-detail): a returnType currency formula reads as money in list cells and on the record page #27689 did not reach now forward the formula's declared returnType:

    • buildRecordDetailFields sets returnType: def.returnType (the quick-look panel);
    • the RelatedList column map adds ...(def.returnType && { returnType: def.returnType }).

    The formula cell's existing currency branch then draws the money face with the currencyConfig already forwarded beside it. There is no new formatter and no spec change. The pins: a spec-valid control fixture; buildRecordDetailFields carries returnType; the panel and the related-list cell both read a currency formula as money, while a number formula stays bare.

  3. Gates (check-runs on this head): 44 success, 11 skipped, 0 red.

    • Named runs: Lint & Repo Gates 123815248202, TypeScript Type Check 123815531222, Test UI 123817432450.
    • The previous head's red was the lint-ci-engine timeout cancel, judged a flake (seat note 6511658183). The fresh run after merging origin/main is green, and the dev re-ran the new file at this head: 4/4.
  4. Contract review: not owed. Clause-②: no: buildRecordDetailFields returns Array<Record<string, any>>, so no exported shape changes. Metadata-protocol: none.

  5. Deviations: none.

  6. Landing: not governed (check-governed-merges --pr 27800: 0 of 4 paths hit the register), +132 / −0. The seat lands it: ready + auto-merge now. console analytics: a formula declared returnType currency renders as a bare number, a KPI tile cannot show its description, percent fields always draw a progress bar, and report charts cannot split a series by a second dimension #27430 stays open for rows 2–4.


Generated by Claude Code

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

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant