Skip to content

Add dashboard analytics - #4776

Draft
patrick91 wants to merge 1 commit into
2026-08-06-add-conference-switcherfrom
2026-08-14-add-dashboard-analytics
Draft

Add dashboard analytics#4776
patrick91 wants to merge 1 commit into
2026-08-06-add-conference-switcherfrom
2026-08-14-add-dashboard-analytics

Conversation

@patrick91

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
pycon Ready Ready Preview Aug 14, 2026 8:26pm

@claude

claude Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Adds Pretix-backed ticket sales analytics plus proposal/grant analytics and a conference timeline to the staff dashboard, with a new pretix_analytics.py module, paginated get_items/host-rewriting fixes in pretix/__init__.py, and a conference-comparison picker on the frontend.

No blocking issues found. A few things worth a look:

  • Duplicated week-bucketing logic: the "bucket dates into a rolling 8-week window" logic is implemented three times — dashboard/views.py::_weekly_counts, dashboard/pretix_analytics.py::_week_values, and the inline loop in _build_ticket_analytics. Worth extracting into one shared helper so the three don't drift.
  • Dead/unwired data paths: annotations, comparisonAnnotations, and comparisonValues are always emitted as empty from every analytics block in views.py/pretix_analytics.py, but conference-analytics.tsx has substantial logic to render them (annotation rows, ReferenceLine positioning, the "implicit" year-over-year comparison branch in CumulativeLineChart). If this isn't intentionally staged for a follow-up PR, it's effectively dead code shipped this round.
  • Perf note: loading /dashboard/<code> builds analytics for the selected conference plus up to DASHBOARD_MAX_COMPARISON_CONFERENCES comparison conferences (3 total by default), and on a cache miss each one synchronously walks all paginated Pretix orders in the request path. The 15-minute cache mitigates this, but worth keeping an eye on for conferences with large order volumes / on first load after deploy.

@patrick91
patrick91 force-pushed the 2026-08-14-add-dashboard-analytics branch from bf79520 to cbb52a7 Compare August 14, 2026 19:58
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.65574% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.72%. Comparing base (421f609) to head (5799e4f).

Additional details and impacted files
@@                          Coverage Diff                           @@
##           2026-08-06-add-conference-switcher    #4776      +/-   ##
======================================================================
- Coverage                               92.89%   92.72%   -0.17%     
======================================================================
  Files                                     363      364       +1     
  Lines                                   11211    11444     +233     
  Branches                                  898      936      +38     
======================================================================
+ Hits                                    10414    10612     +198     
- Misses                                    675      692      +17     
- Partials                                  122      140      +18     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Shortcake-Parent: 2026-08-06-add-conference-switcher
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