Skip to content

feat(analytics): separate demo and real payment metrics#65

Open
afeezorobsco-cyber wants to merge 2 commits into
emrekayat:mainfrom
afeezorobsco-cyber:feat/analytics-demo-real-split
Open

feat(analytics): separate demo and real payment metrics#65
afeezorobsco-cyber wants to merge 2 commits into
emrekayat:mainfrom
afeezorobsco-cyber:feat/analytics-demo-real-split

Conversation

@afeezorobsco-cyber

Copy link
Copy Markdown

##close #53

Summary

This PR enhances the analytics API and dashboard by clearly separating demo query activity from real settled Stellar payment activity, improving transparency for users, investors, and ecosystem partners.

Changes

  • Extended /api/analytics to distinguish demo queries from real settled payments.
  • Added aggregate metrics for:
    • Total demo query count
    • Total real settled payment count
    • Spend grouped by payment source
  • Added separate recent activity lists for demo evidence and real payment evidence.
  • Updated shared analytics types to support the extended response shape.
  • Updated the Control Deck dashboard to clearly distinguish demo activity from on-chain payment activity.
  • Preserved backward compatibility with the existing analytics response wherever possible.
  • Added tests covering the new analytics fields, response shape, and demo/real split.

Testing

  • Verified analytics response includes both demo and real metrics.
  • Verified dashboard labels clearly distinguish demo activity from settled on-chain payments.
  • Verified existing analytics behavior remains backward compatible.
  • All existing tests continue to pass.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@afeezorobsco-cyber is attempting to deploy a commit to the emrekayat's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@afeezorobsco-cyber Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@afeezorobsco-cyber

Copy link
Copy Markdown
Author

@emrekayat pls review and merge

@emrekayat

Copy link
Copy Markdown
Owner

Thanks for the update. I rechecked this one from the emrekayat account.

What passed locally:

  • npm run test --workspace @query402/api
  • npm run typecheck --workspaces
  • npm run build --workspaces
  • git diff --check origin/main...HEAD

I cannot merge it yet for two reasons:

  1. GitHub currently reports the branch as CONFLICTING / DIRTY, so it needs to be rebased or merged with the latest main.
  2. The PR adds root production dependencies for @rollup/rollup-darwin-x64 and vitest. Those look accidental for this analytics/UI change. Please remove the root dependencies block and regenerate the lockfile so this PR only carries the analytics/shared/web changes it needs.

After that, I can recheck and merge if the same tests stay green.

@afeezorobsco-cyber afeezorobsco-cyber force-pushed the feat/analytics-demo-real-split branch from e97245b to ac0a5d3 Compare June 30, 2026 04:03
@afeezorobsco-cyber

Copy link
Copy Markdown
Author

@emrekayat Thanks for the review. I've rebased the branch onto the latest upstream main, resolved the merge conflicts, removed the accidental root dependency changes (@rollup/rollup-darwin-x64 and vitest), and regenerated the lockfile so the PR remains scoped to the analytics demo-vs-real payment split. Everything should now be up to date and ready for another review. Thanks!

@afeezorobsco-cyber

Copy link
Copy Markdown
Author

@emrekayat pls review and merge

@emrekayat

Copy link
Copy Markdown
Owner

Rechecked from emrekayat. The API analytics tests pass, but the PR is not merge-ready because web typecheck fails.

Passing checks:

  • npm run test --workspace @query402/api -- src/routes/public.test.ts
  • npm run typecheck --workspace @query402/api

Failing check:

  • npm run typecheck --workspace @query402/web

Errors are in apps/web/src/pages/ControlDeckPage.tsx around the recent real-payment row rendering:

  • line 704: transactionHash does not exist on the row type
  • line 707: transactionHash does not exist on the row type
  • line 711: transactionHash does not exist on the row type

Please either add transactionHash to the typed real-payment analytics row returned by the API/shared contract, or adjust the UI to use fields that are actually present. After that, this should be ready for another pass.

@afeezorobsco-cyber afeezorobsco-cyber force-pushed the feat/analytics-demo-real-split branch from 4302262 to 94981ef Compare June 30, 2026 19:19
@afeezorobsco-cyber

Copy link
Copy Markdown
Author

@emrekayat Thanks for the review. you can check now and merge

@afeezorobsco-cyber afeezorobsco-cyber force-pushed the feat/analytics-demo-real-split branch from 94981ef to 78005fc Compare July 1, 2026 07:27
@afeezorobsco-cyber

Copy link
Copy Markdown
Author

@emrekayat pls review and merge

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add analytics demo-vs-real payment split to dashboard and API

2 participants