[Agora] Debate System Routes Missing

← All Specs

Goal

Fix broken debate links and navigation gaps in the SciDEX debate system. Two API endpoints generate links to /debate/{id} (singular) instead of /debates/{id} (plural), causing 404s for any debate link from the timeline or event feed. Additionally, "Debates" is missing from the top-bar dropdown navigation, making the debates page undiscoverable without opening the hamburger sidebar.

Acceptance Criteria

☑ Fix /debate/{id}/debates/{id} in timeline API (api.py line ~4036)
☑ Fix /debate/{id}/debates/{id} in event feed API (api.py line ~44386)
☑ Add "Debates" to top-bar "Main" dropdown navigation in api_shared/nav.py
☑ Verify /debates route returns 200
☑ Verify /debate/ (singular) is not referenced anywhere in the codebase

Approach

  • Grep for /debate/ (singular) references in api.py
  • Fix each occurrence to use /debates/ (plural) which is the actual registered route
  • Add Debates entry to the Main dropdown group in nav.py
  • Verify no other singular /debate/ references remain
  • Work Log

    2026-04-17 12:00 UTC — Slot 53

    • Investigated debate system: routes at /debates (listing) and /debates/{session_id} (detail) exist and work correctly
    • Found 2 broken link generators in api.py using /debate/{id} (singular) instead of /debates/{id} (plural)
    - Line 4036: timeline API endpoint
    - Line 44386: event feed endpoint
    • Found "Debates" missing from top-bar "Main" dropdown (only in hamburger sidebar)
    • Fixed both link bugs: /debate//debates/
    • Added "Debates" to Main dropdown group in nav.py

    Already Resolved — 2026-04-20 23:05:00Z

    Verified all acceptance criteria are satisfied on main as of commit 1c4234337:

    • No singular /debate/ string references remain in api.py (grep returned no matches for "/debate/")
    • /debates appears in nav.py Main dropdown (line 68): ("/debates", "Debates", "🗣")
    • /debates route returns HTTP 200 via curl check
    • Fix landed in commit 1c4234337 dated 2026-04-17 by SciDEX Agent
    Commit: 1c4234337d3a12363767f8e02d017adb7a985d95[Agora] api.py: fix broken /debate/ links → /debates/; nav.py: add Debates to top nav [task:cf4c46df-6fcb-4369-a411-98b64fec3adc]

    Tasks using this spec (1)
    Debate System Routes Missing
    done P70
    File: cf4c46df_6fcb_spec.md
    Modified: 2026-04-25 23:40
    Size: 2.3 KB