-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
When regenerating projections for large ontologies (≥500 concepts), the API queues a background job and returns immediately. The web client has no indication that it should poll for completion - users must manually refresh the page to see the new projection.
Current Behavior
- User clicks regenerate on large ontology
- API returns
{"status": "queued", "job_id": "..."} - Job completes in 2-5 seconds
- Web client shows stale/empty state
- User must manually refresh to see results
Desired Behavior
- User clicks regenerate
- API returns job_id with queued status
- Web client shows "Computing projection..." indicator
- Client polls job status or projection endpoint
- When complete, automatically loads new projection
Implementation Options
- Polling: Client polls
/projection/{ontology}every 2s until data arrives - Job status polling: Client polls
/jobs/{job_id}until completed, then fetches projection - WebSocket/SSE: Push notification when job completes (more complex)
Option 1 (simple polling) is probably sufficient given projections complete in <10s.
Acceptance Criteria
- Web client detects when projection is queued vs computed
- Shows loading indicator during computation
- Automatically refreshes when projection becomes available
- Stops polling after timeout (30s) with error message
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels