Skip to content

fix(terminal-streamer): TRP live-shadow sizing + large-line panic#1816

Draft
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 1 commit into
masterfrom
fix/trp-shadow-streaming
Draft

fix(terminal-streamer): TRP live-shadow sizing + large-line panic#1816
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 1 commit into
masterfrom
fix/trp-shadow-streaming

Conversation

@irvingoujAtDevolution
Copy link
Copy Markdown
Contributor

Two TRP-only shadow-streaming fixes (cast path unaffected):

  • Sizing: emit a standard asciicast {width, height} header with the correct axis. The decoder read columns from the wrong half of the size-change payload and emitted non-standard row/col, so clients sized the terminal transposed.
  • Panic: AsyncReadChannel::poll_read copied a whole decoded line into the caller's ReadBuf unchecked, panicking when a line exceeded it (e.g. an htop full-screen redraw > 8 KiB). Now copies what fits and buffers the rest across reads.

… panic

Two TRP-only shadow-streaming bugs:

1. Size header was emitted with width/height swapped and non-standard row/col keys (read columns from bytes[2..4] instead of [0..2]). Read columns from [0..2], rows from [2..4], and emit a standard asciicast v2 {width,height} header so clients size the terminal correctly.

2. AsyncReadChannel::poll_read copied an entire decoded line into the caller's ReadBuf without bounds, panicking when a line exceeded the buffer (e.g. a full-screen htop redraw > 8 KiB). Copy only what fits and buffer the remainder across reads.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant