Conversation
The keystroke path wrapped a string in a Buffer only to unwrap it: the session's onKeys delivers a string and the dispatcher wants one, so the dispatcher now takes it as is. The clipboard's OSC 52 payload encodes through TextEncoder and a base64 table instead of Buffer.from. Node types remain only in terminalsession.ts, the transport quarantine. A browser bundle no longer needs a Buffer polyfill. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The data listener's chunk widens to string | Uint8Array | ArrayBuffer, which Buffer already satisfies, and the write encoding widens to plain string -- no name in the public surface resolves through @types/node. Byte chunks decode through one streaming TextDecoder, which also keeps a code point split across two chunks whole where per-chunk decoding tore it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Removes the three
Bufferuses intermdom.ts, found while building the browser playground (#34): they were the only reason a browser bundle needed aBufferpolyfill.Buffer.from()only for the dispatcher to call.toString("utf8")on it.onKeysdelivers a string;#dispatchGlobalKeyboardEventnow takes one.TextEncoderand a base64 table instead ofBuffer.from(...).toString("base64"). The encoder was differential-tested againstBuffer's output for empty, ASCII, CJK, emoji, and 1000-character inputs — byte-identical.Node types remain only in
terminalsession.ts, which is the transport quarantine.Full suite passes: node 1124, bun 1149 (includes the existing OSC 52 copy test in
mouse.test.ts).🤖 Generated with Claude Code
https://claude.ai/code/session_01C8sSHf9EvBZroVnsXJbJSD
Follow-up commit:
ProcessLike's chunk type widens tostring | Uint8Array | ArrayBuffer(Buffer already satisfies it) and the write encoding to plainstring, so no public name resolves through@types/node; byte chunks decode through one streamingTextDecoder, which also fixes a code point torn across two chunks.