Fix application startup bugs and database query inconsistencies #2
+155
−468
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.
Application had multiple blocking issues: duplicate code in user module, incorrect database queries referencing non-existent columns, legacy Flask code mixed with FastAPI, and OpenAI client initialization failing at import time.
Changes
Database Query Fixes
vox/user.py,vox/chat.py,vox/recordings.py,vox/socketio_handlers.py: Fixed queries that incorrectly referencedsession_idonuserstable. Schema usessessionstable to link sessions to users:Code Cleanup
vox/user.py: Removed duplicate module content (entire file was duplicated with slight variations)vox/socket_handlers.py: Deleted legacy Flask-style socket handler that was incompatible with FastAPIOpenAI Client Fix
vox/llm.py: Changed from module-level client initialization to lazy factory pattern to prevent import failures when API key is unsetGraceful Startup
vox/fastapi_app.py: App now starts without database connection for local developmentFrontend Fixes
static/scripts.js: Fixed undefinedpitch/hnrvariables in socket handler, fixed references to non-existent DOM elements, added missingsendChat()functionDependencies
requirements.txt: Added missingitsdangerous,bcryptinit_db.py: Fixed schema path from0.1.7/docs/todocs/Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.