Skip to content

Conversation

@rhyanvargas
Copy link
Owner

@rhyanvargas rhyanvargas commented Dec 17, 2025

🚀 PR Summary

Files Changed: 107

  • 🧩 Components: 32
  • 📄 Pages: 16
  • 🔐 Auth: 18
  • ⚙️ Config: 7

🧪 Testing Checklist

  • No TypeScript errors
  • Build passes successfully
  • Functionality tested

Auto-generated PR description

- Removed Tavus conversation API route and related functionality
- Added CVIProvider wrapper in root layout for video chat integration
- Temporarily disabled AskQuestion component in chapter quiz UI
- Updated video components with simplified structure:
  - Removed redundant displayName properties
  - Fixed initialization timing in Conversation component
  - Improved video preview and main video rendering

The changes reflect a shift from
- Removed deprecated feature specification for Tavus AI video integration
- Cleaned up specs directory by removing ask-question-tavus.md as the integration approach has changed
- Documentation will be replaced with updated architecture using new video provider
- Added comprehensive .env configuration for Tavus learning check feature with detailed comments
- Created technical documentation structure in specs/features/learning-check/ directory
- Added detailed implementation guide for perception analysis, webhook setup, and data structures
- Included webhook security best practices, payload examples, and error handling strategies
- Updated environment variables to support persona-based AI instructor
- Condensed project-standards.md from 400+ lines to 80 lines while preserving core rules
- Reorganized rules into 12 clear sections with focused guidance
- Added new TESTING.md guide for learning check feature with setup instructions
- Improved readability by removing redundant protocol details and using concise formatting
- Updated Next.js 15 rules to emphasize server components and barrel export restrictions
- Consolidated design system standards into clear
- Created new Alert component with default and destructive variants for displaying notifications
- Added AlertTitle and AlertDescription subcomponents with styled layouts and typography
- Implemented Empty component system for zero-state UI patterns with header, media, title, description, and content sections
- Added responsive styling with Tailwind CSS for both components including grid layouts and spacing utilities
- Included accessibility attributes like
- Added onQuizComplete callback to ChapterQuiz component to track quiz status and scores
- Implemented quiz completion state management in ChapterContent using useState
- Updated quiz UI layout by removing redundant title/description and adjusting card styling
- Added LearningCheck component integration that gates content based on quiz completion
- Reorganized imports for better code organization
- Added mock data support for quiz completion
- Created endpoint to initialize AI-powered learning check conversations with chapter context
- Added conversation termination endpoint for proper cleanup and cost management
- Implemented robust error handling and validation for both APIs
- Added structured context builder to guide AI instructor behavior with time limits and assessment focus
- Set up logging for critical errors and successful termination events
- Configured environment variable
- Implemented new LearningCheck component for chapter-end conversational assessments
- Added 4-minute timed conversation with engagement tracking (2-minute threshold)
- Created quiz-gated access system requiring 70% score to unlock assessment
- Built camera/microphone preview with Tavus integration for video conversations
- Added analytics logging for session events (start, end, completion, engagement)
- Implemented session state management with
Code Quality:
- Fix ESLint errors by prefixing unused parameters in ChapterQuiz
- Reduces linting errors from 5 to 0

Documentation:
- Add TAVUS_INDEX.md as central navigation hub for all Tavus docs
- Archive historical documentation (HAIRCHECK_CONVERSATION_FIX, LEARNING_CHECK_BASE_ANALYSIS)
- Add CLEANUP_2025-10-31.md summarizing all cleanup work
- Improves documentation organization and discoverability

Resolves all blocking linting errors. See docs/CLEANUP_2025-10-31.md for details.
- Add scripts for updating guardrails and objectives via API
- Add config extraction script for dynamic sync
- Add persona creation script
- Add comprehensive scripts README with usage examples
- Updates main scripts README with Tavus section

Enables automated syncing of objectives and guardrails from config.ts to Tavus API.
See scripts/TAVUS_SCRIPTS_README.md for usage.
Conversation Management:
- Add conversation creation endpoint with time limits and objectives
- Add conversation end endpoint (Next.js 15 async params compatible)
- Enforce 3-minute time limit via max_call_duration property
- Auto-inject objectives and guardrails from environment

Resource Creation:
- Add guardrails creation endpoint
- Add objectives creation endpoint
- Add persona update endpoint

Configuration:
- Use centralized Tavus config from lib/tavus
- Type-safe environment variable helpers
- Comprehensive error handling and logging

Implements MVP backend for learning check feature with structured objectives tracking.
New Components:
- Add LearningCheckBase component with proper hair check flow
- Add LearningCheckReady component for pre-check UI
- Refactor learning-check component with timer and conversation state

Component Architecture:
- LearningCheckBase: Main container handling screen states (ready → hairCheck → call)
- LearningCheckReady: Pre-check UI with requirements and start button
- LearningCheck: In-call UI with timer, engagement tracking, and conversation

Integration:
- Simplify chapter-content index to use LearningCheckBase
- Remove quiz-gating logic (moved to component internals)
- Cleaner props interface

Implements complete learning check user flow with Tavus CVI integration.
New Specifications:
- Add objective-completion-tracking.md spec for MVP implementation
- Defines webhook integration for tracking objective completion
- Documents data collection and scoring requirements

Spec Updates:
- Update learning-check-spec.md with formatting improvements
- Update learning-check-implementation.md with latest architecture
- Update TESTING.md with current test cases

Provides complete PRD for objective completion tracking feature.
Conversation Component:
- Add error state display for better user feedback
- Improve error boundary handling

useCVICall Hook:
- Add comprehensive error handling for call failures
- Improve state management during call lifecycle
- Better logging for debugging call issues
- Handle edge cases in call initialization

Improves reliability and debuggability of Tavus CVI integration.
- Improve code formatting consistency (indentation, spacing)
- Update JSDoc comments formatting
- Maintain same configuration values and structure
- No functional changes

Makes config more readable and maintainable.
Type Safety:
- Replace any[] with JsonPatchOperation type in update-persona route
- Replace any with explicit type in learning-check request body
- Add proper type definitions for better type safety

React Hooks:
- Add requestPermissions to useEffect dependency array in hair-check
- Follows react-hooks/exhaustive-deps rule

Result: npm run lint:strict now passes with 0 warnings (was 3 warnings)
- Added /logs/* directory to gitignore to exclude log files from version control
- Removed empty TECHNICAL_DEBT.md file that was not being used
- Updated button colors to use CSS variables for consistent theming across components
- Changed hardcoded colors to theme variables in hair-check and conversation components
- Added dynamic timer duration display based on TAVUS_ENV configuration
- Fixed code formatting and indentation in conversation route
- Added TODO note for adding session ID to conversation name
Technical Debt Documentation:
- Document 63 console.log statements across 16 files
- Provide structured migration plan with logger utility
- Include implementation checklist and timeline
- Define success criteria and testing strategy

Priority: Medium (before production launch)
Estimated Effort: 1-2 hours

Not blocking for MVP but should be resolved before production scale.
See docs/TECHNICAL_DEBT_CONSOLE_LOGGING.md for full details.
…learning-check

Rhyan/8p3 55 end of chapter learning check
- Added Windsurf workflow template for creating structured feature specs with requirements, design, tasks, and approval phases
- Included sample learning check report demonstrating EMDR assessment with objective tracking and engagement metrics
- Removed outdated content estimation system specification
Introduced new components for Tavus conversation and ask question dialog in the course chapter content. Updated related imports and logic in chapter content files. Also added @tavus/cvi-ui dependency and removed an obsolete video JSON file.
…k-spec

Feature/update learning check spec
…pecs

- Change specs/archive/ to **/archive/ pattern for broader coverage
- Remove outdated feature spec summary document
- Remove consolidated brainstorm document (historical reference)
- Update README to reflect current documentation structure with requirements.md, design.md, tasks.md, and TESTING.md
- Point to archived docs in new location

Consolidates learning check documentation to active specs only, moving historical files
- Add comprehensive feature spec for migrating from AWS Amplify to Better Auth
- Include requirements.md with user stories, acceptance criteria, and MoSCoW prioritization
- Include design.md with architecture, component structure, and security considerations
- Include tasks.md with phased implementation breakdown and acceptance criteria
- Add README.md documenting spec structure and quick links

Covers email/password auth, verification, passwor
- Add auth-schema.ts with user, session, account, and verification tables using Drizzle ORM
- Add drizzle.config.ts for PostgreSQL database configuration
- Generate initial migration (0000_violet_smiling_tiger.sql) with Better Auth core tables
- Add drizzle-kit and drizzle-orm dependencies for database management
- Include foreign key constraints with cascade delete for user relationships
- Add unique constraints on email and session
- Add new login-form.tsx and signup-form.tsx components using Better Auth patterns
- Add field.tsx component library with FieldSet, FieldGroup, FieldLabel, FieldDescription, FieldError, and FieldSeparator
- Create /signup page with SignupForm component including name, email, password, and confirm password fields
- Update /login page to use new LoginForm component with email and password fields
- Remove AuthRedirect wrapper and Sign
…dency

- Remove AuthClient.tsx, AuthRedirect.tsx, and SignIn.tsx components using AWS Amplify
- Add @radix-ui/react-checkbox dependency for Better Auth form components
- Clean up AWS Amplify UI React imports and social provider configurations
…forms

- Add authClient initialization using better-auth/react
- Implement form state management with email, password, name, and rememberMe fields
- Add form submission handlers with error handling and loading states
- Connect login form to authClient.signIn.email with remember me checkbox
- Connect signup form to authClient.signUp.email with password confirmation validation
- Add Checkbox component from Radix UI for remember me functionality
- Display
- Remove mock amplify_outputs.json creation from PR checks workflow
- Remove conditional TypeScript check logic based on amplify_outputs.json presence in pre-commit script
- Simplify build check step by removing Amplify-specific messaging
- Make TypeScript check unconditional in pre-commit hook
- Remove amplify.yml build configuration file
- Replace AWS Amplify auth with Better Auth session management in middleware
- Update /api/user route to use Better Auth session with request headers
- Simplify AuthProvider by removing Amplify configuration and Authenticator wrapper
- Remove AWS Amplify logic from EmailVerificationHandler component
- Update ProtectedRoute to use Better Auth useSession hook instead of useAuthenticator
- Simplify SessionHandler by
- Import auth-schema module for database table definitions
- Pass authSchema to drizzleAdapter configuration for explicit table mapping
- Group environment variables by category (Core Auth & Database, Mux Video, Tavus Learning Check)
- Mark required vs optional sections for better clarity
- Add detailed comments for DATABASE_URL format and Tavus webhook configuration
- Improve formatting with section separators and consistent spacing
- Clarify Tavus webhook usage for Phase 2+ perception/callbacks
- Update helper command comments for learning check asset creation
…mponent

- Convert dashboard page from client to server component using Better Auth session
- Replace AWS Amplify getCurrentUser/fetchUserAttributes with auth.api.getSession
- Remove loading state and useEffect in favor of server-side session check
- Add redirect to /login when user is not authenticated
- Create BackButton component with useRouter for client-side navigation
- Replace inline Button with window.history.back() with
Eliminated AWS Amplify-related packages from package.json and removed associated UI component overrides from globals.css. Updated Better Auth migration tasks documentation to include post-migration auth hardening steps.
Changed the Node.js engine version in package.json from '>=20.19.0' to '22.x' to ensure compatibility with Node.js 22.x.
Removed all AWS Amplify related dependencies from package.json and package-lock.json, including aws-amplify, @aws-amplify/adapter-nextjs, @aws-amplify/ui-react, and related devDependencies. Downgraded drizzle-orm and upgraded next to 15.5.9. This cleans up unused AWS Amplify packages and updates project dependencies.
@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
8p3p-lms-nextjs Ready Ready Preview, Comment Dec 17, 2025 0:53am

@rhyanvargas rhyanvargas merged commit 4b6fcaa into main Dec 17, 2025
4 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.

2 participants