Skip to content

feat: enterprise dashboard, CLI token auth, and CLI UX improvements#116

Merged
sungmanch merged 8 commits intomainfrom
feat/enterprise-dashboard-and-cli-improvements-20260210
Feb 10, 2026
Merged

feat: enterprise dashboard, CLI token auth, and CLI UX improvements#116
sungmanch merged 8 commits intomainfrom
feat/enterprise-dashboard-and-cli-improvements-20260210

Conversation

@sungmanch
Copy link
Copy Markdown
Collaborator

Summary

  • CLI Token Auth: Introduce long-lived opaque CLI tokens (cli_<hex>) with SHA-256 hashed storage, replacing short-lived Supabase JWTs. Unified authenticateRequest() supports both token types across all API endpoints and Lambda.
  • Enterprise Dashboard: Redesigned manager dashboard with GrowthLeaderboard, TokenUsagePanel, AntiPatternHeatmap, TeamStrengthsPanel, and ProjectActivityFeed. New [memberId] drill-down page with profile header, dimension chart, and anti-pattern list.
  • CLI UX: Replaced pentagon radar chart with horizontal bar chart for cross-terminal reliability. New streaming ChatDisplay with LLM-style character reveal, progressive discovery messages, and milestone-based animations.

Changes

  1. feat(auth): CLI token infrastructure (cli-token.ts, authenticate-request.ts, migration)
  2. feat(api): Device flow + token + /me + /analysis/user updated for CLI tokens
  3. feat(cli): Token store simplified, legacy JWT upgrade path
  4. feat(enterprise): Types, mock data (12 members/2 teams), hooks
  5. feat(enterprise): 8 new UI components (leaderboard, heatmap, profiles, etc.)
  6. feat(enterprise): Dashboard overview + member detail pages
  7. refactor(cli): Bar chart renderer + ChatDisplay streaming engine
  8. feat: Lambda CLI token auth + minor UI/pipeline tweaks

Test Plan

  • TypeScript compilation passes (npx tsc --noEmit)
  • CLI device flow: npx no-ai-slop → sign in → token stored in keychain
  • CLI legacy upgrade: existing eyJ* token triggers re-auth prompt
  • Enterprise dashboard: /dashboard/enterprise renders overview with mock data
  • Member drill-down: click member → /dashboard/enterprise/members/[id] renders profile
  • CLI analysis: bar charts render correctly, chat messages stream during analysis

Generated with Claude Code using /ship-it

sungmanch and others added 8 commits February 10, 2026 21:02
Introduce opaque CLI tokens (cli_<hex>) as a replacement for short-lived
Supabase JWTs in CLI authentication. Tokens are stored as SHA-256 hashes
in the database with 30-day TTL, revocation support, and last_used_at
tracking. A unified authenticateRequest() routes by token prefix (cli_*
vs eyJ*) for dual-path support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Device authorize route now creates CLI tokens instead of passing Supabase
session tokens. Token polling returns cli_* tokens with 30-day expiry.
The /me and /analysis/user endpoints use authenticateRequest() for
unified CLI + web authentication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLI now stores long-lived cli_* tokens via system keychain (keytar).
Legacy Supabase JWTs (eyJ* prefix) are detected and cleared with a
one-time upgrade prompt. Token store simplified to single access_token
(no refresh token needed for 30-day CLI tokens).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend enterprise types with MemberTokenUsage, MemberAntiPattern,
MemberProjectActivity, MemberGrowthSnapshot, and team-level aggregates.
Mock data factory generates 12 members across 2 teams with realistic
distributions. Hooks provide useMember(), useOrgAntiPatterns(), and
other data accessors ready for API replacement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New components for the enterprise overview dashboard:
- GrowthLeaderboard: ranked member table with MoM/WoW deltas and filters
- TokenUsagePanel: per-member token consumption metrics
- AntiPatternHeatmap: horizontal bar chart of anti-pattern distribution
- TeamStrengthsPanel: aggregated domain strengths across team
- ProjectActivityFeed: recent project activity timeline
- MemberProfileHeader: individual member identity + score + growth
- MemberDimensionChart: radar-style dimension scores for a member
- MemberAntiPatternList: per-member anti-pattern breakdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enterprise overview redesigned with 5 manager-actionable sections:
GrowthLeaderboard, TokenUsagePanel, AntiPatternHeatmap, TeamStrengths,
ProjectActivityFeed. New dynamic [memberId] route provides individual
member drill-down with profile header, dimension chart, anti-pattern
list, and project activity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hat display

Terminal radar chart replaced with horizontal bar chart renderer for
reliable cross-terminal rendering. New ChatDisplay class provides
LLM-style streaming animation for live analysis results with progressive
discovery messages, typing indicators, and milestone-based bear
expressions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lambda analysis handler now validates CLI tokens (cli_*) alongside
Supabase JWTs. Landing footer and download section receive minor layout
adjustments. Analysis orchestrator updated for compatibility with
deterministic scoring pipeline changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 10, 2026

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

Project Deployment Actions Updated (UTC)
no-more-ai-slop Ready Ready Preview, Comment Feb 10, 2026 0:04am

Request Review

@sungmanch
Copy link
Copy Markdown
Collaborator Author

🔍 Automated Code Review — Ship-It Phase 7

Reviewed by: 5 parallel agents (CLAUDE.md compliance, bug scan, git history, prior PR patterns, code comments)

Issues Found (2 actionable, 3 informational)

🟡 Actionable (score ≥ 80)

1. Korean text in Slack notification — score: 85

  • File: app/api/auth/device/authorize/route.ts:174
  • Rule: CLAUDE.md language policy ("All content in this codebase MUST be written in English")
  • Fix: Translate Korean Slack notification string to English

2. Silent catch without error logging — score: 90

  • File: src/lib/auth/authenticate-request.ts:64-66
  • Rule: No Fallback Policy — errors should not be silently swallowed
  • Fix: Add console.error() or structured logging in the catch block before returning the error response

ℹ️ Informational (score < 80, non-blocking)

File Issue Score
packages/cli/src/auth/device-flow.ts:102 Non-null assertion on optional expires_in — consider fallback default 75
src/lib/auth/cli-token.ts:101-105 Fire-and-forget DB update — add .catch() to prevent unhandled rejection 70
src/lib/auth/cli-token.ts:96 Missing null check on data.expires_at from Supabase response 65

Summary

  • No regressions detected against git history
  • No code comment policy violations
  • No patterns from previous PR reviews were repeated
  • TypeScript check: ✅ passed

🤖 Generated with Claude Code

@sungmanch sungmanch merged commit 47a209b into main Feb 10, 2026
2 checks passed
@sungmanch sungmanch deleted the feat/enterprise-dashboard-and-cli-improvements-20260210 branch February 10, 2026 12:10
sungmanch added a commit that referenced this pull request Feb 10, 2026
- Translate Korean Slack notification to English (CLAUDE.md language policy)
- Add error logging in JWT validation catch block (No Fallback Policy)
- Replace non-null assertion with nullish coalescing for expires_in
- Add .catch() to fire-and-forget last_used_at updates in both
  cli-token.ts and lambda/analysis.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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