Skip to content

feat(cli): detect terminal theme via OSC 11#268

Merged
emal-avala merged 13 commits into
mainfrom
feat/osc11-system-theme
May 4, 2026
Merged

feat(cli): detect terminal theme via OSC 11#268
emal-avala merged 13 commits into
mainfrom
feat/osc11-system-theme

Conversation

@emal-avala
Copy link
Copy Markdown
Member

@emal-avala emal-avala commented May 4, 2026

Summary

  • Add CLI-only OSC 11 background detection with a DA1 sentinel, BT.709 luminance classification, TTY gating, a 1s timeout, and inherited env override support.
  • Route auto theme resolution through the cached terminal query while preserving the existing theme palette implementation.
  • Cover OSC parser variants, malformed replies, luminance boundaries, and simulated query I/O.

Test plan

  • cargo check --all-targets (GitHub Actions CI run 943)
  • cargo test --all-targets (GitHub Actions CI run 943, Ubuntu + Windows)
  • cargo clippy --all-targets -- -D warnings (GitHub Actions CI run 943)
  • cargo fmt --all -- --check (GitHub Actions CI run 943)
  • Added parser/luminance/simulated-I/O test coverage for the new terminal query module

Local cargo commands were not run because the local sandbox wrapper fails before shell startup.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25947ec131

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/cli/src/ui/terminal_query.rs Outdated
@emal-avala emal-avala merged commit 044fd35 into main May 4, 2026
14 checks passed
@emal-avala emal-avala deleted the feat/osc11-system-theme branch May 4, 2026 08:04
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