Skip to content

feat(control-panel): complete usage and value analytics dashboard - #354

Merged
JSONbored merged 4 commits into
JSONbored:mainfrom
kiannidev:feat/issue-134-usage-value-analytics
Jun 4, 2026
Merged

feat(control-panel): complete usage and value analytics dashboard#354
JSONbored merged 4 commits into
JSONbored:mainfrom
kiannidev:feat/issue-134-usage-value-analytics

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #134

Summary

  • Completes the operator Usage & value analytics dashboard at /app/analytics using hashed product_usage_* rollups (not audit_events or raw source).
  • Adds shared UI panels for weekly value metrics, product usage breakdown (MCP, GitHub commands, quiet skips, PR packets, decision packs, drift), adoption/retention by role, and command usefulness feedback.
  • Extracts buildOperatorDashboardPayload in src/services/operator-dashboard.ts and adds test/unit/operator-dashboard.test.ts for payload shape and redaction.
  • Restricts Analytics navigation to operator only so it matches GET /v1/app/operator-dashboard auth.

Scope

  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

Verified locally with npm run test:ci on Node v24.15.0 (repo requires Node >= 22 per .nvmrc). Fixes CI UI check failure on run 26912190264 (prettier/prettier in usage-analytics-panels.tsx and app.analytics.tsx).

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • None.

Coverage summary (npm run test:coverage): statements 99.08%, branches 97.00%, functions 98.40%, lines 99.66%. New tests: test/unit/operator-dashboard.test.ts (2 cases).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include screenshots or a short recording.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • Weekly report generation/export remains on /app/operator and existing scheduled/internal jobs; /app/analytics displays rollup-backed metrics from GET /v1/app/operator-dashboard.
  • Existing coverage: test/unit/product-usage.test.ts, test/unit/weekly-value-report.test.ts, test/integration/api.test.ts (operator-dashboard paths). New: test/unit/operator-dashboard.test.ts.
  • Add a screenshot of /app/analytics (operator session) before merge if reviewers require UI proof.

UI Evidence

Loaded — operator analytics
Loaded analytics
Empty — no rollup metrics yet
Empty analytics
Error — dashboard unavailable
Error analytics

@kiannidev
kiannidev requested a review from JSONbored as a code owner June 3, 2026 20:50
@dosubot dosubot Bot added the size:XL label Jun 3, 2026
kiannidev added a commit to kiannidev/gittensory that referenced this pull request Jun 3, 2026
Resolves CI eslint/prettier failures on usage-analytics-panels and
app.analytics for PR JSONbored#354.

Co-authored-by: Cursor <cursoragent@cursor.com>
kiannidev added a commit to kiannidev/gittensory that referenced this pull request Jun 3, 2026
Resolves CI eslint/prettier failures on usage-analytics-panels and
app.analytics for PR JSONbored#354.
@kiannidev
kiannidev force-pushed the feat/issue-134-usage-value-analytics branch from bf600c8 to b2220d2 Compare June 3, 2026 21:07
Expose rollup-backed adoption, retention, command usefulness, and weekly
value metrics in the operator analytics UI while keeping product telemetry
separate from security audit events.

Fixes JSONbored#134

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev force-pushed the feat/issue-134-usage-value-analytics branch from b2220d2 to 2c1b603 Compare June 3, 2026 21:09

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@kiannidev this is close.

A few notes:

  • The operator dashboard split and redaction-focused tests look directionally right.
  • CI is green now.
  • The remaining blocker is PR evidence, not the implementation direction.

Required changes:

  • Add a clear Screenshots or UI Evidence section to the PR description.
  • Include small clickable thumbnails with state labels for the loaded operator analytics view and any empty/error state that renders differently.

Validation expected:

  • Keep the current green CI.
  • Reconfirm the screenshots match the current /app/analytics implementation.

@kiannidev

Copy link
Copy Markdown
Contributor Author

@kiannidev this is close.

A few notes:

  • The operator dashboard split and redaction-focused tests look directionally right.
  • CI is green now.
  • The remaining blocker is PR evidence, not the implementation direction.

Required changes:

  • Add a clear Screenshots or UI Evidence section to the PR description.
  • Include small clickable thumbnails with state labels for the loaded operator analytics view and any empty/error state that renders differently.

Validation expected:

  • Keep the current green CI.
  • Reconfirm the screenshots match the current /app/analytics implementation.

Hi, @JSONbored

I added UI Evidence to the description.
Please check it

@kiannidev
kiannidev requested a review from JSONbored June 3, 2026 23:07

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@kiannidev this now looks merge-ready from this pass.

A few notes:

  • The operator dashboard extraction is cleaner than keeping the full payload assembly inside the route.
  • The analytics UI evidence is in the PR description with loaded, empty, and error states.
  • Validation evidence is complete, including UI checks and coverage.

No code changes are requested from this review pass.

@dosubot dosubot Bot added the lgtm label Jun 4, 2026
@JSONbored
JSONbored merged commit 2fc01e7 into JSONbored:main Jun 4, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 4, 2026
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(control-panel): add usage and value analytics dashboard

2 participants