Skip to content

Bug: ProcessTerminal canvas stacks stale content because allowTransparency is hardcoded on ghostty-web@0.4.0 #297

@Crunchyman-ralph

Description

@Crunchyman-ralph

Bug

ProcessTerminal (sdks/react/src/ProcessTerminal.tsx:150) hardcodes allowTransparency: true when constructing ghostty.Terminal:

terminal = new ghostty.Terminal({
  allowTransparency: true,
  ...
});

On the currently-pinned ghostty-web@0.4.0, transparent backgrounds hit a canvas-rendering bug where fillRect isn't preceded by clearRect, so cells accumulate stale content as the terminal redraws (coder/ghostty-web#116). In practice this looks like:

  • Previous prompts / output remaining visible after scroll or redraw, "piling up" on the canvas
  • Stale pixels from prior renders bleeding into the active render

The ghostty-web fix is merged on main (coder/ghostty-web#116, Feb 2026) but hasn't been released to npm — the last publish is still v0.4.0 from Dec 2025, and coder/ghostty-web#137 tracks the release request with no ETA.

Expected

Consumers should be able to opt out of transparency (allowTransparency: false) as a pragmatic workaround until ghostty-web v0.5.0 lands. Most application-embedded terminals with solid dark backgrounds don't need transparency anyway.

Proposal

Expose allowTransparency as an optional prop on ProcessTerminalProps, passed through to the Terminal constructor. Default true preserves current behavior.

<ProcessTerminal
  client={client}
  processId={procId}
  allowTransparency={false}
/>

Workaround (today)

Consumers have to fork ProcessTerminal or shadow ghostty-web with a git-installed build — both are heavy for one boolean.

Environment

  • @sandbox-agent/react@0.4.2
  • ghostty-web@0.4.0 (transitive)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions