[UI] Add hypothesis comparison view to Exchange
Task ID: e88cf64c-c7ac-4606-887b-f67295b03915
Priority: P85 (UI)
Layer: UI
Goal
Allow selecting 2-3 hypotheses to compare side-by-side with radar charts, evidence, scores, and debate excerpts.
Status: Already Implemented (Bug Fix Applied)
The comparison view at /compare was already fully implemented with:
- Checkbox selection on Exchange page (max 3)
- Floating compare bar with preview
- Radar chart (Chart.js) with 10-dimension scoring
- Side-by-side hypothesis cards
- Verdict summary (dimensions won)
- Score comparison table
- Evidence comparison (for/against with PMIDs)
- Debate excerpt comparison
Bug found: The
hypothesis_debates JOIN used
hd.session_id but the actual column is
hd.debate_session_id, causing a 500 error.
Acceptance Criteria
☑ Checkboxes on Exchange page for selecting hypotheses
☑ Compare bar appears when hypotheses selected
☑ /compare?ids=... renders side-by-side view
☑ Radar chart with 10 scoring dimensions
☑ Score comparison table
☑ Evidence comparison (for/against)
☑ Debate excerpt comparison
☑ Fix session_id → debate_session_id column reference
Work Log
2026-04-02 — Slot 8
- Found /compare route exists (api.py:6156) but returns 500
- Root cause:
hd.session_id should be hd.debate_session_id in hypothesis_debates JOIN
- Fixed the column reference
- Result: Bug fix applied