Skip to content

feat: add SSE streaming endpoint and progressive frontend rendering (……closes #128)#199

Open
antharya05 wants to merge 6 commits into
imDarshanGK:mainfrom
antharya05:feat/sse-streaming-issue-128
Open

feat: add SSE streaming endpoint and progressive frontend rendering (……closes #128)#199
antharya05 wants to merge 6 commits into
imDarshanGK:mainfrom
antharya05:feat/sse-streaming-issue-128

Conversation

@antharya05
Copy link
Copy Markdown

@antharya05 antharya05 commented May 21, 2026

Summary

  • Added POST /analyze/stream endpoint using FastAPI StreamingResponse with SSE
  • Frontend progressively renders each section as chunks arrive (explain → debug → suggest)
  • Added 9 new streaming tests (44 total, all passing)

Changes

  • backend/app/routers/analyze.py — new /analyze/stream endpoint + async generator _stream_analysis()
  • backend/tests/test_endpoints.py — 9 new SSE tests + _parse_sse_events() helper
  • frontend/index.htmldoAnalyzeStream() for progressive rendering via fetch ReadableStream

How it works

  • Backend yields 4 SSE chunks: explanation → debugging → suggestions → done
  • Frontend reads chunks as they arrive and renders each section immediately
  • showShimmers() fills all panes first, each shimmer replaced as its chunk arrives

Closes #128

@antharya05 antharya05 requested a review from imDarshanGK as a code owner May 21, 2026 08:28
@antharya05 antharya05 changed the title feat: add SSE streaming endpoint and progressive frontend rendering (… feat: add SSE streaming endpoint and progressive frontend rendering (……closes #128) May 21, 2026
@imDarshanGK
Copy link
Copy Markdown
Owner

imDarshanGK commented May 21, 2026

@antharya05 resolve the conflicts, and include screenshots or implementation proof so the changes can be verified easily.

Copy link
Copy Markdown
Author

@antharya05 antharya05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved conflict

@antharya05
Copy link
Copy Markdown
Author

antharya05 commented May 21, 2026

Fixes issue no : #128
Resolved all merge conflicts and synced the branch with the latest main.

Implemented real-time SSE streaming analysis using FastAPI StreamingResponse with progressive frontend rendering.

Implemented Features

  • Added /analyze/stream SSE endpoint

  • Streamed sections progressively:

    • explanation
    • debugging
    • suggestions
    • done
  • Added frontend progressive rendering using ReadableStream

  • Added per-section shimmer loading states

  • Added SSE parsing helper and comprehensive streaming tests

Validation

  • All tests are passing successfully with the latest main branch
  • Total passing tests: 53 passed

Implementation Proof

Attached:
Screenshot 2026-05-21 183824

  • Passing pytest screenshot

This PR now fully supports real-time incremental analysis instead of waiting for the complete response.

@imDarshanGK
Copy link
Copy Markdown
Owner

@antharya05 The PR still shows merge conflicts in backend/app/routers/analyze.py. Please resolve the remaining conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add real-time streaming analysis using Server-Sent Events

2 participants