claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Docked plugin panes render opaque background, ignoring terminal transparency

Open jtr697 opened this issue 1 month ago • 4 comments

Bug Description Title: Docked plugin panes paint an opaque background; no way to let a translucent terminal background show through

Summary In fullscreen mode, a docked plugin Pane is drawn with an opaque background. The main transcript is not. With a translucent terminal (for example Ghostty with background-opacity = 0.6), the chat area shows the terminal's background but the dock is a solid block.

Environment

  • Claude Code 2.1.x, fullscreen, terminal at least 110 columns wide so the pane docks
  • macOS, Ghostty with background-opacity = 0.6
  • Plugin: glowup 0.9.0 (MIT), plus a bare test pane (below)

Repro

  1. Set a translucent terminal background.
  2. Make a minimal plugin whose ui.render hook for { component: 'Pane' } returns hello. It sets no colours and no backgroundColor.
  3. Open the pane with $.ui.open({ id, title }).
  4. The dock is opaque. The transcript beside it is translucent.

What I ruled out

  • The plugin sets no background. The test pane above has none.
  • /theme dark-ansi makes no difference.
  • Custom themes accept only solid colour values (#rrggbb, ansi: and similar). There is no alpha, and no "default" or "unset" value.
  • PaneOpenArgs and the Pane props have no background or opacity option.
  • I found no settings.json or fullscreen option for it in the docs.

Expected Some way to let docked panes use the terminal's default background, any of:

  • a PaneOpenArgs option (for example transparent: true)
  • a theme colour value meaning "terminal default / unset" that the dock honours
  • a setting that leaves the dock's cells with an unset background, as the transcript does

Why it matters Users who run a translucent terminal get a mismatch: a see-through chat beside a solid sidebar. This affects any plugin that uses a docked pane, not just one plugin.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.292
  • Feedback ID: 65838b4c-7219-43ce-9118-941567925ab4

jtr697 avatar Oct 07 '26 01:10 jtr697

Same on macOS with Ghostty 1.3.1 (background-opacity 0.97, blur 20) and Claude Code 2.1.296. Two data points that may help: in a custom theme, setting composerSidebarBackground to "", "transparent", "none" or "ansi:default", or removing it, all fall back to ANSI bright black (SGR 100) instead of skipping the fill, which turned the pane blue under a Dracula palette. Ghostty's background-opacity-cells = true does not make the painted pane translucent either, so matching the exact terminal colour is the closest workaround today.

stefmf avatar Oct 12 '26 16:10 stefmf

Still present in 2.1.309 (native binary, tui: "fullscreen", theme dark, macOS Ghostty/iTerm2 and Linux over SSH). A few more data points that locate it:

  • It is the dock wrapper, not the pane. FullscreenLayout wraps the dock in a Box with backgroundColor: "composerSidebarBackground" (width, flexShrink: 0, flexDirection: "column", overflow: "hidden"); its content is PaneDock / PaneHost, so every plugin pane inherits it. The IDE sidebar and the absolute right-hand strip use the same key. In dark and dark-daltonized it is rgb(38, 38, 38).
  • Raw output with a pane that draws a single line: every dock row starts with ESC[48;2;38;38;38m before the rule, then spaces to the dock width:
    ESC[141G ESC[48;2;38;38;38m ESC[2m│ ESC[22m <57 spaces> ✕
    
  • A Raster cannot escape it either. Cells set to 0x01000000 ("the terminal's default", per claude-code.d.ts) are drawn on 48;2;38;38;38 inside a docked pane; ESC[49m only comes after the last cell. The official code-modernization plugin (anthropics/claude-plugins-official@c8874f5), which sets no background anywhere and draws its map as such a Raster, shows the same slab once docked.
  • Theme validator: overrides accept rgb(r,g,b), #rgb, #rrggbb, ansi256(n) and ansi:<16 names> only, consistent with what @stefmf saw.

Any one of these would solve it:

  1. accept "default" (or "none") for composerSidebarBackground in custom themes, meaning no background SGR for the dock (the renderer already emits none when a Box has no backgroundColor);
  2. a PaneOpenArgs option such as surface: "transparent" | "panel", default "panel";
  3. a setting that disables the dock fill.

Workarounds we tried: a custom theme with the closest solid colour (cannot match a gradient or transparency), tui: "default" (panes go inline without fill, but the dock is lost), rendering the view in the above-prompt band (no fill, but no side column).

kodflow avatar Oct 23 '26 14:10 kodflow

Another case where "match the exact terminal colour" does not work as a workaround, with an opaque terminal: the same Claude Code config runs in several terminal hosts whose backgrounds differ.

  • Claude Code 2.1.308, macOS, tui: "fullscreen", a custom theme (Catppuccin Mocha) whose composerSidebarBackground is #1e1e2e, matching Ghostty's background.
  • Run inside herdr (background #17191d), the transcript shows herdr's background, but the docked pane, its close-mark row and its blank last row are filled with #1e1e2e, so the dock reads as a lighter block beside the transcript.

theme holds one value, so one concrete colour can match only one terminal. The workaround left is a copy of the theme per terminal, picked per launch with --settings '{"theme": ...}'.

The host already knows the real background: 2.1.308 sends an OSC 11 query (systemTheme: OSC 11 response=... in the debug log) to choose dark or light for auto. Any option from the original post would fix this case as well; another would be a theme value that tells the dock to fill with the colour OSC 11 reported.

lkangd avatar Nov 03 '26 10:11 lkangd

This was fixed in Claude Code 2.1.311, so we're closing this issue. If you disagree, let us know here and we can re-open it. Thanks for reporting!

bpasero-ant avatar Nov 29 '26 18:11 bpasero-ant