Skip to content

fix(theme): use terminal-default background instead of hardcoded Black (#586)#601

Closed
merchloubna70-dot wants to merge 2 commits into
Hmbown:mainfrom
merchloubna70-dot:fix/color-theme-586
Closed

fix(theme): use terminal-default background instead of hardcoded Black (#586)#601
merchloubna70-dot wants to merge 2 commits into
Hmbown:mainfrom
merchloubna70-dot:fix/color-theme-586

Conversation

@merchloubna70-dot

Copy link
Copy Markdown

Closes #586.

Root cause: Background and border colors were hardcoded to Color::Black, breaking display on light terminals and custom themes.

Fix: Replace Color::Black with Color::Reset for background elements so the TUI inherits the user's terminal background color.

Implemented using deepseek exec --model deepseek-v4-flash. 🐋

Hmbown#586)

Replace hardcoded Color::Black background with Color::Reset so the TUI
respects the user's terminal background color. Fixes display on light
terminals and custom themes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the TUI rendering logic to use the terminal's default background color (Color::Reset) when clearing the screen. While this is a positive change, feedback indicates it is incomplete because other UI components, such as the main body and header, still use hardcoded background colors that override the terminal's default. It is recommended to apply Color::Reset to these components as well to ensure a consistent look.

Comment thread crates/tui/src/tui/ui.rs
// Clear entire area with background color
let background = Block::default().style(Style::default().bg(app.ui_theme.header_bg));
// Clear entire area with terminal default background
let background = Block::default().style(Style::default().bg(Color::Reset));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This change is a good step towards respecting the terminal's theme, but it seems incomplete as other parts of the UI still use hardcoded background colors, making this fix only partially effective.

  1. Main Body Background: On lines 4607-4609, the main body area (chunks[1]) is filled with palette::DEEPSEEK_INK. This overrides the terminal's default background for the largest part of the UI.
  2. Header Background: The HeaderWidget is constructed with app.ui_theme.header_bg on line 4586, which is then used as its background color. This also overrides the terminal's default background.

To fully address the issue described in the pull request, you might want to consider using Color::Reset in these places as well, or removing the explicit background setting to let the initial clear show through.

For example, for the body:

// crates/tui/src/tui/ui.rs:4607-4609
Block::default()
    .style(Style::default().bg(Color::Reset))
    .render(chunks[1], f.buffer_mut());

And for the header, you could consider passing Color::Reset to HeaderData::new instead of app.ui_theme.header_bg.

kibuniverse pushed a commit to kibuniverse/DeepSeek-TUI that referenced this pull request May 5, 2026
…bown#601)

Follow-up to Hmbown#601 — Gemini review identified the fix as incomplete.
Replaces ALL hardcoded Color::Black backgrounds with Color::Reset across
10 UI files: sidebar, session_picker, model_picker, provider_picker,
command_palette, pager, plan_prompt, user_input, deepseek_theme, ui.

Implemented using `deepseek exec --model deepseek-v4-flash`. 🐋
MMMarcinho pushed a commit to MMMarcinho/DeepSeek-TUI that referenced this pull request May 6, 2026
…bown#601)

Follow-up to Hmbown#601 — Gemini review identified the fix as incomplete.
Replaces ALL hardcoded Color::Black backgrounds with Color::Reset across
10 UI files: sidebar, session_picker, model_picker, provider_picker,
command_palette, pager, plan_prompt, user_input, deepseek_theme, ui.

Implemented using `deepseek exec --model deepseek-v4-flash`. 🐋
@Hmbown Hmbown closed this May 6, 2026
@Hmbown Hmbown reopened this May 6, 2026
@Hmbown

Hmbown commented May 7, 2026

Copy link
Copy Markdown
Owner

Closing as superseded by current main.

The main render() background is already Block::default().style(Style::default().bg(Color::Reset)) on origin/main at crates/tui/src/tui/ui.rs:4892, which is the same fix as your diff and resolves #586 (terminal-default background instead of Color::Black).

The additional crates/tui/src/tui/context_menu.rs change in this PR — dropping palette::SURFACE_ELEVATED and switching TEXT_SOFTTEXT_MUTED — was a separate styling decision. The maintainer kept the elevated background for the context menu intentionally, so we'll leave that one out for now.

Closing #601 as integrated/superseded for the original #586 issue.

@Hmbown Hmbown closed this May 7, 2026
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.

The background and menu color seemingly wierd

2 participants