Skip to content

Multi-language onboarding support (Spanish, Latin, Icelandic)#122

Merged
Peleke merged 6 commits intostagingfrom
feature/multi-language-onboarding
Dec 23, 2025
Merged

Multi-language onboarding support (Spanish, Latin, Icelandic)#122
Peleke merged 6 commits intostagingfrom
feature/multi-language-onboarding

Conversation

@Peleke
Copy link
Owner

@Peleke Peleke commented Dec 21, 2025

Summary

  • Adds language selection as the first step in onboarding (Step 1 of 4)
  • Supports Spanish, Latin, and Icelandic with language-specific UI text throughout
  • Persists selected language to user profile via new language_id column
  • Updates all onboarding API routes to handle language parameter

Changes

Database

  • New migration 20251221_add_language_to_profiles.sql adds language_id column with constraint

UI Components

  • OnboardingWelcome.tsx: New language selection step with flag emojis and native names
  • AssessmentChat.tsx: Language-specific thinking/placeholder text
  • app/onboarding/assessment/page.tsx: Dynamic header text based on language
  • app/onboarding/complete/page.tsx: Language-specific congratulations

API Routes

  • /api/onboarding/chat: Accepts and uses language for AI prompts
  • /api/onboarding/assess: Accepts language for assessment evaluation
  • /api/onboarding/complete: Saves language_id to user profile

Test Plan

  • Test onboarding flow selecting Spanish
  • Test onboarding flow selecting Latin
  • Test onboarding flow selecting Icelandic
  • Verify language-specific UI text appears correctly
  • Verify language_id is saved to user_profiles table
  • Test going back to language selection and changing choice

Closes #112

🤖 Generated with Claude Code

Peleke Sengstacke and others added 6 commits December 21, 2025 17:14
- Add database migration for language_id column on user_profiles
- Add language selection as first step in onboarding flow
- Update OnboardingWelcome with language picker (Step 1 of 4)
- Update AssessmentChat with language-specific UI text
- Update assessment page to show language name and pass to chat
- Update complete page with language-specific congratulations
- All onboarding API routes now accept and handle language param
- Progress indicator updated from 3 to 4 steps throughout flow

Closes #112

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use shadcn Button and Textarea components
- Match input area layout with DialogView (min-h-[80px], flex gap-2)
- Consistent button styling with icon + text pattern

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Unit Tests (lib/prompts/__tests__/onboarding-assessment.test.ts):
- Enable previously skipped multi-language tests
- Test getOnboardingSystemPrompt for es, la, is
- Test getAssessmentPrompt with language parameter
- Test getFallbackMessage for all languages
- Test UI_TEXT coverage for AssessmentChat

E2E Tests (tests/e2e/onboarding/multi-language-onboarding.spec.ts):
- Language selection step (all 3 languages displayed)
- Language highlighting on selection
- Continue button disabled until selection
- sessionStorage persistence
- Goals step with language-specific placeholders
- Back navigation
- Assessment chat loading states
- API route verification for language params
- Full flow smoke tests for each language
- Congratulations messages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Profile Page:
- Add language dropdown to change learning language preference
- Full-width 'View All Vocabulary' button on mobile

Onboarding Complete:
- Prioritize courses matching user's selected language
- For Spanish: highlight 'Vibras Puras'
- For Latin/Icelandic: highlight first course matching language

Assessment Chat:
- Autoplay audio for first AI message
- Pass correct language to AudioButton

Dark Mode Fixes:
- NotificationSettings language preferences now dark-mode aware
- Push notifications section now dark-mode aware

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Peleke Peleke merged commit 93fd067 into staging Dec 23, 2025
2 checks passed
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