Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
97157a4
Good with dummy data, very buggy, not finalized
Developing-Gamer Mar 10, 2026
388796c
Better design, still a lot of bugs, not final
Developing-Gamer Mar 10, 2026
c0bf265
Add email overview metrics and enhance chart interactivity
Developing-Gamer Mar 10, 2026
8467fc5
Add monthly active users metric and enhance dashboard interactivity
Developing-Gamer Mar 10, 2026
cb96f84
Merge branch 'dev' into overview-revamp
Developing-Gamer Mar 10, 2026
b71f9a1
Enhance dashboard interactivity with custom date range support
Developing-Gamer Mar 11, 2026
4ba4c7e
Completed, design, dummy data, not design-components
Developing-Gamer Mar 11, 2026
4a823a5
Refactor dashboard components to utilize DesignAnalyticsCard
Developing-Gamer Mar 11, 2026
f34c4ba
Enhance analytics overview with additional visitor metrics
Developing-Gamer Mar 11, 2026
4bd4ed2
Cursor PR review changes #1
Developing-Gamer Mar 11, 2026
6672e70
Enhance ComposedAnalyticsChart with conditional rendering for visitor…
Developing-Gamer Mar 11, 2026
659b5a6
Enhance PageLayout and ComposedAnalyticsChart with new props and cond…
Developing-Gamer Mar 11, 2026
2cb2596
Merge branch 'dev' into overview-revamp
Developing-Gamer Mar 11, 2026
1bdf953
fix
Developing-Gamer Mar 11, 2026
515d695
Refactor seeding functions and enhance metrics loading logic
Developing-Gamer Mar 12, 2026
d15f3f9
Refactor date handling in metrics loading functions
Developing-Gamer Mar 12, 2026
d3bd0f2
Refactor UUID handling and improve metrics data sanitization
Developing-Gamer Mar 12, 2026
919ae53
Merge branch 'dev' into overview-revamp
Developing-Gamer Mar 12, 2026
28956a9
Merge remote-tracking branch 'origin/dev' into overview-revamp
N2D4 Apr 3, 2026
5c42f80
Fix PR comments
N2D4 Apr 4, 2026
396a9b2
Enhance metrics calculations and UI components
mantrakp04 Apr 6, 2026
3f9b656
Refactor metrics data retrieval to use raw SQL queries
mantrakp04 Apr 6, 2026
3147102
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 6, 2026
c7f64ca
Enhance metrics functionality and introduce deterministic UUIDs
mantrakp04 Apr 6, 2026
ea576c2
Add chart demo components for interactive data visualization
mantrakp04 Apr 8, 2026
451bbb0
Implement new analytics chart demo components
mantrakp04 Apr 8, 2026
dec11b4
Refactor analytics chart components and update imports
mantrakp04 Apr 8, 2026
3dd62d4
Add db:seed-activity script and enhance image validation in AI query …
mantrakp04 Apr 9, 2026
6c718e1
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 9, 2026
11014b0
Refactor backend seed scripts and enhance data grid functionality
mantrakp04 Apr 10, 2026
7ff0cf8
Enhance image attachment validation and refactor related components
mantrakp04 Apr 11, 2026
a812ba2
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 13, 2026
c17eb7c
Enhance AI Query Functionality and UI Components
mantrakp04 Apr 13, 2026
de3de70
Add Metrics Helper Functions and Tests
mantrakp04 Apr 13, 2026
31d3a8d
Refactor Analytics Metrics Queries
mantrakp04 Apr 13, 2026
19ad10e
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 13, 2026
a52cba2
Update test snapshots to reflect changes in risk scores for sign-up m…
mantrakp04 Apr 13, 2026
7076f77
Increase timeout for internal metrics and team invitations tests to 1…
mantrakp04 Apr 14, 2026
ac1949b
Merge branch 'dev' into overview-revamp
N2D4 Apr 14, 2026
561d918
Merge branch 'dev' into overview-revamp
N2D4 Apr 14, 2026
096237c
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 14, 2026
8ff2ad7
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 14, 2026
49cef06
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 15, 2026
b9f2307
Refactor layout components for improved responsiveness and styling co…
mantrakp04 Apr 14, 2026
38d60db
Refactor data table components to utilize DataGrid for enhanced funct…
mantrakp04 Apr 15, 2026
27efe1f
Merge branch 'dev' into ui-fixes-minor
mantrakp04 Apr 15, 2026
d0462e1
Enhance dummy data seeding and improve DataGrid functionality
mantrakp04 Apr 15, 2026
f4449b1
Enhance documentation and update DataGrid usage in dashboard
mantrakp04 Apr 15, 2026
a71b27d
Enhance DataGrid functionality and documentation updates
mantrakp04 Apr 15, 2026
c671891
Refactor line-chart and analytics-chart-pie components for improved s…
mantrakp04 Apr 15, 2026
6ba2f73
Refactor AI query handling and schema definitions for improved clarit…
mantrakp04 Apr 16, 2026
bcd917d
Implement anonymous visitor fallback in internal metrics and enhance …
mantrakp04 Apr 16, 2026
470a24a
Enhance DataGrid scrolling behavior and clipping mechanism
mantrakp04 Apr 16, 2026
1729a99
Enhance globe component and metrics page layout
mantrakp04 Apr 16, 2026
2211c7a
Refactor AI query handling and enhance metrics functionality
mantrakp04 Apr 17, 2026
0a324bc
Enhance DataGrid and sidebar layout functionality
mantrakp04 Apr 17, 2026
3ec7b40
Refactor globe component state management and enhance metrics layout
mantrakp04 Apr 17, 2026
bfe2965
Merge branch 'dev' into ui-fixes-minor
mantrakp04 Apr 19, 2026
7c7de17
Merge branch 'dev' into ui-fixes-minor
mantrakp04 Apr 19, 2026
d4e9e37
Enhance AI query endpoint validation and update spacetime publish scr…
mantrakp04 Apr 19, 2026
844b601
Update internal metrics test snapshots to reflect changes in metrics …
mantrakp04 Apr 19, 2026
6bcbb96
Merge branch 'dev' into ui-fixes-minor
mantrakp04 Apr 20, 2026
067cf2c
feat(metrics): add live user count to internal metrics and dashboard
mantrakp04 Apr 20, 2026
c2b6ad0
feat(dashboard): enhance globe section with user profile links
mantrakp04 Apr 20, 2026
da77517
feat(metrics): stabilize user sorting in metrics response
mantrakp04 Apr 20, 2026
2887d84
feat(metrics): improve user sorting logic in metrics response
mantrakp04 Apr 20, 2026
185277e
fix data grid controlled callbacks
mantrakp04 Apr 23, 2026
362908b
Merge branch 'dev' into ui-fixes-minor
mantrakp04 Apr 24, 2026
5285ed7
Implement projects DAU endpoint and integrate into dashboard
mantrakp04 Apr 25, 2026
549a736
Add user counts metrics endpoint and integrate into dashboard
mantrakp04 Apr 27, 2026
b925f3c
Refactor internal metrics test to simplify header representation
mantrakp04 Apr 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor date handling in metrics loading functions
- Updated date parsing in `loadDailyActiveUsers`, `loadDailyActiveUsersSplit`, `loadDailyActiveTeamsSplit`, and `loadAnalyticsOverview` to simplify date extraction by removing unnecessary timezone handling.
- Improved code readability and consistency across metrics loading functions.
  • Loading branch information
Developing-Gamer committed Mar 12, 2026
commit d15f3f98fe81e80d819ca189533d34561003d436
12 changes: 6 additions & 6 deletions apps/backend/src/app/api/latest/internal/metrics/route.tsx
Comment thread
mantrakp04 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async function loadDailyActiveUsers(tenancy: Tenancy, now: Date, includeAnonymou
const dauByDay = new Map<string, number>();
for (const row of rows) {
// ClickHouse returns dates/datetimes without timezone, treat as UTC.
const dayKey = new Date(row.day + 'Z').toISOString().split('T')[0];
const dayKey = row.day.split('T')[0];
dauByDay.set(dayKey, Number(row.dau));
}

Expand Down Expand Up @@ -275,7 +275,7 @@ async function loadDailyActiveUsersSplit(tenancy: Tenancy, now: Date, includeAno
idsByDay.set(date, new Set<string>());
}
for (const row of userRows) {
const day = new Date(row.day + 'Z').toISOString().split('T')[0];
const day = row.day.split('T')[0];
const daySet = idsByDay.get(day);
if (daySet) {
daySet.add(row.user_id);
Expand Down Expand Up @@ -346,7 +346,7 @@ async function loadDailyActiveTeamsSplit(tenancy: Tenancy, now: Date): Promise<A
idsByDay.set(date, new Set<string>());
}
for (const row of teamRows) {
const day = new Date(row.day + 'Z').toISOString().split('T')[0];
const day = row.day.split('T')[0];
const daySet = idsByDay.get(day);
if (daySet) {
daySet.add(row.team_id);
Expand Down Expand Up @@ -886,18 +886,18 @@ async function loadAnalyticsOverview(tenancy: Tenancy, now: Date, includeAnonymo

const pvByDay = new Map<string, number>();
for (const row of pvRows) {
const key = new Date(row.day + 'Z').toISOString().split('T')[0];
const key = row.day.split('T')[0];
pvByDay.set(key, Number(row.cnt));
}
const clByDay = new Map<string, number>();
for (const row of clRows) {
const key = new Date(row.day + 'Z').toISOString().split('T')[0];
const key = row.day.split('T')[0];
clByDay.set(key, Number(row.cnt));
}
const visitorRows: { day: string, cnt: number }[] = await dailyVisitorResult.json();
const visitorByDay = new Map<string, number>();
for (const row of visitorRows) {
const key = new Date(row.day + 'Z').toISOString().split('T')[0];
const key = row.day.split('T')[0];
visitorByDay.set(key, Number(row.cnt));
}
const totalVisitorRows: { visitors: number }[] = await totalVisitorResult.json();
Expand Down
Loading