Skip to content

Fix #322: propagate COLORFGBG to tmux sessions for light theme#323

Draft
asheshgoplani wants to merge 3 commits intomainfrom
fix/322-light-theme-colorfgbg
Draft

Fix #322: propagate COLORFGBG to tmux sessions for light theme#323
asheshgoplani wants to merge 3 commits intomainfrom
fix/322-light-theme-colorfgbg

Conversation

@asheshgoplani
Copy link
Owner

Summary

  • Propagates COLORFGBG environment variable to tmux sessions so terminal-aware tools (Codex, vim, etc.) correctly detect light/dark theme
  • Sets COLORFGBG both as a command-line export (for the initial process) and via tmux set-environment (for subsequent shells/windows)
  • Updates COLORFGBG in all running sessions on live theme change (settings panel + system theme auto-detection)
  • Prefers the parent terminal's exact COLORFGBG value when it matches the resolved theme direction

Test plan

  • Start Codex session with light theme configured: verify no dark background bars in preview
  • Attach to Codex session in light theme: verify no dark input background
  • Switch theme from dark to light in settings: verify new sessions render correctly
  • Verify dark theme still works as before (no regression)

Fixes #322

…nup)

Archive milestone v1.2 shipped 2026-03-07 with v0.24.0:
- 4 phases (7-10), 8 plans, 12 requirements complete
- Phase dirs archived to milestones/v1.2-phases/
- ROADMAP.md collapsed, REQUIREMENTS.md archived
- PROJECT.md evolved, RETROSPECTIVE.md created

Committed by Ashesh Goplani
Tools like Codex detect terminal light/dark theme via the COLORFGBG
environment variable. When running inside agent-deck's tmux sessions,
this variable was not propagated, causing tools to default to dark
theme rendering even when agent-deck was configured for light theme.

Changes:
- Add COLORFGBG export to buildEnvSourceCommand() so the initial
  process in every tmux session inherits the correct theme hint
- Set COLORFGBG via tmux set-environment on session Start() so
  subsequent shells/windows in the session also inherit it
- Propagate COLORFGBG to all running sessions on live theme change
  (settings panel and system theme auto-detection)
- Prefer parent terminal's COLORFGBG when it matches the resolved
  theme direction, to preserve terminal-specific nuance

Fixes #322

Committed by Ashesh Goplani
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.

light theme: Codex preview and live session render dark background incorrectly

1 participant