Skip to content

feat(tui): allow the command palette background to differ from other dialogs - #52261

Open
hope-999 wants to merge 2 commits into
anomalyco:v2from
hope-999:command-palette-background
Open

hope-999 wants to merge 2 commits into
anomalyco:v2from
hope-999:command-palette-background

Conversation

@hope-999

Copy link
Copy Markdown

Issue for this PR

Closes

#50901 — allow the command palette background to differ from other dialogs

Type of change

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

What does this PR do?

Fixes #50901.
The command palette previously shared the dialog surface with every other dialog. This meant that themes with transparent dialogs could not give the command palette its own background without also making all other dialogs opaque.
This change adds an optional palette theme surface. The command palette opens using this surface, while other dialogs continue to use dialog. If a theme does not define @palette, it falls back to the existing @dialog surface, so existing themes keep their current appearance.
Theme authors can now configure it like this:
"@palette": {
"background": {
"base": "#202040"
}
}

test file:
palette-test.json

How did you verify your code works?

  • Ran the Command Palette test:
    bun test test/cli/tui/command-palette.test.tsx
  • Ran the theme resolution tests:
    bun test test/theme/v2/resolve.test.ts
  • Ran TUI and theme typechecks.
  • Ran the full repository checks before pushing:
    bun run check
  • Manually tested a custom theme with @palette.background.base set to a bright color. The Command Palette used the custom background, while other dialogs continued using the normal dialog background.

Screenshots / recordings

image image image

Checklist

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@hope-999
hope-999 force-pushed the command-palette-background branch from 1eb5ac4 to 36c584d Compare September 30, 2026 09:00

This branch has not been deployed

No deployments
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.

1 participant