feat(frontend): Integrate WebSocket for real-time indexing progress#28
Merged
DevanshuNEU merged 3 commits intoDec 5, 2025
Merged
Conversation
…deIntel#17) - Connect to /ws/index/{repo_id} with JWT token - Show real-time files processed, functions indexed, progress % - Graceful fallback to HTTP if WebSocket fails - Add WS_URL helper in config/api.ts Closes OpenCodeIntel#17
- Backend: Use SUPABASE_SERVICE_ROLE_KEY to bypass RLS - Frontend: Clear progress bar after indexing complete - Frontend: Reset state on error
- Wrap all websocket.send_json in try/except - Prevent crash when client disconnects during indexing - Continue indexing even if client disconnects
|
@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Frontend currently fakes indexing progress with
setInterval. Backend has a working WebSocket endpoint (/ws/index/{repo_id}) that sends real progress updates, but frontend doesn't use it.Solution
Connect to WebSocket with JWT token for actual real-time progress instead of simulated progress bar.
Changes Made
WS_URLhelper infrontend/src/config/api.tsRepoOverview.tsxto connect to WebSocketFiles Modified
Frontend:
frontend/src/config/api.tsfrontend/src/components/RepoOverview.tsxBackend:
backend/main.py(WebSocket error handling)backend/services/supabase_service.py(service role key)Testing
Closes #17