Skip to content

[v2] Deprecate Chat Interface #227

@nicholaspsmith

Description

@nicholaspsmith

Overview

Remove the freeform chat interface and related code after goal-based system is functional.

Part of

Memoryloop v2 Pivot - Branch 014-goal-based-learning

Deprecation Strategy

  1. Build goal-based system first (Issues [v2] Database Schema: Learning Goals and Skill Trees #220-226)
  2. Migrate any existing chat-derived flashcards to goals
  3. Remove chat UI and routes
  4. Clean up database (optional: archive old data)

Files to Remove

Pages

  • app/(protected)/chat/page.tsx
  • app/(protected)/chat/loading.tsx
  • app/(protected)/chat/error.tsx

Components

  • components/chat/ChatInterface.tsx
  • components/chat/MessageList.tsx
  • components/chat/MessageInput.tsx
  • components/chat/GenerateFlashcardsButton.tsx
  • components/chat/FallbackNotice.tsx
  • components/chat/Message.tsx

API Routes

  • app/api/chat/conversations/route.ts
  • app/api/chat/conversations/[conversationId]/messages/route.ts

Database Operations

  • lib/db/operations/conversations.ts
  • lib/db/operations/messages.ts
  • lib/db/operations/messages-lancedb.ts

LLM Utilities

  • lib/claude/rag.ts
  • lib/claude/context.ts

Database Cleanup

  • Option A: Drop conversations/messages tables
  • Option B: Archive to backup tables
  • Recommended: Archive for 90 days, then drop

Migration Script

Create script to:

  1. Find flashcards created from conversations
  2. Create a "Legacy Cards" goal for each user
  3. Link orphaned flashcards to this goal

Acceptance Criteria

  • All goal-based features working first
  • Migration script handles existing flashcards
  • Chat routes return 410 Gone or redirect
  • No broken links in UI
  • Database cleaned up

Dependencies

Related Spec

See specs/014-goal-based-learning/spec.md - FR-030

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2Priority 2 - High

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions