Skip to content

feat: expose admin user value analytics APIs - #444

Merged
MrParamecium merged 16 commits into
mainfrom
feature/admin-user-value-analytics
Sep 4, 2026
Merged

feat: expose admin user value analytics APIs#444
MrParamecium merged 16 commits into
mainfrom
feature/admin-user-value-analytics

Conversation

@MrParamecium

Copy link
Copy Markdown
Collaborator

Summary

  • expose Admin Analytics lifecycle, retention, commercial, and operational value endpoints
  • enrich user lists and profiles with lifecycle, operational, commercial, and priority signals
  • validate UTC date ranges, filters, safe errors, admin-only access, and independent section availability
  • add display-safe synthetic fixtures and frontend/API contract coverage
  • keep legacy and dual-axis snapshots synchronized after server-authoritative analytics events

Verification

  • python -m py_compile dashboard/backend/api/routers/admin_analytics.py
  • pytest -q dashboard/backend/tests/domain/analytics dashboard/backend/tests/test_admin_analytics_api.py dashboard/backend/tests/test_analytics_integration.py dashboard/backend/tests/test_analytics_maintenance.py dashboard/backend/tests/test_admin_analytics_frontend.py
  • Result: 232 passed, 5 skipped

Safety

  • no production credentials, raw event payloads, or real user data
  • dashboard/storage/data/backtest.db and .superpowers/ are not included

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
agentic-trading-lab Ready Ready Preview Sep 4, 2026 6:34am UTC

Comment thread dashboard/backend/domain/analytics/query_service.py Fixed
Comment thread dashboard/backend/domain/analytics/value_queries.py Fixed
Comment thread dashboard/backend/domain/analytics/value_queries.py Fixed
Comment thread dashboard/backend/domain/analytics/value_queries.py Fixed
Comment thread dashboard/backend/domain/analytics/value_queries.py Fixed
Comment on lines +19 to +23
from .value_repository import (
LIFECYCLE_ROLLUP_METRICS,
UserLifecycleDailySnapshot,
ValueAnalyticsStore,
)

analytics_service = AnalyticsService(store=analytics_store)
def _build_analytics_service() -> AnalyticsService:
from .states import AnalyticsStateStore
analytics_service = AnalyticsService(store=analytics_store)
def _build_analytics_service() -> AnalyticsService:
from .states import AnalyticsStateStore
from .value_repository import ValueAnalyticsStore
Comment on lines +23 to +27
from .value_repository import (
UserLifecycleDailySnapshot,
UserValueSnapshot,
ValueAnalyticsStore,
)
Comment on lines +1025 to +1027
from dashboard.backend.domain.model_providers.service import (
ModelProviderService,
)

global _value_analytics_query_service
if _value_analytics_query_service is None:
from .value_queries import ValueAnalyticsQueryService
Comment on lines +20 to +25
from .query_service import (
AnalyticsQueryService,
AnalyticsQueryStore,
AnalyticsUserProfile,
FailureCategoryCount,
)
@MrParamecium

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d16512d724

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dashboard/frontend/js/admin-analytics-value.js
Comment thread dashboard/frontend/js/admin-analytics.js Outdated
Comment thread dashboard/backend/domain/analytics/service.py
Comment thread dashboard/frontend/js/admin-analytics.js Outdated
@MrParamecium
MrParamecium merged commit 4388762 into main Sep 4, 2026
8 checks passed
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.

2 participants