Skip to content

Comments

feat(analytics): improve dashboard with drag-to-zoom, referrer tracking, and UX fixes#9

Merged
dviejokfs merged 1 commit intomainfrom
feat/analytics-dashboard-improvements
Feb 17, 2026
Merged

feat(analytics): improve dashboard with drag-to-zoom, referrer tracking, and UX fixes#9
dviejokfs merged 1 commit intomainfrom
feat/analytics-dashboard-improvements

Conversation

@dviejokfs
Copy link
Contributor

Summary

Comprehensive analytics dashboard improvements and platform-wide enhancements across backend, frontend, and CLI.

Analytics & Dashboard

  • Drag-to-zoom on visitor chart — mouse drag selection with native div overlay using pixel coordinates from recharts, theme-aware highlight (bg-primary/10), reset zoom button
  • URL-persisted date range — filter state (filter, from, to) synced to URL search params for browser back/forward navigation
  • Fix sparkline rendering — replaced time_bucket_gapfill + CROSS JOIN LATERAL with generate_series + LEFT JOIN to handle single-bucket edge cases
  • Fix "Direct" traffic missing from Referrers chart — added COALESCE(e.referrer_hostname, 'Direct') in get_property_breakdown() and get_property_timeline()
  • Fix live globe visitor count mismatch — aligned window_minutes from 30 to 5 to match header count
  • Referrer/source in visitors UI — added first_referrer, first_referrer_hostname, first_channel fields to visitor types, "Source" column in visitors table, "Source" card in visitor detail
  • Time inputs in custom date range picker — start/end time fields in analytics filter popover and reusable date-range-picker component
  • Add autofocus to API key name field

Deployments

  • Rollback creates new deployment records — rollback now creates a fresh deployment with is_rollback: true and rolled_back_from_id metadata instead of reusing the target deployment
  • Updated rollback tests to match new deployment-creation behavior

Database

  • Migration m20260217_000001_add_first_referrer_to_visitor — adds first_referrer, first_referrer_hostname, first_channel columns to visitor table

CLI

  • Deployment, domain, and environment command improvements
  • Updated API client types for new analytics endpoints

Test Results

Crate Passed Failed Ignored
temps-analytics-events 21 0 0
temps-analytics 22 0 0
temps-proxy 89 0 7
temps-deployments 165 0 6
temps-domains 26 0 3
temps-git 65 0 0
temps-logs 26 0 0
temps-entities 35 0 0
Total 449 0 16

All 449 tests pass. 16 ignored tests are pre-existing (Pebble ACME, Docker inspect, proxy integration).

…ng, and UX fixes

- Fix sparkline rendering using generate_series instead of time_bucket_gapfill
- Fix Direct traffic missing from Referrers chart (COALESCE NULL hostnames)
- Add drag-to-zoom on visitor chart with URL-persisted date range filters
- Add time inputs to custom date range picker
- Show referrer/source data in visitors table and visitor detail
- Fix live globe visitor count mismatch (align window to 5 minutes)
- Add autofocus to API key name field
- Improve rollback to create new deployment records with metadata tracking
- Update rollback tests to match new deployment-creation behavior
- Add first_referrer migration for visitor entity
- Update CLI with deployment, domain, and environment improvements
- Regenerate API client types for new analytics endpoints
@dviejokfs dviejokfs merged commit 68cb3d7 into main Feb 17, 2026
5 of 7 checks passed
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