Skip to content

[Good First Issue] Implement WebSocket real-time run status updates #11

@Oshgig

Description

@Oshgig

Overview

The dashboard currently polls for run status. We need a WebSocket endpoint so the frontend can receive real-time push updates when a prediction job completes or fails.

Scope

  • Implement /ws/runs/{run_id} WebSocket endpoint in FastAPI
  • Emit status updates: runningcompleted / failed
  • Include result payload (or error message) in the final completed/failed event
  • Handle client disconnections gracefully
  • Update frontend useRunPolling hook to prefer WebSocket, falling back to polling
  • Update NewAnalysis and RunHistory pages to listen for WebSocket events

Acceptance Criteria

  • Opening a WebSocket connection to /ws/runs/{run_id} receives status updates in real time
  • Frontend replaces polling with WebSocket when supported
  • Connection gracefully degrades to polling if WebSocket is unavailable
  • All changes covered by at least basic tests

Resources

Difficulty: Intermediate
Labels: help wanted, backend, frontend, real-time

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions