Skip to content
Shell
17.7 KB
Raw Blame

Claude Corner Redesign - CRT Monitor Panels + Enhanced Stats


Part 1: CRT Monitor Panel Design (PRIORITY)

User Request

"What if the static from the TV only hit the panels and the borders were clean? What if the panels were like small CRT monitors shaped for each panel. Mini monitors. Can we take that approach? With a thick dark plastic border."

Current State

  • CRTOverlay applies effects to ENTIRE page (fixed overlay z-9999)
  • Panels separated by thin border-[#2d2d2d] dividers
  • Effects bleed everywhere, not contained

New Design: Mini CRT Monitors

Each panel becomes a self-contained CRT monitor:

┌─────────────────────────────────────────────────────┐
│░░░░░░░░░░░░░░░░░ PLASTIC BEZEL ░░░░░░░░░░░░░░░░░░░░│
│░░┌───────────────────────────────────────────┐░░░░░│
│░░│                                           │░░░░░│
│░░│   SCREEN AREA                             │░░░░░│
│░░│   (scanlines, static, vignette inside)    │░░░░░│
│░░│                                           │░░░░░│
│░░│   Panel content lives here                │░░░░░│
│░░│                                           │░░░░░│
│░░└───────────────────────────────────────────┘░░░░░│
│░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
└─────────────────────────────────────────────────────┘

Bezel Design (Thick Dark Plastic)

  • Outer frame: 10-12px thick (#151515 → #1e1e1e gradient)
  • Subtle 3D effect to simulate plastic depth
  • Rounded outer corners (16-20px radius)
  • Clean - NO effects on bezel
  • Optional: small "power LED" indicator per panel

Screen Area (Inside Bezel)

  • Slightly recessed look (inner shadow)
  • overflow: hidden to contain all effects
  • Effects contained INSIDE only:
    • Scanlines (horizontal lines)
    • Vignette (darker corners)
    • Static/noise (subtle grain)
    • Phosphor glow (panel-specific color)

Implementation Steps

Step 1: Create CRTMonitorPanel Component

New file: components/claude-corner/CRTMonitorPanel.tsx

interface CRTMonitorPanelProps {
  children: React.ReactNode
  title?: string           // Label on bezel (e.g., "stats_console")
  className?: string
  enableStatic?: boolean   // Toggle static effect
  glowColor?: string       // Panel glow (#ff6b35 orange, #27c93f green)
}

Component structure:

  1. Outer div = Bezel (thick dark plastic, gradient background)
  2. Inner div = Screen (dark bg, overflow:hidden, position:relative)
  3. Effects overlay = Scanlines + vignette + static (absolute positioned inside screen)
  4. Content wrapper = Children rendered with proper z-index

Step 2: Modify TerminalShell

File: components/claude-corner/TerminalShell.tsx

Changes:

  • Remove or disable global <CRTOverlay /> (effects now per-panel)
  • Keep title bar and outer shell
  • Stack all monitors vertically (control room aesthetic)
  • Wrap ALL panels in <CRTMonitorPanel> including intro:
{/* Layout: Vertical stack like a control room */}
<div className="space-y-6">
  {/* Intro Monitor - Orange glow */}
  <CRTMonitorPanel title="claude_corner" glowColor="#ff6b35">
    <IntroMessage userEmail={userEmail} />
  </CRTMonitorPanel>

  {/* Stats Monitor - Orange glow */}
  <CRTMonitorPanel title="stats_console" glowColor="#ff6b35">
    <StatsPanel onLiveStatusChange={setIsLive} />
  </CRTMonitorPanel>

  {/* Field Notes Monitor - Green glow */}
  <CRTMonitorPanel title="field_notes" glowColor="#27c93f">
    <FieldNotesPanel />
  </CRTMonitorPanel>

  {/* Lab Assistant Monitor - Amber glow */}
  <CRTMonitorPanel title="lab_assistant" glowColor="#f59e0b">
    <ChatPanel userId={userId} />
  </CRTMonitorPanel>
</div>

Color Scheme (User Confirmed):

  • Intro & Stats: #ff6b35 (orange) - ID8 brand color
  • Field Notes: #27c93f (green) - Terminal classic
  • Lab Assistant: #f59e0b (amber) - Chat/assistant feel

Step 3: Bezel CSS Styling

/* Bezel - thick dark plastic frame */
.crt-bezel {
  background: linear-gradient(
    145deg,
    #1e1e1e 0%,      /* Highlight edge */
    #151515 50%,     /* Dark center */
    #0a0a0a 100%     /* Shadow edge */
  );
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),       /* Outer drop shadow */
    inset 0 1px 0 rgba(255,255,255,0.05), /* Top highlight */
    inset 0 -1px 0 rgba(0,0,0,0.3);       /* Bottom shadow */
}

/* Screen - recessed glass inside bezel */
.crt-screen {
  background: #0a0a0a;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6); /* Recessed look */
}

/* Effects layer - inside screen only */
.crt-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

Files to Create/Modify

File Change
components/claude-corner/CRTMonitorPanel.tsx NEW - Reusable panel wrapper with contained effects
components/claude-corner/TerminalShell.tsx Stack layout, wrap all panels in CRTMonitorPanel, remove global CRTOverlay
components/claude-corner/IntroMessage.tsx Remove existing border (bezel now handles framing)

Final Layout (Control Room Stack)

┌─────────────────────────────────────────────────────────────┐
│                    TERMINAL TITLE BAR                       │
│  ● ● ●  claude-corner — live terminal      [●] LIVE        │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌─────────────────────────────────────────────────────┐   │
│  │░░░░░░░ BEZEL: claude_corner ░░░░░░░░░░░░░░░░░░░░░░░│   │
│  │░░┌─────────────────────────────────────────────┐░░░│   │
│  │░░│  🟠 CLAUDE ASCII + INTRO MESSAGE           │░░░│   │
│  │░░│     (orange glow, scanlines inside)        │░░░│   │
│  │░░└─────────────────────────────────────────────┘░░░│   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  ┌─────────────────────────────────────────────────────┐   │
│  │░░░░░░░ BEZEL: stats_console ░░░░░░░░░░░░░░░░░░░░░░░│   │
│  │░░┌─────────────────────────────────────────────┐░░░│   │
│  │░░│  🟠 STATS PANEL                            │░░░│   │
│  │░░│     (commits, tools, languages, heatmap)   │░░░│   │
│  │░░└─────────────────────────────────────────────┘░░░│   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  ┌─────────────────────────────────────────────────────┐   │
│  │░░░░░░░ BEZEL: field_notes ░░░░░░░░░░░░░░░░░░░░░░░░░│   │
│  │░░┌─────────────────────────────────────────────┐░░░│   │
│  │░░│  🟢 FIELD NOTES                            │░░░│   │
│  │░░│     (green glow, observations)             │░░░│   │
│  │░░└─────────────────────────────────────────────┘░░░│   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  ┌─────────────────────────────────────────────────────┐   │
│  │░░░░░░░ BEZEL: lab_assistant ░░░░░░░░░░░░░░░░░░░░░░░│   │
│  │░░┌─────────────────────────────────────────────┐░░░│   │
│  │░░│  🟡 LAB ASSISTANT CHAT                     │░░░│   │
│  │░░│     (amber glow, chat interface)           │░░░│   │
│  │░░└─────────────────────────────────────────────┘░░░│   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  ─────────────────────────────────────────────────────────  │
│  ID8Labs × Claude Partnership              Since Oct 2025  │
└─────────────────────────────────────────────────────────────┘

Visual Reference

Think of old 90s CRT monitors:

  • Thick plastic housing (dark gray or black)
  • Screen slightly recessed inside
  • That characteristic scan line flicker
  • Slight vignette/darkness at corners
  • Clean plastic frame around the screen

Part 2: Enhanced Stats (After CRT UI)

Overview

Expand Claude Corner stats to show agents used, skills invoked, MCP servers, session data, and quality metrics.

Current State

  • Database: claude_stats table with commits, LOC, tool_bash/read/edit/write, languages
  • Hooks: track-tool-usage.sh POSTs tool counts to /api/claude-stats
  • UI: StatsPanel shows 4 core stats, 4 tool bars, languages, heatmap

New Features to Add

1. Agents Used (Badge Display)

Track which specialized agents have been deployed:

  • code-reviewer, debugger, frontend-developer, Explore, Plan, etc.
  • Display as badges with usage counts

2. Skills/Commands Used

Track slash command invocations:

  • /commit, /fix, /ship, /verify, /test, etc.
  • Display as frequency chart or tag cloud

3. MCP Server Status

Show active integrations:

  • Playwright, Supabase, GitHub, Firecrawl, Memory
  • Live status indicators

4. Session Stats

  • Total sessions
  • Hours collaborated (estimated from activity)

5. Quality Metrics

  • Tests written
  • Builds succeeded
  • Bugs fixed

Implementation Steps

Phase 1: Database Schema

File: supabase/migrations/[timestamp]_expand_claude_stats.sql

Add to claude_stats table:

-- Agent tracking (JSONB: {"code-reviewer": 15, "debugger": 8, ...})
agents_used jsonb DEFAULT '{}',

-- Skill tracking (JSONB: {"commit": 45, "fix": 23, ...})
skills_used jsonb DEFAULT '{}',

-- MCP tracking (JSONB: {"playwright": 120, "supabase": 89, ...})
mcp_used jsonb DEFAULT '{}',

-- Session/quality metrics
sessions_count integer DEFAULT 0,
hours_collaborated numeric(10,2) DEFAULT 0,
tests_written integer DEFAULT 0,
builds_succeeded integer DEFAULT 0,
bugs_fixed integer DEFAULT 0

Phase 2: TypeScript Types

File: lib/supabase.ts

Update ClaudeStats interface:

agents_used: Record<string, number>
skills_used: Record<string, number>
mcp_used: Record<string, number>
sessions_count: number
hours_collaborated: number
tests_written: number
builds_succeeded: number
bugs_fixed: number

Phase 3: API Updates

File: app/api/claude-stats/route.ts

Extend POST to accept:

{
  type: 'tool' | 'agent' | 'skill' | 'mcp' | 'session' | 'quality',
  name: string,
  increment?: number
}

Phase 4: New Hooks

Files: ~/.claude/hooks/

  1. track-agent-usage.sh - Capture Task tool agent spawns
  2. track-skill-usage.sh - Capture Skill tool invocations
  3. track-mcp-usage.sh - Capture MCP tool calls
  4. Update hooks.json to wire them up

Phase 5: UI Components

File: components/claude-corner/StatsPanel.tsx

Add new sections:

  1. AgentBadges - Grid of agent icons with counts
  2. SkillsChart - Top skills used (bar or tag cloud)
  3. MCPStatus - Active MCP indicators with counts
  4. SessionStats - Sessions count, hours collaborated
  5. QualityMetrics - Tests, builds, bugs fixed

File Changes Summary

File Change
supabase/migrations/[new].sql Add new columns
lib/supabase.ts Update ClaudeStats type
app/api/claude-stats/route.ts Extend POST handler
~/.claude/hooks/track-agent-usage.sh New hook
~/.claude/hooks/track-skill-usage.sh New hook
~/.claude/hooks/track-mcp-usage.sh New hook
~/.claude/hooks/hooks.json Wire up new hooks
components/claude-corner/StatsPanel.tsx Add new UI sections

UI Layout (Proposed)

┌─────────────────────────────────────────────────────────┐
│ > stats_console                        synced: Jan 3   │
├─────────────────────────────────────────────────────────┤
│  1,187          2.4M           7            3          │
│  commits        lines       projects     months        │
├─────────────────────────────────────────────────────────┤
│ > tool_usage                                           │
│  Bash  ████████████░░░░  3K                           │
│  Read  ████████████████  4K                           │
│  Edit  ██████████░░░░░░  2K                           │
│  Write ████░░░░░░░░░░░░  960                          │
├─────────────────────────────────────────────────────────┤
│ > agents_deployed                                      │
│  [🔍 Explore: 45] [📝 code-reviewer: 23] [🐛 debugger: 18] │
│  [🎨 frontend: 12] [📋 Plan: 8] [✨ more...]           │
├─────────────────────────────────────────────────────────┤
│ > skills_invoked                                       │
│  /commit ████████  45    /fix ████  23                │
│  /ship ███  15          /test ██  12                  │
├─────────────────────────────────────────────────────────┤
│ > mcp_connections                                      │
│  ● Playwright  ● Supabase  ● GitHub  ● Memory         │
│    120 calls     89 calls    67 calls   34 calls      │
├─────────────────────────────────────────────────────────┤
│ > quality_metrics                                      │
│  152 tests    98% builds    23 bugs                   │
│  written      succeeded     fixed                     │
└─────────────────────────────────────────────────────────┘

Priority Order

  1. Database schema (foundation)
  2. API updates (enable data collection)
  3. Hooks (start collecting data)
  4. UI components (display the data)

Estimated Scope

  • Database: 1 migration
  • API: ~50 lines
  • Hooks: 3 new files, ~30 lines each
  • UI: ~200 lines new components