[Exchange] Hypothesis comparison view done

← Exchange
E2.3: Add GET /compare?ids=h-abc,h-def to api.py showing 2-4 hypotheses side by side: overlaid radar charts, evidence lists compared, target genes linked. Add 'Compare' checkboxes to Exchange table rows + 'Compare Selected' button. Acceptance: User can select hypotheses on /exchange and compare them.

Completion Notes

Auto-release: non-recurring task produced no commits this iteration; requeuing for next cycle
Spec File

[Exchange] Hypothesis comparison view

Goal

Add GET /compare?ids=h-abc,h-def to api.py showing 2-4 hypotheses side by side: overlaid radar charts, evidence lists compared, target genes linked. Add 'Compare' checkboxes to Exchange table rows + 'Compare Selected' button.

Acceptance Criteria

☑ User can select hypotheses on /exchange and compare them.

Approach

  • Read AGENTS.md and relevant source files
  • Understand existing code patterns before modifying
  • Implement changes following existing conventions (f-string HTML, SQLite, Bedrock Claude)
  • Test: curl affected pages, verify rendering, run scidex status
  • Commit atomically with descriptive message
  • Work Log

    2026-04-01 - Starting implementation

    • Reading AGENTS.md and existing code patterns
    • Will implement /compare endpoint and UI checkboxes for hypothesis selection

    2026-04-01 - Implementation complete

    • Added GET /compare endpoint (api.py:306-540)
    - Accepts comma-separated hypothesis IDs (2-4)
    - Queries database for selected hypotheses with all 10-dimension scores
    - Generates side-by-side comparison table
    - Displays overlaid radar chart using Chart.js for visual comparison
    - Shows evidence for/against for each hypothesis
    - Links target genes to NeuroWiki
    • Modified /exchange page (api.py:183-351)
    - Added checkbox column in table header with "Select All" functionality
    - Added checkbox to each hypothesis row
    - Added "Compare Selected" button with counter
    - JavaScript functions for selection management and navigation
    • Tested successfully:
    - curl http://localhost:8001/compare?ids=h-019ad538,h-044ee057 → 200 OK
    - curl http://localhost:8001/exchange → 200 OK with checkboxes
    - All features working as expected
    • Ready to commit and push

    Sibling Tasks in Quest (Exchange) ↗