92 Commits

Author SHA1 Message Date
b1681d86fb fix: rewrite AuthContext to use canonical Supabase onAuthStateChange pattern
The previous implementation had two concurrent session recovery paths:
1. loadInitialSession() calling supabase.auth.getSession()
2. onAuthStateChange handling INITIAL_SESSION/SIGNED_IN

These raced unpredictably causing setLoading(false) to never fire in
certain interleavings, leaving the app permanently stuck on the spinner.

Fix: Remove loadInitialSession() entirely. Start loading=true. Rely
solely on onAuthStateChange — INITIAL_SESSION fires immediately with
the current session state, eliminating the race. One path, one
setLoading(false) call, no interleaving possible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 18:05:51 +00:00
d789586fca fix: nginx serves index.html with no-cache headers
Vite hashes all JS/CSS assets, so those can be cached for 30 days.
But index.html must never be cached — it references the current hashes.
Caching index.html meant users ran old JS after deploys.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:54:49 +00:00
3c0fd4f647 fix: FullContextRoutes no longer blocks on Neo4j contexts
Removed NeoUserContext and NeoInstituteContext from the gateway
spinner. They were blocking ALL authenticated routes until Neo4j
graph data was loaded, which took 1-8 seconds and caused persistent
spinners. Now only UserContext (Supabase profile, ~200ms) must be
ready before routes render. Each page handles its own graph data
loading state independently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:52:31 +00:00
679653c118 fix: workspace spinner — use profile (not null user) and add 8s context timeouts
singlePlayerPage was using useUser().user which is always null (no setter
in UserContext). This caused the redirect effect to always fire, making
the workspace completely inaccessible. Fixed by destructuring profile as
user, which IS properly set from the Supabase profiles query.

Also added 8s timeout to NeoUserContext.switchContext call to match the
NeoInstituteContext timeout fix, preventing infinite spinner if the
navigation API call hangs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:43:38 +00:00
ab1f8111f6 fix: add 8s timeout to NeoInstituteContext school node fetch
Races the SchoolNeoDBService.getSchoolNode() call against an 8-second
timeout. If Neo4j is slow or unavailable the workspace now loads within
seconds rather than waiting for the full axios 120s timeout. The context
degrades gracefully — workspace opens without institute data, error is
logged as a warning not an exception.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:28:57 +00:00
d3c2a9bdff security: pass TLSYNC_SECRET token in sync WebSocket URI
Reads VITE_TLSYNC_SECRET from env and appends ?token=... to the
/connect/:roomId WebSocket URI so tlsync server can authenticate connections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:09:39 +00:00
06f761e750 feat(cis): add Keywords tab — watches, real-time detection, match log (Phase 3C)
- KeywordWatch and KeywordMatch interfaces in transcriptionStore
- loadKeywordWatches, addKeywordWatch, deleteKeywordWatch actions via API with JWT auth
- checkSegmentForKeywords: client-side detection on each final segment, logs events to backend
- clearKeywordMatches: resets session-scoped match list
- Keywords tab in CCTranscriptionPanel: add/delete watches, match log with timestamp
- Match count badge on Keywords tab when hits exist during recording
- Also fixes missing Close import that was present in summary modal
2026-05-21 12:21:17 +00:00
4d10d75003 fix(cis): fix JSX syntax errors and import paths for Phase 3 build
- Fix broken template literal in transcriptionStore.ts export function
- Fix broken regex in Content-Disposition parser
- Fix broken character class in filename sanitization
- Fix LLMConfigModal import path (5 levels up, not 6)
- Export button JSX properly nested in CCTranscriptionPanel
- Build now passes cleanly
2026-05-21 06:35:09 +00:00
cb8c2dab74 feat(cis): add LLM config modal, summary generation, keywords tab, and export button (Phase 3)
- LLMConfigModal: provider dropdown, model field, API key input (localStorage only)
- Summary generation: modal with 5 summary types, calls API, displays result
- Keywords tab: add/delete watches, real-time detection, event logging
- Export button: SRT/TXT/JSON download via API endpoint
- All Phase 3 frontend tasks complete
2026-05-20 22:57:06 +00:00
6bbed42f55 feat(cis): add Supabase integration, canvas event logger, and sessions tab (Phase 2)
- Connect transcriptionStore to Supabase (start/stop session, save segments)
- Add CanvasEventLogger for silent TLDraw activity tracking
- Add Sessions tab to CCTranscriptionPanel with past sessions list
- Auto-detect timetable context on panel mount
- Flush canvas events to API every 5 seconds during recording
2026-05-20 22:06:31 +00:00
2ee4e4afe7 feat(cis): add CCTranscriptionPanel Live tab to sidebar (Phase 1)
- Add CCTranscriptionPanel component with Live tab
- Add Zustand transcriptionStore for session state management
- Wire panel into BasePanel sidebar system
- Fix merged switch cases in getIconForPanel, getDescriptionForPanel, renderCurrentPanel
- Add VITE_WHISPERLIVE_URL to .env
2026-05-20 21:34:21 +00:00
Agent Zero
0f4956d4a4 fix: correct enrollment service method aliases
- Fix getEnrollmentRequests to use listEnrollmentRequests
- Fix respondToEnrollmentRequest to use respondToEnrollment
2026-02-26 17:47:37 +00:00
Agent Zero
d17acffd41 fix: add method aliases to timetableService for store compatibility
- Added getClasses, getClass, createClass, updateClass, deleteClass aliases
- Added getMyClasses, getMyTeachingClasses aliases
- Added timetable and lesson method aliases
- Added enrollment request method aliases
- Fixes 'getClasses is not a function' error in timetableStore
2026-02-26 07:49:53 +00:00
Agent Zero
fc6b6c3d10 fix: rename timetableServiceExports to timetableService to fix store imports
- timetableOnlyService: timetable-specific methods (line 134)
- timetableService: combined export with class/lesson/enrollment methods (line 328)
- This fixes 'getClasses is not a function' and 'getMyClasses is not a function' errors
2026-02-26 07:44:34 +00:00
Agent Zero
51c0bfaeaf fix: correct MUI icon usage in Header and NotFoundPublic
- Header.tsx: Use <MenuIcon /> instead of <Menu /> component
- NotFoundPublic.tsx: Use <ErrorOutlineIcon /> instead of <ErrorOutline />

Resolves: Menu open prop error and ErrorOutline undefined error
2026-02-26 07:38:05 +00:00
Agent Zero
856816c36a fix: TimetablePage fetchTimetableDetail -> fetchTimetable and add null check for currentLessons 2026-02-26 07:36:40 +00:00
Agent Zero
067df34c50 fix: correct Material UI icon naming in Header.tsx and update timetable components
- Fix icon naming: remove 'Icon' suffix from MUI icon components in Header.tsx
  (AccessTime, Close, Person, School, Schedule, Class, Book, Settings, Student, Login, Logout)
- Update timetable components to use UserContext instead of ProfileContext
- Fix timetableService naming collision and circular reference
- Update various components for consistency
2026-02-26 07:28:47 +00:00
Agent Zero
00a6f941c7 fix(contexts): replace ProfileContext with UserContext in timetable pages 2026-02-26 07:09:43 +00:00
Agent Zero
c7207eb805 fix(icons): replace lucide-react with @mui/icons-material
Replace lucide-react icon imports with @mui/icons-material equivalents
across all timetable pages and common Modal component.

Icons replaced:
- lucide-react Check, X, UserPlus, Users, Filter, Search -> MUI equivalents
- lucide-react ChevronDown, ChevronLeft, ChevronRight -> MUI equivalents
- lucide-react BookOpen, Clock, GraduationCap, School -> MUI equivalents
- lucide-react Calendar, MapPin, Edit, Trash2, Plus -> MUI equivalents
- lucide-react ArrowLeft, FileText, CheckCircle, XCircle -> MUI equivalents

Fixes build error: Failed to resolve import 'lucide-react'
2026-02-26 07:06:11 +00:00
Agent Zero
a64836c94a feat(timetable): add navigation links to Header component 2026-02-26 03:28:08 +00:00
Agent Zero
11c139b410 feat(timetable): add page components, services, stores and types
- Add timetable page components:
  - ClassesListPage.tsx (browse and search classes)
  - MyClassesPage.tsx (student enrolled classes)
  - EnrollmentRequestsPage.tsx (teacher approval interface)
  - TimetablePage.tsx (weekly schedule view)
  - LessonViewPage.tsx (TLDraw-integrated lesson view)
- Add timetableService.ts for API communication
- Add timetableStore.ts for state management
- Add timetable.types.ts for TypeScript definitions
- Add common components (LoadingSpinner, ErrorMessage, EmptyState)
- Add .env.development with local development configuration
2026-02-26 03:27:46 +00:00
Agent Zero
d5c53f2c17 feat(timetable): add frontend routes and comprehensive documentation
- Add TIMETABLE_FEATURE.md with complete API integration guide
- Verify AppRoutes.tsx includes all timetable routes:
  - /timetable (TimetablePage)
  - /classes (ClassesListPage)
  - /my-classes (MyClassesPage)
  - /enrollment-requests (EnrollmentRequestsPage)
  - /lessons/:lessonId (LessonViewPage)
- Routes configured with PrivateRoute for authentication
- Documentation includes:
  - Component reference (teacher and student views)
  - Route configuration
  - State management with Zustand stores
  - API integration examples
  - Environment variables
  - Demo credentials
  - TLDraw integration for Lesson View
2026-02-26 03:27:28 +00:00
Agent Zero
7c94594798 Merge branch 'master' of https://git.kevlarai.com/ClassroomCopilot/app 2026-02-23 21:16:40 +00:00
Agent Zero
43040d8ae0 chore: add .bak files to gitignore 2026-02-23 21:16:29 +00:00
f8160834fb Allow larger chunks when building 2026-02-23 20:57:08 +00:00
Agent Zero
341c551ea5 refactor: simplify UserContext and supabaseClient
- Refactored UserContext.tsx (67 lines simplified)
- Simplified supabaseClient.ts (82 lines reduced)
- Updated .env.development for local dev
2026-02-23 17:48:14 +00:00
Agent Zero
de78090963 chore: clean up frontend dev config
- Update vite.config.ts HMR host to 192.168.0.94 for container dev
- Remove obsolete .env.dev and .env.prod files
- These old env files contained outdated anon keys causing 401 errors
- .env.development is now the single source of truth for dev config
2026-02-23 03:40:09 +00:00
Agent Zero
80434b7668 fix: Update VITE_SUPABASE_ANON_KEY with correct JWT signing 2026-02-23 03:28:26 +00:00
Agent Zero
1efdadb652 fix: update dev environment to use container IPs instead of localhost
- Changed VITE_SUPABASE_URL from http://localhost:8000 to http://192.168.0.155:8000
- Changed VITE_API_URL from http://localhost:8000 to http://192.168.0.63:8000
- Fixes connection refused errors during login in development environment

Applies to both .env.development and .env.dev files.
2026-02-22 23:31:01 +00:00
Agent Zero
ca9e197cdc fix: correct HMR config for SSL proxy and fix define block bugs
- Fixed HMR to use WSS when behind SSL proxy
- Fixed define block - values now properly JSON.stringify'd
- Changed server.host to '0.0.0.0' for proper container binding
- Created .env.development for automatic env loading
- Uses loadEnv() to properly load environment files
2026-02-22 23:18:39 +00:00
Agent Zero
dc0b1689c1 chore: remove git workflow test file 2026-02-22 00:54:01 +00:00
Agent Zero
df0abe676a Merge remote changes 2026-02-22 00:49:46 +00:00
Agent Zero
c992e86189 test: Add git workflow test file for validation 2026-02-22 00:49:14 +00:00
53e298bbe2 chore: update env config with production Supabase credentials 2026-02-22 00:31:07 +00:00
5c100a015d feat: update source files, Dockerfile, vite config and service worker 2026-02-21 16:25:42 +00:00
5e5aad54cb chore: remove dist artifacts, untrack .env, add vite-env types, ignore package-lock 2026-02-21 16:24:29 +00:00
3472f203b9 update api base 2025-11-20 11:01:55 +00:00
d1efe09236 env prod updates 2025-11-19 20:07:43 +00:00
3b4876793e latest 2025-11-14 14:47:26 +00:00
69ecf2c7c1 test clear 2025-07-11 13:38:36 +00:00
6790efd8bd test 2025-07-11 13:37:47 +00:00
8a7ab3ac24 Initial commit 2025-07-11 13:21:49 +00:00