Skip to content

Conversation

@hjjackyang
Copy link
Contributor

This PR fixed the ArrayBuffer handling (raised in #328) in the following way:

  • Aligning the override send signature with ws and taking in data parameter as BufferLike type.
  • Only triggering warnOnDriveMount if typeof data === 'string'.

As enhancements / refactoring, I also:

  1. Consolidated drive-mount-warning.ts into colab-proxy-web-socket.ts to improve testability of the new behavior(s).
  2. Additionally handled string data that is a malformed JSON message.

Demo of the fixed proxy WebSocket with drive.mount warning and upload widget:

Drive.mount.warning.after.fixing.ArrayBuffer.handling.webm

Copy link
Member

@kevineger kevineger left a comment

Choose a reason for hiding this comment

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

Thanks for circling back and fixing this 🙂

@hjjackyang hjjackyang merged commit 4eb3816 into main Jan 6, 2026
10 checks passed
@hjjackyang hjjackyang deleted the fix-custom-websocket branch January 6, 2026 01:17
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