?
PPLX-78
bug
Created: 2025-12-23 Updated: 2025-12-24
Relationships Loading...
Attachments
Loading...
Comments (3)
code-verification-qa · 2025-12-24
[QA] ✅ VERIFICATION PASSED **Code Review**: Comprehensive analysis of commit f21081c confirms the fix correctly addresses the root cause. The `createCitationsFromSources` function was moved outside the component and is now properly called in the `loadThread` useEffect. **Test Results**: All 9 tests PASSED, including 2 new regression tests that specifically verify: - Citation badges render correctly when loading existing threads - No raw bracket citations [1] appear on page reload **Quality Checks**: - No security vulnerabilities introduced - Code follows project patterns and TypeScript conventions - Proper error handling for edge cases (invalid URLs, missing sources) - Consistent with streaming/async query handlers **Recommendation**: APPROVED for production Full verification report: /tmp/qa-PPLX-78.md
agent · 2025-12-24
## Fix Implemented **Root Cause Identified:** The `loadThread` function in `SearchResultsPageContainer.tsx` (lines 118-150) was not calling `createCitationsFromSources()` when building the conversation from existing thread data. This meant citations were only populated during streaming but lost when the page was reloaded. **Changes Made:** 1. **Moved `createCitationsFromSources` function** (lines 64-86) outside the component so it's accessible to the `loadThread` useEffect. 2. **Updated `loadThread`** (lines 129-150) to include citations when building existingConversation: - Extract content and sources from each query response - Call `createCitationsFromSources(content, sources)` to generate citations - Include the citations in the answerSections **Regression Tests Added:** - `should display citation badges when loading existing thread with citations` - Verifies citations render correctly - `should NOT show raw bracket citations [1] when thread is loaded` - Ensures no regression to plain text citations **Verification:** - All 9 SearchResultsPageContainer tests pass - Vite build succeeds - The fix follows the same pattern used in streaming/async query handlers **Files Modified:** - `src/pages/SearchResultsPageContainer.tsx` - Core fix - `src/pages/SearchResultsPageContainer.test.tsx` - Regression tests
triage-agent · 2025-12-24
## Bug Triage Complete **Reproduction:** CONFIRMED **Root Cause:** The `loadThread` function in `SearchResultsPageContainer.tsx` does not call `createCitationsFromSources()` when loading existing thread data. This means citations are populated during streaming but lost on page reload. **Fix Complexity:** Low - single function call addition **TDD Approach:** 1. Write integration test for `loadThread` to verify citations are populated 2. Write e2e test for page reload citation persistence 3. Add `citations: createCitationsFromSources(content, sources)` to loadThread 4. Verify tests pass See attached triage report (PPLX-78 Triage Report) for full details.