Skip to content

Add live users, custom tooltip, hourly 24h view; drop admin tab descriptions - #213

Merged
calebyhan merged 1 commit into
mainfrom
212/admin-analytics-improvements
Aug 26, 2026
Merged

Add live users, custom tooltip, hourly 24h view; drop admin tab descriptions#213
calebyhan merged 1 commit into
mainfrom
212/admin-analytics-improvements

Conversation

@calebyhan

Copy link
Copy Markdown
Contributor

Adds a few small improvements to the admin Analytics tab and cleans up admin page headers.

Changes:

  • Added a live/current-users stat (GET /api/admin/analytics/active, distinct visitor_hash in the trailing 5 minutes), polled every 30s on the admin page
  • Added a custom tooltip to the pageviews chart showing formatted date/time, count, and %-change vs. the previous bucket
  • Made the "Last 24 hours" range bucket by hour instead of day (auto-switches server-side when days <= 1), with a UTC note shown in the UI
  • Removed the static description subtitle from every admin tab header (senators, static-pages, legislation list/detail, finance-hearings, analytics, budget) since it added noise without value

Closes #212

@github-actions

Copy link
Copy Markdown

Test Results

589 tests  ±0   589 ✅ ±0   51s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 0a73a89. ± Comparison against base commit a5393ed.

@MasonMines2006 MasonMines2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@calebyhan
calebyhan merged commit 81867b2 into main Aug 26, 2026
3 checks passed
@calebyhan
calebyhan deleted the 212/admin-analytics-improvements branch August 26, 2026 12:59
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.

Admin Analytics: live users, custom tooltip, hourly 24h view, and remove admin tab descriptions

2 participants