Skip to content

fix(ui): apply themed background to input area and app surface#2182

Merged
esengine merged 1 commit into
esengine:mainfrom
HUQIANTAO:fix/theme-background-surfaces
May 29, 2026
Merged

fix(ui): apply themed background to input area and app surface#2182
esengine merged 1 commit into
esengine:mainfrom
HUQIANTAO:fix/theme-background-surfaces

Conversation

@HUQIANTAO

Copy link
Copy Markdown
Contributor

Summary

  • Apply SURFACE.bg to the root App layout Box so the entire UI renders on the theme's background instead of the terminal's default
  • Apply SURFACE.bgInput to the PromptInput and ComposerArea wrappers so the input area has a distinct themed surface
  • On terminals whose default background differs from the theme (e.g. iTerm), this fixes: input text blending into the background, theme surface colors being invisible, and faint text disappearing

Changes

  1. src/cli/ui/App.tsx — merged SURFACE import, added backgroundColor={SURFACE.bg} to root layout Box
  2. src/cli/ui/ComposerArea.tsx — added SURFACE import, added backgroundColor={SURFACE.bgInput} to outer composer wrapper
  3. src/cli/ui/PromptInput.tsx — added backgroundColor={SURFACE.bgInput} to the bordered input Box (SURFACE was already imported)

Test plan

  • Launch CLI in iTerm (or any terminal with non-theme default background) — input area should have a distinct darker background
  • Text should be clearly readable against the themed surface
  • Switch themes with /theme — backgrounds should change accordingly
  • Border, placeholder, and faint text should remain visible

The theme system defines SURFACE.bg and SURFACE.bgInput but no
component applied them — the entire UI rendered on the terminal's
default background, causing:
- Input text invisible when terminal bg differs from theme
- No visual separation between card stream and input area
- Theme surface colors completely unused

Add backgroundColor to three layout containers:
- App root Box → SURFACE.bg (app canvas)
- ComposerArea wrapper → SURFACE.bgInput (input dock)
- PromptInput bordered Box → SURFACE.bgInput (input field)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Clean, small theming change — applies the theme's surface colors at the Ink-Box level: SURFACE.bg on the root app row and SURFACE.bgInput on the composer/prompt-input boxes. Unlike #2223's OSC 11 approach, this only paints the app's own rendered region (no terminal-state mutation to restore), so it's self-contained and safe. Tokens exist for every theme. I approved the workflow run; good to merge once CI is green. Note it's complementary to #2223 (in-app box bg vs actual terminal bg) — you may want only one depending on the look you're after, but they don't conflict.

@esengine esengine merged commit e3b31be into esengine:main May 29, 2026
4 checks passed
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.

2 participants