Skip to content

feat(tui): make dialog and sidebar overlay backgrounds themeable#25103

Open
jnslmk wants to merge 2 commits intoanomalyco:devfrom
jnslmk:feat/themeable-dialog-overlay
Open

feat(tui): make dialog and sidebar overlay backgrounds themeable#25103
jnslmk wants to merge 2 commits intoanomalyco:devfrom
jnslmk:feat/themeable-dialog-overlay

Conversation

@jnslmk
Copy link
Copy Markdown

@jnslmk jnslmk commented Apr 30, 2026

Issue for this PR

Closes #25102

Type of change

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

What does this PR do?

Added backgroundDialogOverlay and backgroundSidebarOverlay theme properties to allow customization of overlay backgrounds instead of using hardcoded RGBA values.

Hardcoded overlay colors (150 and 70 alpha black) in dialog.tsx and session/index.tsx prevented theme customization. Users couldn't adjust overlay appearance through themes.

How did you verify your code works?

Screenshots / recordings

bg-translucent

Checklist

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

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 30, 2026
- Add backgroundDialogOverlay and backgroundSidebarOverlay theme properties
- Both default to semi-transparent black (150 and 70 alpha)
- backgroundDialogOverlay replaces hardcoded RGBA(0,0,0,150) in dialog.tsx
- backgroundSidebarOverlay replaces hardcoded RGBA(0,0,0,70) in session/index.tsx
- Add tests for default and custom overlay values
@jnslmk jnslmk force-pushed the feat/themeable-dialog-overlay branch from 58b571a to a89f75e Compare April 30, 2026 12:17
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicates Found

Based on the search results, there are several related PRs addressing similar overlay theming issues:

  1. PR fix(tui): use theme background color for dialog/sidebar overlays #23024 - "fix(tui): use theme background color for dialog/sidebar overlays"

  2. PR fix(opencode): use themed TUI overlay dimmers #18750 - "fix(opencode): use themed TUI overlay dimmers"

  3. PR fix(tui): use theme-aware color for dialog overlay on system theme #14686 - "fix(tui): use theme-aware color for dialog overlay on system theme"

These PRs appear to be addressing the same or very similar issues—making dialog and sidebar overlay backgrounds themeable instead of using hardcoded colors. You should check the status and implementation details of PR #23024 in particular, as it seems to be the most recent related attempt.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@jnslmk
Copy link
Copy Markdown
Author

jnslmk commented Apr 30, 2026

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicates Found

Based on the search results, there are several related PRs addressing similar overlay theming issues:

1. **PR [fix(tui): use theme background color for dialog/sidebar overlays #23024](https://github.com/anomalyco/opencode/pull/23024)** - "fix(tui): use theme background color for dialog/sidebar overlays"
   
   * [fix(tui): use theme background color for dialog/sidebar overlays #23024](https://github.com/anomalyco/opencode/pull/23024)
   * Directly addresses the same overlay background theming for dialog and sidebar elements

2. **PR [fix(opencode): use themed TUI overlay dimmers #18750](https://github.com/anomalyco/opencode/pull/18750)** - "fix(opencode): use themed TUI overlay dimmers"
   
   * [fix(opencode): use themed TUI overlay dimmers #18750](https://github.com/anomalyco/opencode/pull/18750)
   * Earlier attempt at making TUI overlays themeable

3. **PR [fix(tui): use theme-aware color for dialog overlay on system theme #14686](https://github.com/anomalyco/opencode/pull/14686)** - "fix(tui): use theme-aware color for dialog overlay on system theme"
   
   * [fix(tui): use theme-aware color for dialog overlay on system theme #14686](https://github.com/anomalyco/opencode/pull/14686)
   * Addresses dialog overlay theming with system theme awareness

These PRs appear to be addressing the same or very similar issues—making dialog and sidebar overlay backgrounds themeable instead of using hardcoded colors. You should check the status and implementation details of PR #23024 in particular, as it seems to be the most recent related attempt.

The other approaches derive the overlay color from existing theme colors but still include a fixed alpha value. The problem I'm addressing in the linked issue does not get solved by them.

An alternative approach could be to handle the RGB and alpha channels separately and allow only theming the RGB and/or alpha part of the the color.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Make dialog and sidebar overlay backgrounds themeable

1 participant