Skip to content

Conversation

nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Aug 15, 2025

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with Server-Sent Events (SSE) in the Typesync service where browsers don't receive the initial message. The fix adds a workaround that sends an empty message first, ensuring the actual first message is delivered to the browser.

  • Adds an empty SSE message as a workaround for browser SSE message delivery issues
  • Updates the changeset to document the schema loading fix

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/hypergraph/src/cli/services/Typesync.ts Implements SSE workaround by prepending an empty message to the stream
.changeset/hungry-monkeys-shine.md Documents the fix for initial schema loading in typesync

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

const sseData = `data: ${jsonData}\n\n`;
return encoder.encode(sseData);
}),
),
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

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

The hardcoded empty message should be extracted to a constant or generated using the same logic as the actual messages to maintain consistency and avoid magic strings.

Copilot uses AI. Check for mistakes.

@nikgraf nikgraf merged commit 8ab0100 into main Aug 15, 2025
6 checks passed
@nikgraf nikgraf deleted the ng/fix-initial-typesync-sse branch August 15, 2025 09:01
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.

1 participant