If the API returns a non-string error (e.g. numeric HTTP status code),
calling .includes() directly on it throws "N.includes is not a function".
Convert to string via JSON.stringify first.
Fixes save button crash on rules/new page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Vite tree-shakes pointCode from intermediate data objects. Fix by
querying evaluation_points.code directly in the route loader with
postgrestGet, then patching pointCode onto reviewPoints before
returning to the client. Works for both legacy and GraphRAG paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vite's SSR build strips pointCode from ReviewPointResult return objects.
Workaround: pass a separate pointCodeMap from reviews.ts and apply it
in the route loader (reviews.tsx) which Vite preserves.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add pointCode field to ReviewPoint interface and data pipeline
- Show code badge (e.g., JZ-DJ-001) before evaluation point name
- Search bar now matches against point code in addition to name
- Updated placeholder to indicate code search support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When documents are processed through GraphRAG pipeline, coordinate
enrichment produces text_bbox (paragraph-level coordinates) instead of
char_positions (character-level OCR coordinates). Added resolveCharPositions()
helper that converts text_bbox to CharPosition[] format, enabling PDF
highlight rendering for GraphRAG-processed documents.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Create placeholder reviewPoints from not_applicable unified results
- Merge with existing reviewPoints for display
- Count notApplicable from reviewPoints for accurate statistics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- failed_count should be 'warning' not 'error' for scored eval
- Show '未涉及' badge always, not only when count > 0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- getReviewPoints_fromApi returns {data, stats, ...} not {reviewPoints, ...}
- Fixed key check from 'reviewPoints' to 'data'
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- reviewPoints from unified API lacks 'content' field expected by ReviewPointsList
- Use reviewData.reviewPoints (from /api/v3/review-points) which has proper content structure
- Scored data still available via scoredResults prop
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add notApplicable field to Statistics interface
- Show blue "未涉及" badge when count > 0 (display only, no filter)
- Map backend not_applicable_count to frontend statistics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add missing closing brace for unified API error check
- Properly wrap catch block around error handling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add getUnifiedEvaluationResults API function
- Extend ReviewPointsListProps with flowType, scoredResults, scoredSummary
- Add ScoredResultCard rendering for graphrag flow_type
- Modify reviews.tsx loader to call unified API
- Add scored evaluation component imports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>