Skip to content

Admin 1d analytics: hourly UTC charts#1009

Draft
ryokun6 wants to merge 2 commits intomainfrom
cursor/1d-analytics-hourly-charts-4717
Draft

Admin 1d analytics: hourly UTC charts#1009
ryokun6 wants to merge 2 commits intomainfrom
cursor/1d-analytics-hourly-charts-4717

Conversation

@ryokun6
Copy link
Copy Markdown
Owner

@ryokun6 ryokun6 commented Mar 18, 2026

Summary

  • API: Record analytics per UTC hour (analytics:hourly:{date} hash + analytics:uvh:{date}:{HH} HLLs). getAnalyticsDetail with days=1 returns hourly with 24 rows.
  • Admin dashboard: When "Today" is selected and hourly is present, bar charts use 24 hourly buckets instead of a single daily bar.
  • i18n: apps.admin.dashboard.charts.hourlyUtc in all locales.

Testing

  • bun test tests/test-analytics-hourly.test.ts
  • bun run build

Notes

  • Hourly data populates from deploy forward; historical days have no backfill.
  • Buckets are UTC (matches existing daily keys).
Open in Web Open in Cursor 

cursoragent and others added 2 commits March 18, 2026 08:45
- Record per-hour calls/ai/errors/latency in Redis hash
- Per-hour HyperLogLog for unique visitors
- getAnalyticsDetail includes hourly[24] when days=1
- Unit tests for buildHourlyMetrics

Co-authored-by: Ryo Lu <me@ryo.lu>
- Use 24 UTC hourly buckets when API returns hourly
- Refactor MiniBarChart to shared BarChartRow series
- i18n: apps.admin.dashboard.charts.hourlyUtc

Co-authored-by: Ryo Lu <me@ryo.lu>
@ryos-deploy
Copy link
Copy Markdown

ryos-deploy bot commented Mar 18, 2026

The preview deployment for ryos-dev is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-03-18 08:50:26 CET

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.

2 participants