feat(frontend): WebSocket real-time indexing progress (#115)#151
Merged
DevanshuNEU merged 2 commits intoJan 6, 2026
Merged
Conversation
) 🚀 Features: - useIndexingWebSocket hook with auto-reconnect & polling fallback - Streaming file list - shows files appearing in real-time - Enhanced IndexingProgress with phase indicators & glow effects - IndexingComplete celebration screen with confetti & animated stats - Integrated WebSocket into HeroPlayground component 📁 Files: - NEW: hooks/useIndexingWebSocket.ts (WebSocket state machine) - NEW: components/playground/IndexingComplete.tsx (celebration UI) - UPDATED: components/playground/IndexingProgress.tsx (streaming file list) - UPDATED: components/playground/HeroPlayground.tsx (WS integration) - UPDATED: components/playground/index.ts (exports) 🎨 UX Highlights: - Files stream in real-time as they're processed - Phase indicator: Clone → Index → Done - Glowing progress bar - Confetti on completion - Animated stat counters Connects to backend WebSocket endpoint from PR OpenCodeIntel#150
|
@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. |
Root cause: Callbacks and options object recreated on every render caused useEffect dependencies to constantly change. Fixes: - Use refs for onCompleted/onError callbacks (stable across renders) - Memoize wsOptions with useMemo in HeroPlayground - Destructure wsState immediately to get stable references - Fixed dependency arrays to use primitive values not objects HeroPlayground changes: - useCallback for handleWsCompleted, handleWsError - useMemo for wsOptions object - Destructure hook result instead of using wsState object in deps useIndexingWebSocket changes: - Store callbacks in refs (onCompletedRef, onErrorRef) - Update refs synchronously (no useEffect needed) - Cleaner, more compact implementation
|
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.
Frontend WebSocket Implementation for Real-Time Indexing Progress
Closes #115
What This PR Does
Implements the frontend WebSocket integration for real-time indexing progress, building on the backend WebSocket endpoint from PR #150.
Key Features
1.
useIndexingWebSocketHook2. Enhanced
IndexingProgressComponent3.
IndexingCompleteCelebration Screen4. Updated
HeroPlaygroundFiles Changed
hooks/useIndexingWebSocket.tscomponents/playground/IndexingComplete.tsxcomponents/playground/IndexingProgress.tsxcomponents/playground/HeroPlayground.tsxcomponents/playground/index.tsThe "Holy Shit" Moment
The streaming file list was identified in our team meeting as the key differentiator vs polling:
Polling: Updates chunk every 2s (feels slow)
WebSocket: Files stream in real-time (feels ALIVE)
Testing
npm run build)Event Flow
Dependencies
Requires backend PR #150 to be merged first for full E2E functionality.