Repository navigation
Conversation
… clusters A TermDOM page run as an embed's program, as a Parkour tab is, asked its terminal for things the embed did not answer, and wrote things it dropped: OSC 52 was dropped, so a copy in the program went nowhere. The text now goes to the clipboard of the page's terminal, and a program that asks for the clipboard hears what that terminal answers. An OSC 52 may be a megabyte, where other OSCs stop at 4096 characters, and one longer is dropped whole. OSC 12 and 112 set and reset the cursor's color, which the terminal's cursor takes while the embed has focus, as it takes the shape. CSI 16 t and 14 t report a cell and the screen in pixels once the page's terminal has measured a cell. Before that the embed stays silent, and the program guesses as the page does. Mode 2027 is the program's to set and ask after. Under it characters join into grapheme clusters as wide as TermDOM measures them, so a page in the program need not probe for where a keycap or a Devanagari conjunct left the cursor. Without it they join as before. XTWINOPS 22 and 23 put the title away and bring it back. Co-Authored-By: Claude <noreply@anthropic.com>
The terminal's answer can land after the first frame, and on Deno the embed was asked for a cell's pixels before it had them. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVbRv5n8btiCtaRBtLrLig
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVbRv5n8btiCtaRBtLrLig
This branch has not been deployed
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.
A TermDOM page run as the program of an
<embed type="application/x-pty">, as each Parkour tab is, asks its terminal for things the embed's emulator did not answer. This closes those gaps, with no new option, export or event.What the program can now do:
The images and canvas guide gains a "What the program can do" section.
One decision for review. The clipboard passes straight through: a program in an embed can write the user's clipboard and read it. That is what a real terminal gives a program, and an embed only runs with
ptyEmbeds: "auto", but it removed OSC 52 from the test "nothing a program writes reaches the terminal but its screen". The alternative is an event on the embed that the page answers.Known gap: a string starting with U+0600 still measures differently from the page's own width.
Tests: new cases in
tests/vt.test.tsandtests/embed-pty.test.ts; the Ghostty and xterm.js oracle ignores the 2027 report. This touchessrc/internal/pty.tsandtests/embed-pty.test.ts, as #193 does, and merges with it cleanly.🤖 Generated with Claude Code
https://claude.ai/code/session_01GVbRv5n8btiCtaRBtLrLig