feat(showcase): Revenue Pulse — interactive dashboard-level filters demo over two objects (#2501)#3038
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_pulsedashboard ("Revenue Pulse (filtered)" under Analytics in the showcase app): onedateRange+ one regionselectfilter driving invoice and account charts, each widget mapping the filters to its own fields viafilterBindings:issued_on(invoice default) vssigned_on(account override);region(invoice default) vssales_region(account override);filterBindings: { dateRange: false, region: false }) as the fixed reference.Changes
showcase_accountgainssales_region(select amer/emea/apac) +signed_on(date);showcase_invoicegainsregion(select). Select option values are lowercase (the schema normalizer rejects uppercase values — caught live during verification).signed_onspread 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.showcase_invoice_metrics(count, subtotal-sum; month-granularissued_on) +showcase_account_metrics(count, revenue-sum; month-granularsigned_on).objectstack.config.tsdashboards/datasets, Analytics nav entry,coverage.tsnote.Verification (live server,
objectstack dev --seed-admin --fresh)GlobalFilterSchema.name+DashboardWidgetSchema.filterBindingsthrough spec validation (GET /api/v1/meta/dashboard/showcase_revenue_pulse).POST /api/v1/analytics/dataset/querywithruntimeFilterproduces correctly scoped SQL and rows:region=amer; month grouping returns 3 buckets;signed_onlast-365d +sales_region=amer→ 2; industry grouping undersales_region=emeacorrect.pnpm testinexamples/app-showcase).No changeset —
@objectstack/example-showcaseis private/unpublished.Refs #2501, objectstack-ai/objectui#2578
🤖 Generated with Claude Code
https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z
Generated by Claude Code