Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@terwey
Copy link
Collaborator

@terwey terwey commented Oct 29, 2025

fix(webui): restore live order updates by listening to named SSE events
The backend emits /sse/orders frames with explicit event names (three_commas_event, hyperliquid_submission, etc.), but our React consumers were using EventSource.onmessage, which only fires for the default message event. As a result, live updates never reached the UI.

Introduce utils/orderStream.attachOrderStreamHandlers to register handlers for all order-stream event types and return a single detach function. Migrate the following to use the shared helper and ensure listeners are removed during cleanup before closing the stream:

  • BotsDealsExplorer
  • OrdersTable/filters/BotsFilter
  • OrdersTable/filters/DealsFilter
  • OrdersTable/hooks/useOrdersData
  • StatsCards

Result: live updates for orders, bots, deals, and statistics now flow to the browser as expected.

…ents**

The backend emits `/sse/orders` frames with explicit event names (`three_commas_event`, `hyperliquid_submission`, etc.), but our React consumers were using `EventSource.onmessage`, which only fires for the default `message` event. As a result, live updates never reached the UI.

Introduce `utils/orderStream.attachOrderStreamHandlers` to register handlers for all order-stream event types and return a single detach function. Migrate the following to use the shared helper and ensure listeners are removed during cleanup before closing the stream:

* `BotsDealsExplorer`
* `OrdersTable/filters/BotsFilter`
* `OrdersTable/filters/DealsFilter`
* `OrdersTable/hooks/useOrdersData`
* `StatsCards`

Result: live updates for orders, bots, deals, and statistics now flow to the browser as expected.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@terwey
Copy link
Collaborator Author

terwey commented Oct 29, 2025

@codex any other reviews?

@terwey terwey merged commit dee5f23 into main Oct 29, 2025
2 checks passed
@terwey terwey deleted the fix/webui_sse branch October 31, 2025 10:49
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.

2 participants