Skip to content

test(example-crm): lookup-dimension report fixture (sales by account)#2107

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/opportunity-account-lookup-report
Jun 21, 2026
Merged

test(example-crm): lookup-dimension report fixture (sales by account)#2107
xuyushun441-sys merged 1 commit into
mainfrom
feat/opportunity-account-lookup-report

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

Completes the example coverage for the dataset-render work. The raw-value lookup drill (ADR-0021 D2) — fixed client-side in objectui #1842 and gated correctly server-side — had no example exercising it. Paired with the currency propagation from #2102, this makes both high-risk render paths demonstrable in one report.

What

  • opportunity_metrics gains an account LOOKUP dimension. The analytics layer resolves the FK to the account's display name in rows, but exposes the raw FK via drillRawRows + dimensionFields — so a report drill filters by the stored id, not the (possibly non-unique) display name.
  • SalesByAccountReport (new) groups total_amount (USD, currency-aware via feat(analytics): propagate a measure's declared currency to the result field #2102) by account. One report now exercises both paths: Intl currency formatting and raw-value lookup drill.
  • service-analytics test (+1): a LOOKUP dimension is drillable — the mirror of the existing date-dimension exclusion test. Asserts object + dimensionFields + the raw FK in drillRawRows.

Tests

  • service-analytics query-dataset → 11 passed (+1 lookup-drillable).
  • app-crm typecheck → 0 errors (dataset parses, report type valid).

Notes

🤖 Generated with Claude Code

…count)

Demonstrates + exercises the raw-value lookup drill (ADR-0021 D2) end to end,
the path that had no example coverage:

- opportunity_metrics gains an `account` LOOKUP dimension. The analytics layer
  resolves the FK to the account's display name in `rows` but exposes the raw FK
  via drillRawRows + dimensionFields, so a drill filters by the stored id.
- A new `SalesByAccountReport` groups `total_amount` (USD, currency-aware) by
  account — so this one report exercises BOTH render paths: Intl currency
  formatting AND raw-value lookup drill.
- service-analytics test: a LOOKUP dimension is drillable (mirror of the
  date-dimension exclusion test) — asserts object + dimensionFields + raw FK.

Example is private; the service-analytics change is test-only (no shipped API
change) → no changeset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 7:38am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): packages/services.

5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/guides/packages.mdx (via packages/services)
  • content/docs/guides/runtime-services/audit-service.mdx (via packages/services)
  • content/docs/guides/runtime-services/index.mdx (via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx (via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx (via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@xuyushun441-sys
xuyushun441-sys merged commit 94c7c6e into main Jun 21, 2026
14 of 15 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the feat/opportunity-account-lookup-report branch June 21, 2026 07:39
xuyushun441-sys added a commit that referenced this pull request Jun 21, 2026
…2035) (#2108)

The fixture added in #2107 used a bare `: UI.ReportInput` typed literal, which
the `no-restricted-syntax` rule (#2035) disallows — metadata must go through its
`defineX` factory so it validates at parse time. The sibling sales-by-stage
report already uses `defineReport`; this aligns the new one. The CI lint only
checks changed files, so #2107 landed with the violation — this fixes it on main.

No behavior change: same exported `SalesByAccountReport`, same fields.

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
os-zhuang added a commit that referenced this pull request Jun 30, 2026
chore(dev): scenarios verification harness; drop redundant react-page PoC (#2107)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants