Skip to content

feat(showcase): Revenue Pulse — interactive dashboard-level filters demo over two objects (#2501)#3038

Merged
os-zhuang merged 1 commit into
mainfrom
claude/dashboard-filters-followups-kd45yo
Jul 16, 2026
Merged

feat(showcase): Revenue Pulse — interactive dashboard-level filters demo over two objects (#2501)#3038
os-zhuang merged 1 commit into
mainfrom
claude/dashboard-filters-followups-kd45yo

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Second follow-up round for objectstack-ai/objectui#2578 (item 1, last two bullets): an interactive dashboard-level-filters showcase with a real dataSource and seed data over two different objects — the acceptance scenario of #2501 running on a live backend.

New showcase_revenue_pulse dashboard ("Revenue Pulse (filtered)" under Analytics in the showcase app): one dateRange + one region select filter driving invoice and account charts, each widget mapping the filters to its own fields via filterBindings:

  • date range → issued_on (invoice default) vs signed_on (account override);
  • region → region (invoice default) vs sales_region (account override);
  • one "Accounts (all time)" KPI opted out of both (filterBindings: { dateRange: false, region: false }) as the fixed reference.

Changes

  • Objects: showcase_account gains sales_region (select amer/emea/apac) + signed_on (date); showcase_invoice gains region (select). Select option values are lowercase (the schema normalizer rejects uppercase values — caught live during verification).
  • Seed: accounts carry regions + signed_on spread over ~2.5 years (prospects deliberately unsigned, so date-scoped account charts exclude them); invoices grow 4 → 12, spread across ~6 months and all three regions so filter changes move the charts visibly.
  • Datasets: showcase_invoice_metrics (count, subtotal-sum; month-granular issued_on) + showcase_account_metrics (count, revenue-sum; month-granular signed_on).
  • Registration: objectstack.config.ts dashboards/datasets, Analytics nav entry, coverage.ts note.

Verification (live server, objectstack dev --seed-admin --fresh)

  • Dashboard metadata round-trips GlobalFilterSchema.name + DashboardWidgetSchema.filterBindings through spec validation (GET /api/v1/meta/dashboard/showcase_revenue_pulse).
  • POST /api/v1/analytics/dataset/query with runtimeFilter produces correctly scoped SQL and rows:
    • invoices: 12 all-time → 7 in last 90 days → 4 with region=amer; month grouping returns 3 buckets;
    • accounts: all-time 14 (opt-out KPI) vs signed_on last-365d + sales_region=amer → 2; industry grouping under sales_region=emea correct.
  • Seed loads with zero errors on a fresh DB; 55/55 showcase tests pass (pnpm test in examples/app-showcase).

No changeset — @objectstack/example-showcase is private/unpublished.

Refs #2501, objectstack-ai/objectui#2578

🤖 Generated with Claude Code

https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z


Generated by Claude Code

…emo over two objects (#2501, objectui#2578)

New showcase_revenue_pulse dashboard: one dateRange + one region filter
driving invoice AND account charts, each widget mapping the filters to ITS
OWN fields via filterBindings (issued_on/region on invoices vs
signed_on/sales_region on accounts), plus an all-time KPI opted out of both
— the acceptance scenario of #2501 on a real backend.

- objects: showcase_account gains sales_region (select) + signed_on (date);
  showcase_invoice gains region (select).
- seed: accounts carry regions + signed_on spread over ~2.5 years
  (prospects deliberately unsigned); invoices grow 4 → 12 spread across ~6
  months and all three regions so filter changes move the charts visibly.
- datasets: showcase_invoice_metrics + showcase_account_metrics
  (count/sum measures, month-granular date dimensions).
- registered in objectstack.config.ts + Analytics nav ('Revenue Pulse
  (filtered)'); coverage.ts notes the filters demo.

Verified against a live server (objectstack dev --fresh): dashboard
metadata round-trips name/filterBindings through spec validation, and
dataset queries with runtimeFilter produce correct scoped SQL and rows
(12 invoices all-time → 7 in last 90d → 4 with region=amer; account-side
signed_on/sales_region re-mapping and month/industry groupings correct).
55/55 showcase tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Error Error Jul 16, 2026 9:09am

Request Review

@os-zhuang os-zhuang marked this pull request as ready for review July 16, 2026 09:39
@os-zhuang os-zhuang merged commit ef3fdd7 into main Jul 16, 2026
14 of 15 checks passed
@os-zhuang os-zhuang deleted the claude/dashboard-filters-followups-kd45yo branch July 16, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants