Skip to content

[bug] macOS terminal rendering can corrupt and ghost into chat until fullscreen toggle #3504

Closed as duplicate

Description

@dorukardahan

Describe the bug

Summary

On macOS, terminal rendering can become corrupted after normal pane switching or window state changes. I see garbled glyphs, stale terminal lines drawn in the wrong place, and sometimes background terminal content ghosting into the chat view.

This is not specific to one CLI. I reproduced it with Claude CLI, Codex CLI, OpenCode, and also inside Superset own conversation UI when a background terminal was running.

Actual behavior

  • Text in terminal panes becomes unreadable with wrong glyph shapes.
  • Sometimes parts of a hidden or background terminal are painted over the chat area.
  • Toggling fullscreen fixes it right away, but the problem comes back later.
  • The problem looks like a renderer or compositor issue, not a shell encoding issue.

Expected behavior

  • Hidden or background terminal panes should never paint outside their own pane.
  • Switching tabs, switching panes, or resizing the window should not corrupt terminal text.
  • Fullscreen should not be needed as a recovery step.

Repro notes

Environment I checked locally:

  • Superset.app 1.5.5
  • Electron 40.8.5
  • macOS
  • xterm 6.1.0-beta.195
  • @xterm/addon-webgl 0.20.0-beta.194
  • @xterm/addon-ligatures 0.11.0-beta.195

What i usually do:

  1. Open a workspace with one or more terminal panes.
  2. Run a long lived CLI session like Claude CLI, Codex CLI, or OpenCode.
  3. Switch between terminal and chat panes, or use the app in a non fullscreen window for a while.
  4. At some point the terminal text becomes garbled, or a background terminal line is drawn over the chat view.
  5. If i toggle fullscreen on and off, the rendering becomes normal again.

Related findings

  • I could not find an open issue for this exact symptom.
  • #1873 looks related because it also mentions terminal reattach problems and blank space after switching.
  • xterm has an open issue here: xtermjs/xterm.js#3303 about WebGL and ligature rendering artifacts. One comment there says manual clearTextureAtlas() makes the issue go away.

I also checked the current source:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts always tries to load LigaturesAddon and then WebglAddon.
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/v1-terminal-cache.ts reattaches the cached wrapper and calls xterm.refresh(...), but it does not clear or recreate the WebGL texture atlas on reattach or resize.
  • apps/desktop/src/lib/electron-app/factories/app/setup.ts already has a macOS specific workaround with this comment: occluded window throttling can corrupt GPU compositor layers.

Proposed fix

I think this is likely in the overlap between Superset terminal lifecycle and xterm WebGL rendering on macOS.

Possible directions:

  1. Clear the WebGL texture atlas on reattach and resize, then force refresh.
  2. Recreate or dispose the WebGL addon when a cached terminal is detached and attached again.
  3. Add a safe DOM renderer fallback or a setting to disable WebGL and maybe ligatures on macOS.

If useful, i can try a follow up patch after maintainers confirm which direction they want.

Activity

  1. added a commit that references this issue on Apr 16, 2026
    09b38ac
  2. dorukardahan commented on Apr 16, 2026

    @dorukardahan
    Author

    i am closing the linked draft PR #3506 to avoid overlap with #3322, which is already working on terminal repaint recovery after focus and visibility changes.

    my repro in this issue is still useful because it also shows terminal content ghosting into the chat view, and fullscreen fixes it right away on my mac.

    if #3322 does not fully fix this case, i can open a narrower follow up PR later.

  3. Kitenite commented on May 6, 2026

    @Kitenite
    Member

    Related reports (cross-referenced during issue triage — same area, may or may not share a root cause):

  4. Kitenite commented on Jul 11, 2026

    @Kitenite
    Member

    Closing as a duplicate of #5605, the consolidated tracker for stale terminal-rendering issues from the July 2026 stale-issue sweep (no activity since 2026-06-01). If this still applies on a current build, comment on #5605 and we'll reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions