Skip to content

showcase: money reads four ways — expense-report roll-ups show 1,500.5 / 917 beside 225.75, budget has no currency, budget_remaining drops the decimals, and two dashboards print the same total as 109万 and 1,090,000 #25504

Closed

Description

@objectstack-fleet

Filing-gate: ① product defect · reach: the Expense Reports list, the Projects list and the two dashboards, as admin in zh-CN
Reader: objectstack triage seat → the lane that owns examples/app-showcase; the fixes are declarations on src/data/objects/expense-report.object.ts and project.object.ts (scale / currencyConfig / a formula result type) and the KPI format on the two pages
Duplicate search: semantic search "showcase expense report total summary currency format decimals budget no currency symbol" in objectstack, incl. closed → 2 hits: #8345 (open, multi-currency conversion, unrelated) and #22727 (closed, a formula could not declare a currency result). Neither covers these declarations.

Measured during an exploratory showcase walkthrough on 2026-10-23: objectstack main b9c7a8f (PORT=3000 pnpm dev, stock showcase), objectui main 6fb31dc console (Vite dev, :5180), locale zh-CN.

What happens

  • Expense Reports → Total (total_amount, a sum roll-up over the currency field showcase_expense_line.amount): one column reads 225.75, 917, 8,900 and 1,500.5. The roll-up declares no scale. objectui#11752 made a summary format at its natural precision unless the author declares one, so this is the showcase's declaration to make. The same applies to approved_amount and reimbursable_amount (960, 512 on EXP-2001).
  • Projects → Budget (Field.currency with no currencyConfig) reads 200,000.00 with no currency, while Accounts → Annual Revenue (currencyConfig: { defaultCurrency: 'USD' }) reads US$12,000,000.00.
  • Projects → Budget Remaining (a formula over two currency fields) reads 200,000 beside 200,000.00.
  • The command center KPI shows 109万, and Delivery Operations → Total Budget shows 1,090,000 for the same sum.

Expected

Within the showcase, every money column of one currency reads in the same format: two decimals, and one currency treatment throughout. The two dashboards agree on how a total budget is written. The showcase is the app people copy from, so its money fields should carry the declarations that give that result.

Session: https://claude.ai/code/session_01A48x1XYLTmiM2pgQxsgeKJ

Activity

  1. added
    area:recordsBusiness objects, records, the views that show data, usable forms, search
    bugSomething isn't working
    domain:serverDomain lane — seat card indexed by label:pm:seat
    on Oct 23, 2026
  2. objectstack-fleet commented on Oct 23, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: lands in examples/app-showcase/src/data/objects/expense-report.object.ts and project.object.ts (scale, currencyConfig, the formula result type) plus the KPI format on the two dashboard pages; rationale: showcase declarations only; the renderers already honour these keys (objectui#11752).
    Path: records · 每种字段都渲染得出 | none (showcase content) | step ②
    Grade: priority:p3 — inconsistent but correct numbers in demo content.
    Type: Bug

    Session: session_01AkmasAfXt3cu83xGzkuKhe (objectstack triage, run on the maintainer's request in the project thread)


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 23, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1 · domain:services seat 1 (seat post #6021, project run by the Sales account) · S mechanical card, in-seat subagent · 2026-10-23T21:05Z
    Session: session_016g7nYP9wdNx1GDa5XDr7Uy
    Account: os-sales (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-25504-showcase-money-format
    Worktree: objectstack-issue-25504
    Domain: domain:server
    Seat: domain:services#1
    File surface: examples/app-showcase/src/data/objects/expense-report.object.ts (scale on the total_amount / approved_amount / reimbursable_amount roll-ups), project.object.ts (currencyConfig on budget, a currency result type on the budget_remaining formula), and the KPI format on src/ui/pages/command-center.page.ts and the Delivery Operations dashboard so the two total-budget figures read alike. Plus a showcase pin. ⛔ packages/spec and objectui are not edited; a declaration the spec lacks is reported, not worked around. Stop on breach; explain in the report.
    Container & model: S 级机械卡, mode:subagent (general-purpose subagent loading .claude/agents/os-dev.md as its role file), model: default tier, effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: one money column reads four ways (225.75 / 917 / 1,500.5), Budget has no currency beside a US$ column, and the two dashboards write one total two ways | anyone copying the showcase's money declarations | today
    Thread-read: none
    Serial constraints cleared: #25534 (command-center.page.ts) merged as 8ef2a96bd5; no open PR touches these files at claim (open PRs read at 2026-10-23T21:04:00Z on 8ef2a96bd5).
    Resume-from: none

  4. objectstack-fleet commented on Oct 23, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 25504,
    "status": "done",
    "branch": "claude/issue-25504-showcase-money-format",
    "pr": "#25543",
    "session": "session_016g7nYP9wdNx1GDa5XDr7Uy",
    "premise_still_valid": true,
    "summary": "Showcase money now reads one way, by declarations only in examples/app-showcase. The changes: scale 2 on the total_amount, approved_amount and reimbursable_amount roll-ups; currencyConfig fixed USD (the Accounts value) on project budget, and on spent; returnType currency, currencyConfig USD and scale 2 on the budget_remaining formula; one total-budget format, 0,0.00 with USD, on both dashboards. The Command Center sets it on cc_k6 through kpi(), which gains an optional currency argument. Delivery Operations sets it on the budget_sum measure in chart-gallery.dataset.ts, because a dataset-bound widget has no format key of its own (DashboardWidget.options docblock); spent_sum moves with budget_sum. In-place addition beyond the claim: spent declares USD too. inferFormulaReturn calls two different currencies meeting unproven, so a currency result on budget minus spent is honest only when both are USD. With both USD it stamps exactly the declared pair, and the pin asserts that. Card assignee untouched; PR assignee os-sales.",
    "tests": "New pin examples/app-showcase/test/money-format-declarations.test.ts, 5 cases: roll-up scale, budget/spent currencyConfig equal to annual_revenue's, the formula's currency result, the formula's result equal to inferFormulaReturn's stamp, and cc_k6 format/currency equal to the budget_sum format and resolved currency. Pin alone: Tests 5 passed (5). Ablation via scripts/ablation-replace.mjs on committed 2a70334 with an EXIT/INT/TERM trap, every anchor hit as declared and the blob changed. Leg A: delete the 3 roll-up scale lines, 1 failed / 4 passed. Leg B: drop budget currencyConfig, 3 failed / 2 passed. Leg C: drop formula returnType, 2 failed / 3 passed. Leg D: BUDGET_FORMAT changed to 0.0a, 1 failed / 4 passed. Every restore was proven by blob == HEAD and an empty git diff HEAD, and git status --porcelain was empty after. No build/dist leg: the showcase pin reads app source directly, and @objectstack/formula is aliased to src. On final head 5afdc0d (origin/main 5ea211c merged), under os-verify-lock, VERDICT command-exit 0: showcase typecheck exit 0 (tsc --listFiles includes the pin); showcase vitest Test Files 39 passed (39), Tests 483 passed (483); os validate passed with 64 warnings, a sorted set identical to the same run with the four source files restored to base 8ef2a96.",
    "gates": "dispatch-gates --commands on 5afdc0d derived 46 commands, each run with its exit code captured before any pipe. 45 exited 0. pnpm check:dual-build-cjs-loads exited 3, PREREQUISITE NOT MET: it needs a whole-workspace dist, and only the showcase closure was built. It is NOT MEASURED locally; CI Lint and Repo Gates runs it. dispatch-gates --ran with the exit codes: 46 derived famil(ies) accounted for, 45 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). PR check-runs at report time on 5afdc0d (28 runs): Check Changeset success, No other open PR may claim the same issue success; Type Check lanes, Lint lanes, Governed Surface Queue Guard, the claim-branch check and the rest in_progress; the opt-in harnesses skipped. Test Core and Build Core not yet listed.",
    "dogfood_battery": "n/a: no ! in the PR title, and Clause-② is no with no (narrowing) arm",
    "mcp_calls": "0",
    "api_writes": "2 relay writes plus git push: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/dispatches, which landed POST pulls, POST issues/25543/assignees and POST issues/25543/labels with skip-changeset), and this os-dev-report comment through post-stamped.mjs (POST issues/25504/comments). git push of the branch: 3 pushes, direct.",
    "open_questions": [],
    "out_of_scope_findings": [
    "class: none (capability gap, noted not filed) · reach: Expense Reports list, roll-ups read 1,500.50 with no currency · evidence: FieldSchema.returnType is described as the value type of a formula field (packages/spec/src/data/field.zod.ts:1880); the @object-ui/fields 18.0.0 SummaryField docblock says a summary declares no returnType; packages/formula/src/formula-return.ts says a roll-up of a currency field is itself money. A summary over a currency field has no spec channel for its currency, so the expense line amount was left without a currencyConfig, keeping Expense Reports self-consistent (two decimals, no symbol) · carrier: none, noted in the PR Acceptance notes · dedupe words: summary roll-up currency returnType, rollup money currencyConfig, summary over currency field symbol",
    "class: none (scope edge) · other showcase money measures subtotal_sum and revenue_sum (revenue-pulse.dataset.ts, format 0,0) are untouched · carrier: none, noted in the PR Acceptance notes"
    ]
    }


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 23, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · domain:services seat 1 (seat post #6021) · os-sales · session_016g7nYP9wdNx1GDa5XDr7Uy · 2026-10-23T22:18Z

    reading value
    PR #25543 MERGED through the queue (ACCEPT 6375610066), head 5afdc0d797
    origin/main carries 4df174bcc4

    State: Fixes #25504 closed the card. pm:dispatched is now off and the assignee is cleared.


    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, searchbugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions