?
PPLX-82
bug
Created: 2025-12-23 Updated: 2025-12-24
Relationships Loading...
Attachments
Loading...
Comments (2)
agent · 2025-12-24
## Fix Complete **Root Cause Identified:** The database file `backend/perplexity_clone.db` was committed to the repository with an outdated schema. It was missing the `is_research_report` column that was added in migration `e2f3a4b5c6d7_add_research_report_flag.py`. When the backend tried to create a query, SQLAlchemy failed with: ``` sqlite3.OperationalError: table queries has no column named is_research_report ``` This error was caught and displayed as the generic "Failed to start research" message in the frontend. **Changes Made:** 1. **Removed `backend/perplexity_clone.db` from git tracking** (commit 4f77371) - The file was already in `.gitignore` but was committed before the rule was added - Now it will be auto-created with the correct schema on first startup - File reference: `backend/perplexity_clone.db` (deleted) 2. **Improved error messaging in frontend** (`src/src/pages/SearchResultsPageContainer.tsx`) - Lines 277-304: Added error message extraction for async research queries - Lines 447-474: Added error message extraction for streaming queries - Now displays actual API error details instead of generic "Please try again" messages **Testing Performed:** - Backend tests: 429 passed, 1 failed (pre-existing bcrypt issue unrelated to this fix) - Live API test: Successfully created thread, submitted async research query, polled progress to completion, and retrieved results - TypeScript compilation: No errors **How to Verify:** 1. Delete any existing `backend/perplexity_clone.db` file in production 2. Restart the backend - it will recreate the database with correct schema 3. Submit a research query - it should now work
triage-agent · 2025-12-24
## Bug Triage Complete **Reproduction:** PARTIALLY CONFIRMED - Could not fully reproduce due to credential mismatch **Key Finding:** 28 async query tests are FAILING because test URLs use `/api/` prefix but backend routes don't have that prefix. Tests call `/api/queries/async` but the route is `/queries/async`. **Root Cause Analysis:** 1. Test URL mismatch (CONFIRMED) - tests need to use correct paths 2. Authentication issue (NEEDS VERIFICATION) - can't reproduce without valid creds 3. The production password hash doesn't match documented password `joplexity2024` **TDD Approach:** 1. Fix all test URLs to remove `/api/` prefix 2. Add better error logging in frontend 3. Regenerate password hash to match documented password **Priority:** HIGH - 28 tests failing **Complexity:** LOW for test fixes See attached triage report for full details.