Repository navigation
Conversation
Open
8 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR reconciles application secrets management following PR #208 and completes the authenticated AI Tutor and Stockfish Coach features.
1. Secrets & Environment Validation
INDEX_KEYis empty/unset across all environments, preventing silent runtime 500 errors on user login.GEMINI_API_KEY/OPENAI_API_KEYto notify developers if AI features will run in rule-based offline fallback mode.node-config, directprocess.env, andREACT_APP_*.2. Client-Side Agora Consistency
process.env.REACT_APP_AGORA_APP_ID || '6b7772f2a76f406192d8167460181be0', matching production build-time behavior while preserving local zero-config defaults.3. AI Tutor Session & Ownership Hardening
5f8f8c44b54764421b7156e0) and eliminated the redundant/user/getUsernetwork pre-fetch.Authorization: Bearer ${cookies.login}and omitsuserId, allowingPOST /chat/sessionto securely bind directly toreq.user.4. Stockfish Move Feedback Authentication
token?: stringparameter togetAiFeedbackForMoveand attachedAuthorization: Bearer ${token}header toPOST /chat/chess-feedback.useCookies(['login'])toStockfishTutorcomponent and passedcookies.loginacross all 4 move analysis pathways.Test & Verification Results
middlewareNode): 264/264 passing across 22 test suites (routeSecurity.test.js,cors.test.js,requireAuth.test.js,leaderboard.test.js,streak.test.js, etc.).react-ystemandchess): 156/156 passing across 29 test suites (PlayComputer.test.tsx,Login.test.tsx, etc.).