Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: turbo-stream v3 #12945

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open

feat: turbo-stream v3 #12945

wants to merge 15 commits into from

Conversation

jacob-ebey
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Feb 3, 2025

🦋 Changeset detected

Latest commit: 66d5af8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jacob-ebey jacob-ebey marked this pull request as ready for review February 4, 2025 17:39
Copy link
Contributor

@brophdawg11 brophdawg11 left a comment

Choose a reason for hiding this comment

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

Did a quick code review - can pull it down and do some app testing too later today or tomorrow if you'd like me too also

@@ -0,0 +1,6 @@
---
"integration": minor
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think we need entries for this

Suggested change
"integration": minor

@@ -230,6 +230,10 @@ export const createRequestHandler: CreateRequestHandlerFunction = (
);
}

if (!response) {
return new Response("Unknown Server Error", { status: 500 });
Copy link
Contributor

Choose a reason for hiding this comment

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

We can probably run this through the same utility we use elsewhere

Suggested change
return new Response("Unknown Server Error", { status: 500 });
let error = new Error('Unhandled request')
return returnLastResortErrorResponse(error, serverMode);

@@ -327,44 +327,22 @@ export function encodeViaTurboStream(

return encode(data, {
signal: controller.signal,
redactErrors:
serverMode === ServerMode.Development ? false : "Unexpected Server Error",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! This is a great new feature for turbo-stream 👍

@ngbrown
Copy link
Contributor

ngbrown commented Feb 12, 2025

Is this backwards compatible with turbo-stream v2? i.e. if the server has updated to v3 but the client hasn't reloaded the window and is still on v2 and makes a data request, what will happen?

@jacob-ebey
Copy link
Member Author

Is this backwards compatible with turbo-stream v2? i.e. if the server has updated to v3 but the client hasn't reloaded the window and is still on v2 and makes a data request, what will happen?

It is not a BW compat data format.

@jacob-ebey jacob-ebey closed this Feb 12, 2025
@jacob-ebey jacob-ebey reopened this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants