Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Dec 6, 2025

Summary

The onChat handler was pushing a caught-up event after replayHistory, but replayHistory already sends caught-up at the end of emitHistoricalEvents. This resulted in two caught-up events being sent to the client.

Changes

  • Removed the duplicate push({ type: "caught-up" }) from the router since session.replayHistory() already sends it

Testing

  • Existing integration tests pass (resumeStream.test.ts)
  • WorkspaceStore.test.ts passes
  • Typecheck passes

Generated with mux

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

The onChat handler was pushing a caught-up event after replayHistory,
but replayHistory already sends caught-up at the end of emitHistoricalEvents.
This resulted in two caught-up events being sent to the client.

Removed the duplicate push to clean up the code.
@ammar-agent ammar-agent force-pushed the fix-maximum-update-depth-warning branch from 5f3574b to 2d05306 Compare December 6, 2025 21:57
@ammar-agent ammar-agent changed the title 🤖 fix: prevent infinite render loop in KebabMenu dropdown positioning 🤖 fix: remove duplicate caught-up event in onChat subscription Dec 6, 2025
@ammario ammario merged commit b1351e0 into main Dec 7, 2025
19 checks passed
@ammario ammario deleted the fix-maximum-update-depth-warning branch December 7, 2025 01:37
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