Skip to content

Improve user message contrast in the CLI TUI #15736

Closed as duplicate
Closed as duplicate

Description

@de-monkey-v

What variant of Codex are you using?

CLI

What feature would you like to see?

User messages in the CLI TUI can be hard to distinguish from Codex responses when the terminal theme renders both with nearly the same foreground and background colors.

A small but high-impact improvement would be to render user messages with a stronger background panel so they remain easy to visually scan in the transcript.

A good default would be:

  • strengthen the user-message background blend when the terminal background is known
  • use an explicit gray fallback panel when terminal background detection is unavailable
  • apply the same behavior in both codex-rs/tui and codex-rs/tui_app_server

This is narrower than full theme customization, but it materially improves readability immediately.

Additional information

This seems related to #2020, but it is a more targeted usability fix that does not require a full light/dark theme system.

I have a working branch with the change here:

  • de-monkey-v:gyu/tui-user-message-contrast

The branch updates:

  • codex-rs/tui/src/style.rs
  • codex-rs/tui_app_server/src/style.rs
  • related TUI snapshots

Local validation for that branch:

  • just fmt
  • cargo test -p codex-tui --lib
  • cargo test -p codex-tui-app-server --lib
  • ./tools/argument-comment-lint/run.sh

If useful, I can also turn that branch into a patch or follow any preferred contribution path for repos with collaborator-only PR creation.

Activity

  1. added
    enhancement
    CLI
    TUI
    on Mar 25, 2026
  2. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor
  3. removed
    CLI
    on Mar 25, 2026
  4. 0xble commented on Apr 11, 2026

    @0xble

    I implemented this in a fork, and it helped with exactly the readability problem described here.

    The two changes that made the difference were:

    • when terminal background detection is unavailable, don't fall back to no panel background; use a stable shaded fallback surface instead
    • when COLORFGBG is available, use it only to decide dark vs light fallback, not as the exact panel RGB

    Using the raw queried RGB directly still looked wrong under mosh and some remote-terminal paths. Using it only as a theme classifier got the panel colors much closer to normal Codex rendering.

    Fork-local reference:

    This still feels a lot narrower than full theming. It's basically just making shaded user/composer surfaces degrade predictably when palette detection is partial or missing.

  5. etraut-openai commented on Oct 13, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Closing in favor of #8782 for distinguishing user messages from assistant output in the transcript. The stronger background and terminal-detection fallback here are useful design details for that issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions