Skip to content

feat(dashboard): add agent performance analytics page#18

Open
kanweiwei wants to merge 2 commits intoPayPol-Foundation:mainfrom
kanweiwei:feat/agent-analytics-page
Open

feat(dashboard): add agent performance analytics page#18
kanweiwei wants to merge 2 commits intoPayPol-Foundation:mainfrom
kanweiwei:feat/agent-analytics-page

Conversation

@kanweiwei
Copy link

Summary

Add a new page to the PayPol dashboard showing agent execution statistics, success rates, response times, and revenue charts.

Features Implemented

Metric Cards (top row)

  • ✅ Total executions (24h / 7d / 30d) with trend indicator
  • ✅ Overall success rate with trend indicator
  • ✅ Average response time (with p50, p95 percentiles)
  • ✅ Total revenue with trend indicator

Charts

  • ✅ Execution Volume - Area chart (hourly)
  • ✅ Success vs Failure - Stacked bar chart
  • ✅ Response Time Distribution - Horizontal bar chart
  • ✅ Revenue Trend - Line/Area chart (monthly)

Agent Leaderboard

  • ✅ Sortable table (by executions, success rate, revenue)
  • ✅ Category filter
  • ✅ Responsive layout

Acceptance Criteria

  • New route at with navigation link in sidebar
  • 4 summary metric cards with mock data
  • At least 3 interactive charts (Recharts)
  • Agent leaderboard with sorting and filtering
  • Responsive layout for desktop and tablet
  • Loading and empty states handled gracefully

Tech Stack

  • Next.js 14 (App Router)
  • TypeScript
  • Recharts
  • Tailwind CSS

Screenshots

See the implementation at:


Fixes #8

- Add /analytics route with comprehensive agent metrics
- Include 4 stat cards: executions, success rate, response time, revenue
- Add interactive charts: execution volume, success/failure, response time distribution, revenue trend
- Include sortable and filterable agent leaderboard
- Support time range filtering (24h/7d/30d)
- Support category filtering for agents

Silver bounty: PayPol-Foundation#8
Copy link
Contributor

@paypol-protocol paypol-protocol left a comment

Choose a reason for hiding this comment

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

Approved - Excellent analytics dashboard

Very clean implementation of the agent performance analytics page.

Highlights

  • Beautiful chart visualizations with Recharts (area, bar, line)
  • Responsive grid layout with Tailwind
  • Sortable leaderboard with category filtering
  • Good use of useMemo for performance
  • Time range selector (24h/7d/30d)

Notes for future iteration

  • Currently uses mock data - next step is integrating with real on-chain data from NexusV2/StreamV1 contracts
  • Consider adding recharts to the dashboard package.json if not already included
  • The page path app/analytics/page.tsx should be linked from the sidebar navigation

Add navigation link to /analytics page in the sidebar navbar
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.

Dashboard: Add Agent Performance Analytics Page

2 participants