Skip to content

Conversation

@GunaPalanivel
Copy link
Contributor

Implements real-time WebSocket streaming for chatbot responses with automatic HTTP fallback.

What's Changed

  • Token-by-token streaming for smoother user experience
  • Automatic fallback to HTTP when WebSocket isn't available
  • Connection reuse within sessions for better performance
  • Comprehensive test coverage (18/18 tests passing)

How It Works

The UI now tries WebSocket first for streaming responses. If that fails (timeout, disconnection, or unsupported), it automatically falls back to the existing HTTP endpoint. No configuration needed - it just works.

Testing

All existing tests still pass, plus 8 new tests covering:

  • WebSocket streaming flow
  • HTTP fallback scenarios
  • Connection reuse
  • Error handling

Backward Compatibility

✅ Fully backward compatible - HTTP REST endpoints unchanged

Closes #82
Related to #29

Implements real-time token streaming with automatic HTTP fallback when WebSocket fails. Connection is reused within the same session for better performance.

- Stream responses token-by-token for better UX
- Fallback to HTTP if WebSocket unavailable
- Reuse connections per session
- Add comprehensive test coverage

Closes jenkinsci#82
@GunaPalanivel GunaPalanivel requested a review from a team as a code owner January 3, 2026 05:55
@berviantoleo berviantoleo added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jan 3, 2026
@cnu1812 cnu1812 requested a review from berviantoleo January 5, 2026 06:40
@berviantoleo berviantoleo requested a review from cnu1812 January 8, 2026 00:53
@GunaPalanivel GunaPalanivel force-pushed the feature/websocket-ui-integration branch from c996edd to 1682182 Compare January 27, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Integrate with Websocket

3 participants