Repository navigation
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
There was a problem hiding this comment.
This fixes the Firefox second-tab hang. I reproduced it with two Playwright Firefox tabs against opencode serve run from source, using the Promise client from each checkout. On the base, the second tab's event.subscribe() never got an event while the first stream was open. With this change it gets server.connected right away. The generator template and the committed client are in sync (check:generated shows no diff), and the changed packages pass their tests and type checks. The only client test failures, 2 of them, also fail on the base.
Public API impact, backwards compatible:
GET /api/eventresponse header:Cache-Control: no-cache, no-transform→no-store, no-transform.- The generated Promise client's SSE methods now send
cache: "no-store". Other requests are unchanged.
No existing callers need to change.
No blocking concerns.
1 task done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #55369
Type of change
What does this PR do?
Firefox can block a second tab's event stream while the first stream holds the same HTTP cache entry.
Fetch SSE streams with
cache: "no-store"and returnCache-Control: no-store, no-transformfrom/api/event. Update the Promise client generator and regenerate the client. Ordinary requests retain their existing cache behavior.How did you verify your code works?
server.connectedwhile remaining open.bun run checkpassed.Screenshots / recordings
N/A — HTTP transport change.
Checklist
Added by the opencode bot (AI-generated).
Public API:
/api/eventnow sendsCache-Control: no-store, and Promise client SSE requests usecache: "no-store"(backwards compatible)