Skip to content

fix(api): expose Flusher through logging middleware so SSE /events st…#4

Merged
arpan-mondal merged 1 commit into
mainfrom
arpan-mondal/fix-sse-flusher
May 12, 2026
Merged

fix(api): expose Flusher through logging middleware so SSE /events st…#4
arpan-mondal merged 1 commit into
mainfrom
arpan-mondal/fix-sse-flusher

Conversation

@arpan-mondal
Copy link
Copy Markdown
Contributor

…reams

The logging middleware wraps http.ResponseWriter in a struct that did not implement http.Flusher, so the type assertion in the /api/v1/events handler always failed with 500 "streaming not supported". The same pattern silently prevented per-chunk flushing in the exec-stream NDJSON and worker RPC paths (chunks were coalesced until handler return).

Adds Flush() (forwards to the embedded writer) and Unwrap() (so http.ResponseController can traverse the wrapper). Includes a regression test that verifies both the type assertion and http.ResponseController.Flush work through the wrapped writer.

Also clarifies the /files/move row in the README so the body schema (old_path / new_path) is visible without chasing the rest-api.md link.

…reams

The logging middleware wraps http.ResponseWriter in a struct that did not
implement http.Flusher, so the type assertion in the /api/v1/events handler
always failed with 500 "streaming not supported". The same pattern silently
prevented per-chunk flushing in the exec-stream NDJSON and worker RPC paths
(chunks were coalesced until handler return).

Adds Flush() (forwards to the embedded writer) and Unwrap() (so
http.ResponseController can traverse the wrapper). Includes a regression
test that verifies both the type assertion and http.ResponseController.Flush
work through the wrapped writer.

Also clarifies the /files/move row in the README so the body schema
(old_path / new_path) is visible without chasing the rest-api.md link.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 12, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
stacy 🟢 Ready View Preview May 12, 2026, 12:28 AM

@arpan-mondal arpan-mondal merged commit ffbb512 into main May 12, 2026
13 checks passed
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