Skip to content
Shell
4.9 KB
Raw Blame

Message Box Redesign - Claude-Style Input

Goal

Redesign ChatInput to be a single cohesive rounded pill with:

  • Expanding text area
  • Inline tool icons (hybrid: visible + overflow)
  • Firewall indicator via border glow only (subtle pulse)
  • Unified desktop/mobile experience

Design Decisions (All Confirmed ✓)

Decision Choice
Icon layout Hybrid - most-used visible, extras in '+' menu
Firewall indicator Glow only - no separate dot
Mobile experience Identical layout, touch-optimized (larger targets)
Voice input ✓ Include in '+' menu
Glow animation Subtle pulse (gentle breathing effect)

New Component Structure

┌─────────────────────────────────────────────────────────────────┐
│  [+]  [👤]  [🧠]  │  Type your message...          │  [C] [➤]  │
│  ↑     ↑     ↑    │  ← expanding textarea →        │   ↑    ↑   │
│ more persona brain│                                │ model send │
└─────────────────────────────────────────────────────────────────┘
         ↑                                                    ↑
    Left icons                                          Right icons
    (tools)                                            (actions)

Icon Breakdown

Left Side (Tools):

Icon Visibility Purpose
+ Always Opens overflow menu
Persona Always Current persona icon, click to change
Brain Desktop only Extended thinking toggle

Right Side (Actions):

Icon Visibility Purpose
Model Always Shows current model letter (C/G), click to change
Send Always Submit message

Overflow Menu ('+' popover):

  • 🎤 Voice input (mic icon)
  • 📎 Attachments
  • ⌘ Command palette
  • 🕐 History access

Firewall Integration

  • No separate dot - just border glow on pill
  • 🟢 Green glow = Focused
  • 🟡 Yellow glow + subtle pulse = Caution
  • 🔴 Red glow + subtle pulse = Compromised
  • Animation: @keyframes subtlePulse { 0%,100%: opacity 0.6; 50%: opacity 1 } (~3s)

Files to Modify

File Action
web/src/components/chat/ChatInput.tsx Rewrite layout
web/src/components/chat/PersonaSelector.tsx NEW - compact icon + dropdown
web/src/components/chat/ModelSelector.tsx NEW - compact letter icon + dropdown
web/src/components/chat/OverflowMenu.tsx NEW - '+' button popover
web/src/hooks/useFirewallGlow.ts Add subtle pulse animation
web/src/components/chat/PersonaFolderTab.tsx DELETE (replaced)
web/src/components/chat/ProviderSelector.tsx DELETE (replaced)

Implementation Steps

Phase 1: Create New Layout Shell (~15 min)

  • Build new ChatInput with unified pill structure
  • Left section: icons container with gap-1
  • Center: expanding textarea (existing logic)
  • Right section: model + send

Phase 2: Build Sub-Components (~30 min)

  • PersonaSelector: Icon button → Radix popover with persona list
  • ModelSelector: Letter badge (C/G) → Radix popover with providers
  • OverflowMenu: + button → Radix popover with voice, attachments, etc.

Phase 3: Firewall Glow (~10 min)

  • Remove FirewallStatusDot import
  • Update useFirewallGlow with CSS animation for subtle pulse
  • Apply glow classes to outer pill

Phase 4: Touch & Responsive (~15 min)

  • All icon buttons: min-w-11 min-h-11 (44px touch targets)
  • Mobile: hide brain icon, keep everything else
  • Test with Chrome DevTools mobile emulation

Phase 5: Cleanup & Test (~10 min)

  • Delete old PersonaFolderTab, ProviderSelector
  • Verify keyboard navigation
  • Playwright screenshot test

Agent Assignments (Pipeline)

Phase Agent Role
1-2 frontend-developer Build components
3 frontend-developer Glow integration
4 ui-ux-designer Touch target review
5 code-reviewer Final review
All Playwright MCP Visual verification
Watcher Claude (main) Verify each phase before proceeding

Key Files Reference

web/src/components/chat/
├── ChatInput.tsx          # MODIFY - main component
├── PersonaFolderTab.tsx   # DELETE
├── ProviderSelector.tsx   # DELETE  
├── PersonaSelector.tsx    # NEW
├── ModelSelector.tsx      # NEW
├── OverflowMenu.tsx       # NEW
└── InputBar.tsx           # Keep as-is (wrapper)

web/src/hooks/
└── useFirewallGlow.ts     # MODIFY - add pulse animation

Ready to implement. All questions resolved.