Skip to content

fix(theme): give migrated V1 dialogs an opaque background - #60016

Merged
jlongster merged 1 commit into
devfrom
fix-transparent-dialog-bg
Oct 29, 2026
Merged

jlongster merged 1 commit into
devfrom
fix-transparent-dialog-bg

Conversation

@jlongster

@jlongster jlongster commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Migrated V1 themes use backgroundPanel as the dialog background. In themes with a transparent or translucent panel, like lucent-orng (#2a1a1599 / #fff5f099), dialogs had no background of their own. The session underneath showed through, and dialog rows overlapped the text behind them.

When backgroundPanel isn't fully opaque, migrateV1 and migrateV1NewDesigns now give @dialog an opaque background, including the new designs light dialog override. It uses the first visible surface color (panel, menu, element, then page) at full opacity, and falls back to black or white based on the text color. Themes with an opaque panel are unchanged. Of the built-in themes, only lucent-orng changes.

How did you verify your code works?

  • Added tests in packages/tui/test/theme/v2/v1-migrate.test.ts for both migrations: lucent-orng, a theme with every surface transparent, and opaque themes keeping their existing dialog tokens.
  • Checked that migrateV1 and migrateV1NewDesigns output for every other built-in theme matches dev.
  • Ran bun test for the theme package and the TUI theme/mini suites, plus tsc.
  • Screenshot comparison of 9 dialogs across 4 themes per mode, flag on and off, on dev and on this branch (see below).

Screenshots / recordings

lucent-orng in OpenCode Drive. Light mode is on a white terminal, since the page is transparent. In each pair, dev is on the left and this PR is on the right. The rows are the session picker, command palette, model picker and theme picker.

Light, new designs off

light, flag off

Light, new designs on

light, flag on

Dark, new designs off

dark, flag off

Other dialogs with this PR (agents, help, MCP servers, status, settings; light with the flag off on the left, dark with it on on the right)

other dialogs

Other themes: I took the same 10 screens (session plus 9 dialogs) on dev and on this branch for github, catppuccin and opencode (light) and tokyonight, gruvbox and opencode (dark), with the flag on and off. That's 240 screenshots in all, compared pixel by pixel. The only differences were run-to-run noise: the elapsed-time labels, the status-bar indicator, and the order of the lower command palette sections.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #59628

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I reproduced the problem with OpenCode Drive by opening the session picker under lucent-orng (dark). On dev the dialog has no background and the session shows through. With this change it gets an opaque #2a1a15 panel. Screenshots are below. The theme and TUI theme tests pass. tsc is clean for packages/theme, and packages/tui has the same errors as on dev.

Public API: unchanged. The only change is in how V1 themes are migrated internally; no theme file format or config keys change.

One small note: in lucent-orng it's backgroundPanel that is fully transparent. The #2a1a1599 value is backgroundMenu, and that's the color the fallback uses, which matches what the test asserts. I have no blocking concerns.

Related: #59628

Before

After

@jlongster
jlongster force-pushed the fix-transparent-dialog-bg branch from 878a8e2 to cd4a2f2 Compare October 28, 2026 21:07

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit applies the opaque-dialog fallback to migrateV1NewDesigns as well, including the light-mode @dialog override. I checked it in OpenCode Drive with lucent-orng (dark) and the new designs experiment on. On dev the session picker has no background, and with this change it gets an opaque panel. Screenshots are below. The theme tests pass, tsc is clean for packages/theme, and packages/tui has the same errors as on dev.

Public API: unchanged. The new exports from v1-migrate.ts are only used inside the package.

I have no new concerns.

Before

After

@jlongster
jlongster merged commit f43563b into dev Oct 29, 2026
24 checks passed
@jlongster
jlongster deleted the fix-transparent-dialog-bg branch October 29, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant