Skip to content

Conversation

@MMK21Hub
Copy link
Collaborator

@MMK21Hub MMK21Hub commented Feb 2, 2026

For Flavortown dashboard!

Created a new API endpoint in order to name the fields better and format it a bit nicer.

image

Copilot AI review requested due to automatic review settings February 2, 2026 21:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new /api/stats_v2 endpoint with improved field naming and structure for the Flavortown dashboard. The changes rename statistical fields from avg_* to mean_* for consistency and add serialization methods to statistics result classes.

Changes:

  • Renamed avg_hang_time_* fields to mean_hang_time_* throughout the codebase for consistency
  • Added as_dict() methods to OverallStatsResult and DailyStatsResult for API serialization
  • Created new /api/stats_v2 endpoint with better field names and comprehensive time-period statistics

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
nephthys/api/stats_v2.py New endpoint implementation providing all-time, daily, and weekly statistics
nephthys/utils/stats.py Renamed fields, added serialization methods, and simplified ticket filtering logic
nephthys/api/stats.py Updated to use renamed mean_* fields
nephthys/utils/starlette.py Registered the new /api/stats_v2 route
nephthys/views/home/components/leaderboards.py Updated references to use renamed fields
docs/api.md Added comprehensive API documentation for the new endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

MMK21Hub and others added 2 commits February 2, 2026 21:18
…ckclub#152)

* Silence type error (that was annoying me)

* Add new metric: oldest_unanswered_ticket_age_minutes

* Fix datetime subtraction exception
Copilot AI review requested due to automatic review settings February 2, 2026 21:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MMK21Hub MMK21Hub enabled auto-merge February 2, 2026 22:00
@MMK21Hub MMK21Hub added this pull request to the merge queue Feb 3, 2026
Merged via the queue into hackclub:main with commit 311c734 Feb 3, 2026
4 of 9 checks passed
@MMK21Hub MMK21Hub deleted the dashboard-stats-v2 branch February 3, 2026 00:54
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.

1 participant