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

Closed
opened 2026-03-02 05:12:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gotempsh/temps/pull/9
Author: @dviejokfs
Created: 2/17/2026
Status: Merged
Merged: 2/17/2026
Merged by: @dviejokfs

Base: mainHead: feat/analytics-dashboard-improvements


📝 Commits (1)

  • 583ab1c feat(analytics): improve dashboard with drag-to-zoom, referrer tracking, and UX fixes

📊 Changes

76 files changed (+8067 additions, -1069 deletions)

View changed files

📝 apps/temps-cli/README.md (+331 -6)
📝 apps/temps-cli/package.json (+1 -1)
📝 apps/temps-cli/src/cli.ts (+1 -1)
📝 apps/temps-cli/src/commands/auth/login.ts (+3 -3)
📝 apps/temps-cli/src/commands/configure.ts (+59 -19)
📝 apps/temps-cli/src/commands/deploy/deploy-image.ts (+14 -8)
📝 apps/temps-cli/src/commands/deploy/deploy-local-image.ts (+18 -8)
📝 apps/temps-cli/src/commands/deploy/deploy-static.ts (+14 -8)
📝 apps/temps-cli/src/commands/deploy/deploy.ts (+312 -102)
📝 apps/temps-cli/src/commands/deploy/index.ts (+1 -0)
📝 apps/temps-cli/src/commands/deploy/list.ts (+10 -4)
📝 apps/temps-cli/src/commands/deploy/rollback.ts (+27 -18)
📝 apps/temps-cli/src/commands/deploy/status.ts (+9 -6)
📝 apps/temps-cli/src/commands/domains/index.ts (+4 -1)
📝 apps/temps-cli/src/commands/environments/index.ts (+108 -92)
📝 apps/temps-cli/src/commands/open/index.ts (+3 -4)
📝 apps/temps-cli/src/commands/projects/create.ts (+114 -21)
📝 apps/temps-cli/src/commands/projects/delete.ts (+10 -3)
📝 apps/temps-cli/src/commands/projects/index.ts (+6 -6)
📝 apps/temps-cli/src/commands/projects/show.ts (+10 -3)

...and 56 more files

📄 Description

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).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gotempsh/temps/pull/9 **Author:** [@dviejokfs](https://github.com/dviejokfs) **Created:** 2/17/2026 **Status:** ✅ Merged **Merged:** 2/17/2026 **Merged by:** [@dviejokfs](https://github.com/dviejokfs) **Base:** `main` ← **Head:** `feat/analytics-dashboard-improvements` --- ### 📝 Commits (1) - [`583ab1c`](https://github.com/gotempsh/temps/commit/583ab1c123eb765776bc8327214b6532a29952cb) feat(analytics): improve dashboard with drag-to-zoom, referrer tracking, and UX fixes ### 📊 Changes **76 files changed** (+8067 additions, -1069 deletions) <details> <summary>View changed files</summary> 📝 `apps/temps-cli/README.md` (+331 -6) 📝 `apps/temps-cli/package.json` (+1 -1) 📝 `apps/temps-cli/src/cli.ts` (+1 -1) 📝 `apps/temps-cli/src/commands/auth/login.ts` (+3 -3) 📝 `apps/temps-cli/src/commands/configure.ts` (+59 -19) 📝 `apps/temps-cli/src/commands/deploy/deploy-image.ts` (+14 -8) 📝 `apps/temps-cli/src/commands/deploy/deploy-local-image.ts` (+18 -8) 📝 `apps/temps-cli/src/commands/deploy/deploy-static.ts` (+14 -8) 📝 `apps/temps-cli/src/commands/deploy/deploy.ts` (+312 -102) 📝 `apps/temps-cli/src/commands/deploy/index.ts` (+1 -0) 📝 `apps/temps-cli/src/commands/deploy/list.ts` (+10 -4) 📝 `apps/temps-cli/src/commands/deploy/rollback.ts` (+27 -18) 📝 `apps/temps-cli/src/commands/deploy/status.ts` (+9 -6) 📝 `apps/temps-cli/src/commands/domains/index.ts` (+4 -1) 📝 `apps/temps-cli/src/commands/environments/index.ts` (+108 -92) 📝 `apps/temps-cli/src/commands/open/index.ts` (+3 -4) 📝 `apps/temps-cli/src/commands/projects/create.ts` (+114 -21) 📝 `apps/temps-cli/src/commands/projects/delete.ts` (+10 -3) 📝 `apps/temps-cli/src/commands/projects/index.ts` (+6 -6) 📝 `apps/temps-cli/src/commands/projects/show.ts` (+10 -3) _...and 56 more files_ </details> ### 📄 Description ## 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:12:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/temps#15
No description provided.