Skip to content

feat(den-web): Analytics page in the Den org admin dashboard#2149

Open
benjaminshafii wants to merge 3 commits into
analytics/layer12-serverfrom
analytics/den-web-analytics-page
Open

feat(den-web): Analytics page in the Den org admin dashboard#2149
benjaminshafii wants to merge 3 commits into
analytics/layer12-serverfrom
analytics/den-web-analytics-page

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

What

Second PR of the OpenWork Analytics stack (Layers 1+2). Adds an admin-only Analytics page to the Den dashboard, consuming the GET /v1/telemetry/analytics endpoint from #2148.

Stacked on #2148 (base branch is analytics/layer12-server). Retarget to dev once #2148 merges.

  • New route (admin)/analytics + AnalyticsScreen (ee/apps/den-web/app/(den)/dashboard/_components/analytics-screen.tsx)
  • Sidebar nav entry "Analytics" (admin-only group, same gating as Members/Billing) + page title
  • Layer 1 — summary cards: OpenWork users (+ pending invites), active this week (+ 30d)
  • Layer 2 — sessions this week, tasks this week + success rate; 12-week trend charts for weekly active users, sessions per week, tasks per week (completed vs failed); 30-day detail cards (avg task duration, tasks completed/failed)
  • Dependency-free bar charts (pure Tailwind divs), empty-state overlay when no events exist yet, privacy note (event metadata only — never prompts/code/files)

Tests

Commands run:

  • npx tsc --noEmit in ee/apps/den-web — passes
  • pnpm --filter @openwork-ee/den-web build — production build passes, /dashboard/analytics route emitted
  • Manual end-to-end against the local Den stack (MySQL + den-api from feat(den): analytics event model + /v1/telemetry/analytics endpoint (Layer 1+2) #2148 + seeded acme-robotics-demo org with 12 weeks of telemetry events): signed in as the org owner via headless Chrome (CDP), navigated to /dashboard/analytics, verified all cards and charts render real aggregates (17 users, 14 active this week, 44 sessions, 40 tasks at 93% success, growing 12-week trends, 3m 22s avg duration). Screenshots captured (attaching below).

Non-admin access is blocked by the existing (admin) route-group layout guard.

Screenshots

Screenshots of the page rendering live seeded data are attached as a comment (captured via headless Chrome against the local stack).

New admin-only Analytics page consuming GET /v1/telemetry/analytics:
- summary cards: OpenWork users, active this week, sessions, tasks +
  success rate
- 12-week trend charts: weekly active users, sessions per week, and
  tasks per week (completed vs failed)
- 30-day detail: avg task duration, tasks completed/failed
- sidebar nav entry + page title, privacy note (metadata only)
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Jun 10, 2026 4:07pm
openwork-den Ready Ready Preview, Comment Jun 10, 2026 4:07pm
openwork-den-worker-proxy Ready Ready Preview, Comment Jun 10, 2026 4:07pm
openwork-landing Ready Ready Preview, Comment, Open in v0 Jun 10, 2026 4:07pm

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

- header is now "Usage & adoption" with an "Included with 10+ seats"
  plan badge instead of the rhetorical question
- workspaces under 10 seats see a locked panel with seat count and
  Invite members / Manage seats & billing actions instead of the data
@benjaminshafii

Copy link
Copy Markdown
Member Author

Update pushed (02b7c77): reframed the header from the rhetorical "Is anyone actually using AI?" to dashboard-style "Usage & adoption", with an "Included with 10+ seats" plan badge. Workspaces under 10 seats now see a locked panel (seat count + Invite members / Manage seats & billing CTAs) instead of the data.

Verified live against the local stack: 17-seat demo org shows full analytics with the badge; a real 1-seat org ("Tiny Startup") shows the locked state with the actual 10-seat threshold. tsc --noEmit passes.

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