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

Skip to content

Conversation

@terwey
Copy link
Collaborator

@terwey terwey commented Oct 30, 2025

Summary

  • add tracking for the initial orders fetch so SSE updates can cancel it
  • abort the in-flight request when a stream event arrives to prevent stale data from replacing live updates

Testing

  • npx eslint .

https://chatgpt.com/codex/tasks/task_e_69039948e1a48326b5fd9eb13e38ff55

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".

Comment on lines 193 to 196
if (initialFetchPendingRef.current && !abortController.signal.aborted) {
initialFetchPendingRef.current = false;
abortController.abort();
}

Choose a reason for hiding this comment

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

P1 Badge Avoid aborting initial orders fetch when metadata events arrive

When the SSE handler sees any event it sets initialFetchPendingRef and immediately aborts the in-flight fetchOrders. For events that include metadata the handler calls only refreshOrdersForMetadata(metadata) and never triggers a full fetchOrders run. If such a metadata event arrives before the initial request finishes—a common case when the stream emits updates immediately—the full list of orders is never loaded and the table shows only the updated order(s). Consider letting the original fetch complete or triggering a full reload after aborting so the base dataset is populated.

Useful? React with 👍 / 👎.

@terwey
Copy link
Collaborator Author

terwey commented Oct 30, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ 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 terwey merged commit a5d118a into main Oct 30, 2025
2 checks passed
@terwey terwey deleted the codex/investigate-orderstable-data-updates-via-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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants