Skip to content
Shell
15.9 KB
Raw Blame

DeepStack Enhancement Plan - Comprehensive UI/UX Overhaul

Overview

A 10-item enhancement list covering retention features, AI awareness, animations, formatting, market indicators, onboarding, settings, profile, help, and landing page redesign.

Execution Mode: All at once (overnight capable) with verification between waves


Data Architecture Findings

Before diving into waves, here's what exists:

Feature Storage Status
Thesis Supabase table designed, API uses in-memory Migration ready, needs wiring
Journal Supabase fully integrated Working with RLS
News Alpaca API via Python backend Working, falls back to mock
Predictions Polymarket/Kalshi components exist Needs feed integration

News Source: Alpaca Markets API (via alpaca_client.get_news()) - already integrated!


Wave Structure

Wave Focus Items Complexity
1 Quick Fixes Market indicator, Message formatting, Chart icon animation Low-Medium
2 Core Features AI semantic awareness, Settings page, Profile page Medium
3 UX Overhaul Tour system, Help page Medium
4 Major Features Retention feeds, Landing page (Linear.app style) High

Wave 1: Quick Fixes (Immediate Impact)

1.1 Market Indicator Bug Fix

Problem: Market indicator shows RED when market is OPEN Location: web/src/components/widgets/MarketStatusWidget.tsx (lines 8-12) Root Cause: The current calculation uses a rough UTC - 5 offset that doesn't account for:

  • Daylight Saving Time (EDT vs EST)
  • Pre-market/after-hours nuances
  • Potential timezone bugs

Fix:

  • Use proper timezone library (date-fns-tz or luxon) for accurate ET conversion
  • Ensure green = open, red = closed
  • Also audit MarketWatchPanel.tsx (lines 53-58) which duplicates this logic

Files to modify:

  • web/src/components/widgets/MarketStatusWidget.tsx
  • web/src/components/layout/MarketWatchPanel.tsx

1.2 AI Message Output Formatting

Problem: AI responses are "all in one block" - not formatted like Claude web browser Location: web/src/components/chat/MessageBubble.tsx

Current State:

  • Uses ReactMarkdown with component overrides
  • Has spacing: mb-6 leading-[1.8] for paragraphs
  • Tables, code blocks, callouts exist

Claude Web Browser Style Analysis Needed:

  • More generous paragraph spacing
  • Clear visual separation between sections
  • Better list formatting with proper indentation
  • Distinct heading hierarchy
  • Breathing room between different content types

Fix:

  • Analyze Claude's web output format
  • Enhance markdown component overrides
  • Add more whitespace between sections
  • Improve list styling

Files to modify:

  • web/src/components/chat/MessageBubble.tsx
  • Possibly web/src/app/globals.css

1.3 Chart Icon Animation

Problem: Want animated mini-chart with green trend line on hover Location: Header or wherever "FULL CHART" icon appears Current: Uses static LayoutDashboard or LineChart icons from lucide-react

Implementation:

  • Create custom SVG component with animated path
  • CSS animation: stroke-dasharray/dashoffset for "drawing" effect
  • Trigger on hover
  • Green color matching brand (text-profit / #22c55e)

Files to create/modify:

  • Create web/src/components/ui/AnimatedChartIcon.tsx
  • Modify header component where icon lives

Wave 2: Core Features

2.1 AI Semantic Awareness

Problem: Does AI see everything in toolset and portfolios? Current State: Partially - tools exist but thesis/journal not connected

What AI Currently Has Access To:

  • Tools in web/src/lib/llm/tools.ts: get_positions, get_quote, analyze_stock, search_prediction_markets
  • Context via /api/chat/route.ts: activeSymbol, positions, watchlist, patterns

What's Missing (Confirmed via exploration):

  • Thesis data - Table exists in Supabase (003_create_thesis_table.sql), store exists (thesis-store.ts), but NOT passed to AI
  • Journal entries - Fully integrated with Supabase (004_create_journal_entries.sql), but NOT passed to AI
  • Emotional firewall state - Not connected

Enhancement Plan:

  1. Add new tools to tools.ts:
    • get_thesis_entries - Fetch user's active theses
    • get_journal_entries - Fetch recent journal entries with emotions
    • get_emotional_state - Current firewall/discipline status
  2. Expand context in /api/chat/route.ts to include:
    • Active theses summary
    • Recent journal emotions/lessons
    • Emotional firewall alerts
  3. Update system prompt to make AI aware of these capabilities

Files to modify:

  • web/src/app/api/chat/route.ts
  • web/src/lib/llm/tools.ts
  • web/src/lib/llm/system-prompt.ts (or inline in route)

2.2 Settings Page Rebuild

Problem: Remove trading section (not a broker), fix according to current build Location: web/src/components/layout/SettingsPanel.tsx

Current Sections:

  1. Appearance (theme, compact mode) - KEEP
  2. Trading Interface (one-click, confirmations) - REMOVE
  3. Notifications (trade executions, price alerts) - MODIFY
  4. System (language) - KEEP

New Structure:

  1. Appearance - Theme, compact mode, font size
  2. AI Assistant - Default model, extended thinking preference, response length
  3. Notifications - Market alerts, research updates, prediction market changes
  4. Data Sources - News providers, prediction market sources
  5. System - Language, timezone, export data

Files to modify:

  • web/src/components/layout/SettingsPanel.tsx
  • web/src/lib/stores/settings-store.ts (create if needed)

2.3 Profile Page - Make Real

Problem: Currently shows hardcoded "John Doe" placeholder Location: web/src/components/layout/ProfilePanel.tsx

Requirements:

  • Connect to actual user data (Supabase auth?)
  • Working sections:
    • Personal info (name, avatar upload, bio)
    • Email settings
    • Security (password, 2FA)
    • Billing/subscription status
  • All elements must actually work and persist

Files to modify:

  • web/src/components/layout/ProfilePanel.tsx
  • Create web/src/lib/stores/profile-store.ts
  • May need API routes for profile updates

Wave 3: UX Overhaul

3.1 Tour System Redesign

Problem: Current modal-based tour is intrusive; want contextual radar pings Current: web/src/components/onboarding/WelcomeModal.tsx - 6-step modal tour

New Design:

  • Remove modal approach
  • Create TourPing component:
    • Glowing pulsing radar ping (like landing page but GREEN and SMALLER)
    • Positioned at each tour item
    • Click ping = show tooltip with info
    • Progress through tour by clicking pings
  • Sequential reveal (next ping appears after current dismissed)

Implementation:

  • Create web/src/components/onboarding/TourPing.tsx
  • Create web/src/components/onboarding/TourManager.tsx
  • Define tour stops with positions relative to target elements
  • Use ResizeObserver/MutationObserver for positioning
  • Store progress in localStorage

Files to create:

  • web/src/components/onboarding/TourPing.tsx
  • web/src/components/onboarding/TourManager.tsx
  • web/src/components/onboarding/tour-config.ts

Files to modify:

  • web/src/components/onboarding/WelcomeModal.tsx (replace or repurpose)
  • web/src/app/layout.tsx

3.2 Help Page Redesign

Problem: Needs update for current build Location: web/src/app/help/page.tsx

Current: Static content with features, shortcuts, FAQ

Updates Needed:

  • Reflect current feature set (no trading, research focus)
  • Update keyboard shortcuts to match actual implementation
  • Improve FAQ with real questions
  • Add search functionality
  • Better visual hierarchy
  • Link to tour restart option

Files to modify:

  • web/src/app/help/page.tsx

Wave 4: Major Features

4.1 Retention Audit - News & Prediction Market Feeds

Problem: Need constant content feeds to retain users Current State (Confirmed):

  • Alpaca News API already integrated! via alpaca_client.get_news() in Python backend
  • News flows: Alpaca → Python backend → /api/news → news-store.ts → NewsPanel.tsx
  • Falls back to mock data when backend unavailable
  • Prediction market components exist: RelatedPredictionMarkets.tsx

What's Working:

  • Alpaca provides stock-related news with symbol filtering
  • 5 credits deducted per news request (rate limiting in place)
  • Basic sentiment inference from keywords

What's Missing:

  • Continuous/streaming news feed (currently fetch-on-demand)
  • Prediction market data feeds (components exist but no real API)
  • Category filtering and infinite scroll
  • Real-time updates

Enhancement Plan:

  1. News Feed Enhancement:

    • Add auto-refresh polling (every 5 min)
    • Infinite scroll with pagination
    • Category tabs (All, Watchlist, Trending)
    • Cache recent articles to reduce API calls
  2. Prediction Market Integration:

    • Research Polymarket/Kalshi public APIs
    • Create /api/feeds/predictions/route.ts
    • Connect to PredictionMarketPanel.tsx
    • Show trending markets, not just related
  3. Unified Feed Component:

    • Tabbed interface: News | Predictions | Combined
    • Real-time badge for new items
    • Persistent in sidebar for constant engagement

Files to modify:

  • web/src/components/trading/NewsPanel.tsx - add auto-refresh, pagination
  • web/src/lib/stores/news-store.ts - add caching, pagination state

Files to create:

  • web/src/app/api/feeds/predictions/route.ts
  • web/src/components/feeds/PredictionFeed.tsx

4.2 Landing Page Redesign

Problem: Want high-converting page with sticky section headers and scroll mechanics Location: web/src/app/(marketing)/landing/page.tsx Inspiration: Linear.app (per user request)

Current Assets to KEEP:

  • IntelligentBackground.tsx - topographical animation (PERFECT, don't touch)
  • FrostedOverlay.tsx - blur effect

Linear.app Scroll Mechanics to Implement:

  • Sticky Section Headers - Heading stays pinned while content scrolls beneath
  • Content passes under heading - Then next section's heading takes over
  • Smooth transitions - Headers fade/slide as they swap
  • Cohesive single-page flow - All content in one scrollable space

Proposed Sections:

  1. Hero - Keep current style, strong CTA
  2. How It Works - Sticky header + 3-4 step cards that scroll
  3. Features - Sticky header + feature cards
  4. AI Research Assistant - Sticky header + capability showcase
  5. Final CTA - Sign up / Try Demo

Implementation Approach:

.section-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: gradient-fade;
}
  • IntersectionObserver to track active section
  • Framer Motion for header transitions
  • Each section ~100vh minimum
  • Content scrolls within sticky container

Agent: Use landing-page-designer skill to:

  1. Analyze Linear.app scroll mechanics
  2. Research 2025 landing page best practices
  3. Generate optimized copy and structure

Files to modify:

  • web/src/app/(marketing)/landing/page.tsx - Major restructure
  • web/src/app/globals.css - Sticky section styles

Files to create:

  • web/src/components/landing/StickySection.tsx - Reusable sticky header section
  • web/src/components/landing/HowItWorks.tsx
  • web/src/components/landing/FeaturesSection.tsx

Agent/Tool Assignment by Wave

Wave 1 - Quick Fixes

Task Agent/Skill Tools
1.1 Market Indicator Bug Direct implementation Playwright (verify fix)
1.2 Message Formatting frontend-developer Firecrawl (analyze Claude.ai)
1.3 Chart Animation ui-builder skill -

Wave 2 - Core Features

Task Agent/Skill Tools
2.1 AI Semantic Awareness ai-engineer Supabase MCP
2.2 Settings Page frontend-developer -
2.3 Profile Page fullstack-developer Supabase MCP

Wave 3 - UX Overhaul

Task Agent/Skill Tools
3.1 Tour System frontend-developer Playwright (test tour)
3.2 Help Page Direct implementation -

Wave 4 - Major Features

Task Agent/Skill Tools
4.1 Retention Feeds fullstack-developer Perplexity (API research)
4.2 Landing Page landing-page-designer skill Firecrawl (Linear.app analysis)

Execution Checklist

Wave 1 Checklist

  • 1.1 Fix market indicator timezone (use proper ET calculation with DST)
  • 1.1 Test: Verify green when open, red when closed
  • 1.2 Analyze Claude.ai message formatting with Firecrawl
  • 1.2 Update MessageBubble.tsx markdown styles
  • 1.2 Test: Compare output formatting visually
  • 1.3 Create AnimatedChartIcon component with SVG path animation
  • 1.3 Integrate into header where "FULL CHART" appears
  • 1.3 Test: Verify hover animation works smoothly

Wave 2 Checklist

  • 2.1 Add get_thesis_entries, get_journal_entries tools
  • 2.1 Expand chat context with thesis/journal data
  • 2.1 Test: Ask AI about thesis - should respond with data
  • 2.2 Remove trading section from SettingsPanel
  • 2.2 Add AI Assistant, Data Sources sections
  • 2.2 Wire up settings persistence
  • 2.3 Connect ProfilePanel to real user data
  • 2.3 Implement edit functionality for each section
  • 2.3 Test: Update profile field, verify persistence

Wave 3 Checklist

  • 3.1 Create TourPing component (green radar pulse)
  • 3.1 Create TourManager with step definitions
  • 3.1 Remove/replace WelcomeModal
  • 3.1 Test: Complete tour flow with Playwright
  • 3.2 Update help page content for current features
  • 3.2 Remove trading references
  • 3.2 Add tour restart option

Wave 4 Checklist

  • 4.1 Add auto-refresh to NewsPanel (5 min interval)
  • 4.1 Implement infinite scroll pagination
  • 4.1 Research & integrate prediction market API
  • 4.1 Test: Verify continuous feed updates
  • 4.2 Analyze Linear.app with landing-page-designer
  • 4.2 Create StickySection component
  • 4.2 Restructure landing page with new sections
  • 4.2 Test: Scroll behavior works as expected

Critical Files Summary

Files to Modify

File Wave Purpose
web/src/components/widgets/MarketStatusWidget.tsx 1 Fix timezone
web/src/components/layout/MarketWatchPanel.tsx 1 Fix duplicate timezone logic
web/src/components/chat/MessageBubble.tsx 1 Improve formatting
web/src/components/layout/SettingsPanel.tsx 2 Rebuild sections
web/src/components/layout/ProfilePanel.tsx 2 Make functional
web/src/app/api/chat/route.ts 2 Expand AI context
web/src/lib/llm/tools.ts 2 Add thesis/journal tools
web/src/components/onboarding/WelcomeModal.tsx 3 Replace with ping system
web/src/app/help/page.tsx 3 Update content
web/src/components/trading/NewsPanel.tsx 4 Add auto-refresh
web/src/app/(marketing)/landing/page.tsx 4 Major restructure

Files to Create

File Wave Purpose
web/src/components/ui/AnimatedChartIcon.tsx 1 Animated SVG icon
web/src/components/onboarding/TourPing.tsx 3 Radar ping component
web/src/components/onboarding/TourManager.tsx 3 Tour orchestration
web/src/app/api/feeds/predictions/route.ts 4 Prediction market API
web/src/components/landing/StickySection.tsx 4 Sticky header section

Execution Strategy

Mode: All at once (overnight capable)

Verification Gates:

  1. After Wave 1 → Run npm run build + Playwright visual check
  2. After Wave 2 → Test AI awareness manually + build check
  3. After Wave 3 → Run tour with Playwright
  4. After Wave 4 → Full landing page review + feed test

Parallel Execution Within Waves:

  • Wave 1: All 3 items can run in parallel
  • Wave 2: Settings + Profile can parallel, AI awareness separate
  • Wave 3: Tour + Help can parallel
  • Wave 4: Feeds + Landing can parallel

Total Items: 10 across 4 waves