Analytics #8

Open
opened 2026-10-23 03:32:17 -07:00 by westfarn · 0 comments
Owner

Part of #1.

Web route: /analytics/ (protected).
Source: llm-fe/src/llm-fe/pages/Analytics/Analytics.tsx, components/PromptHeatmapCard/PromptHeatmapCard.tsx.

Screenshot

Not attached. Route redirects to Sign in without a session. Capture after sign-in. Company and ops sections depend on the account, so one screenshot will not show every card.

Behavior

Same header as Dashboard. Sections stack vertically. Charts are monthly. No message content is shown.

Your activity (everyone)

  • Hint: personal prompt timing and volume. Other users’ private messages are never shown.
  • Heatmap of prompts by day and hour in the device timezone.
  • Conversation volume bar chart.
  • Prompt volume bar chart with series you, others, all.

Company (only if is_company_manager or the user has a company)

  • Managers: “Team seat activity” bars used and not_used.
  • Other company members: a card that says detailed team seat charts are available to company managers.

Operations (only ops admins)

  • Web treats role admin, ops, or staff as ops, and also the hardcoded email ryan+admin@aimloperations.com.
  • Chart: response-time range, average, and median by month.

Failed requests leave the chart empty. The page does not show an error string.

API

Call Who Series
GET /analytics/user_prompt_heatmap/?tz= Everyone tz is the IANA timezone. Heatmap counts by day/hour.
GET /analytics/user_conversations/ Everyone month plus conversation counts.
GET /analytics/user_prompts/ Everyone month, you, others, all.
GET /analytics/company_usage/ Company managers month, used, not_used.
GET /analytics/admin/ Ops admins month, range, avg, median.

Android

New screen on the header nav for every signed-in user. Hide company and ops blocks with the same rules as web.

Part of #1. Web route: `/analytics/` (protected). Source: `llm-fe/src/llm-fe/pages/Analytics/Analytics.tsx`, `components/PromptHeatmapCard/PromptHeatmapCard.tsx`. ## Screenshot Not attached. Route redirects to Sign in without a session. Capture after sign-in. Company and ops sections depend on the account, so one screenshot will not show every card. ## Behavior Same header as Dashboard. Sections stack vertically. Charts are monthly. No message content is shown. **Your activity** (everyone) - Hint: personal prompt timing and volume. Other users’ private messages are never shown. - Heatmap of prompts by day and hour in the device timezone. - Conversation volume bar chart. - Prompt volume bar chart with series `you`, `others`, `all`. **Company** (only if `is_company_manager` or the user has a `company`) - Managers: “Team seat activity” bars `used` and `not_used`. - Other company members: a card that says detailed team seat charts are available to company managers. **Operations** (only ops admins) - Web treats role `admin`, `ops`, or `staff` as ops, and also the hardcoded email `ryan+admin@aimloperations.com`. - Chart: response-time range, average, and median by month. Failed requests leave the chart empty. The page does not show an error string. ## API | Call | Who | Series | | --- | --- | --- | | `GET /analytics/user_prompt_heatmap/?tz=` | Everyone | `tz` is the IANA timezone. Heatmap counts by day/hour. | | `GET /analytics/user_conversations/` | Everyone | `month` plus conversation counts. | | `GET /analytics/user_prompts/` | Everyone | `month`, `you`, `others`, `all`. | | `GET /analytics/company_usage/` | Company managers | `month`, `used`, `not_used`. | | `GET /analytics/admin/` | Ops admins | `month`, `range`, `avg`, `median`. | ## Android New screen on the header nav for every signed-in user. Hide company and ops blocks with the same rules as web.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_android#8