Skip to content

[web] Support legacy newline-delimited stream format in useStreamReader#1473

Open
karthikscale3 wants to merge 65 commits intomainfrom
karthik/fix-streams-tab
Open

[web] Support legacy newline-delimited stream format in useStreamReader#1473
karthikscale3 wants to merge 65 commits intomainfrom
karthik/fix-streams-tab

Conversation

@karthikscale3
Copy link
Collaborator

Summary

  • Streams written by @workflow/core ≤ 4.1.0-beta.55 use newline-delimited devalue (no binary framing), while the current SDK (≥ beta.56) uses 4-byte length-prefixed frames with a devl format prefix. The useStreamReader hook only handled the newer format, causing legacy streams to appear empty.
  • Added encoding auto-detection: the first 4 bytes are checked — if they form a plausible uint32 frame length, framed parsing is used; otherwise the hook falls back to splitting on newlines and parsing each line as JSON.

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
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