Repository navigation
Conversation
The dashboard always painted a dark background. Auto mode now uses the terminal background first, then the system appearance, with an explicit dark or light override. Co-authored-by: Cursor <cursoragent@cursor.com>
The light background was a warm off-white that read as beige next to a light editor. Switch the light palette to pure white with VS Code Light's greys, blue accent, warning amber, and green. Co-authored-by: Cursor <cursoragent@cursor.com>
--theme auto resolved once at startup, so switching the desktop between light and dark left the palette stuck until restart. Poll the OS appearance every two seconds on a background thread and swap palettes when it changes. Only real changes are reported: the startup choice (which may come from the terminal background rather than the OS) stands until the user actually switches. Co-authored-by: Cursor <cursoragent@cursor.com>
scheme_from_apple_interface_style is only called on macOS, so gate it like its Windows and GNOME siblings. run_dashboard now takes nine arguments; allow clippy::too_many_arguments as managed_docker.rs already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
attention (3.1:1), complete (4.3:1) and dim (4.2:1 on the selected row) fell below 4.5:1. Darken them and test every light foreground against both the page and the selected-row background. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The OSC 11 query restored cooked mode after 100ms, so a slower reply over ssh, tmux or mosh arrived later as keystrokes. Follow it with DA1, which every terminal answers in order, read until that reply or a 500ms deadline, and flush pending input before restoring the terminal. Only accept an OSC 11 reply that carries its BEL or ST terminator. On Linux without WAYLAND_DISPLAY or DISPLAY, gsettings reads its in-memory backend and prints the schema default, which mapped to light. Treat that as unknown so the dashboard stays dark. The appearance watcher now stops after 5 consecutive failed lookups instead of spawning a process every 2 seconds forever. The real-TTY harness answers DA1 like a real terminal so its startup timing assertions measure the dashboard, not the query deadline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--theme auto(the default) follows the same signals as Claude Code, Codex, and Cursor Agent: the terminal background (OSC 11, thenCOLORFGBG), then the operating system appearance (macOSAppleInterfaceStyle, WindowsAppsUseLightTheme, GNOMEcolor-scheme). If none of those answer, it stays on the existing dark palette.--theme lightand--theme darkforce a palette. The light palette keeps selected text dark so a highlighted row stays readable.autoalso follows the desktop while the dashboard runs: a background thread polls the OS appearance every 2 s and swaps palettes on change. Only real changes are reported, so a dark terminal on a light desktop keeps the terminal-derived palette until the user actually switches appearance. The terminal itself cannot be re-queried (OSC 11) once the event loop owns stdin, which is why this uses the OS signal.There was no open issue for this.
Test plan
cargo test --locked --lib theme::cargo test --locked --lib ui::cargo test --locked --bin open-agent-view -- theme_defaults--theme autoand--theme light, and the original dark background for--theme dark181a1bandffffffwithin the 2 s poll, and backoavin a light terminal and a dark terminal, and confirm--theme light/--theme darkoverride bothMade with Cursor
Screenshots
Same fixture, same 110x30 terminal, real frames rendered from the binary's output.
--theme light(also whatautopicks on a light-mode Mac)--theme dark(unchanged from today)Live switch
Same
oav --theme autoprocess, same fixture, no restart. The dashboard started on a light macOS appearance, then the appearance was switched to dark while it was running. The palette changed on the next poll.Still running, macOS light
Same process after switching macOS to dark
Review follow-up
gsettingsis only consulted inside a desktop session (DISPLAY/WAYLAND_DISPLAY) and its in-memory fallback counts as unknown, so a headless ssh host stays dark.too_many_arguments, a macOS-only helper that was dead on Linux).