Skip to content

Add terminalBackground/terminalForeground to workspace definitions - #7985

Draft
OmarOneil wants to merge 2 commits into
manaflow-ai:mainfrom
OmarOneil:feat/workspace-terminal-background
Draft

OmarOneil wants to merge 2 commits into
manaflow-ai:mainfrom
OmarOneil:feat/workspace-terminal-background

Conversation

@OmarOneil

@OmarOneil OmarOneil commented Jul 13, 2026 •

Copy link
Copy Markdown

What

Workspace definitions in cmux.json (commands array) gain two optional keys:

{
  "name": "Barcelona Vibes",
  "cwd": "~/Vibes/Barcelona",
  "terminalBackground": "#1A1A3E",
  "terminalForeground": "#F5A623"
}

Every terminal the workspace launches gets that background/foreground — the per-workspace equivalent of iTerm profiles, useful when you run one workspace per client/brand/environment and want instant visual context.

How

Ghostty already honors per-surface OSC 11/10, and cmux already persists those across restores (#5997). This PR just delivers printf '\033]11;%s\007' '#RRGGBB' on the same path as the existing setup command. Unlike setup (first terminal only), the color command reaches every terminal pane in a layout. Colors are strict #RRGGBB (reuses WorkspaceTabColorSettings.normalizedHex), so the shell interpolation is injection-proof; invalid values fail decoding like an invalid color.

Scope / known limits (v1)

  • Launch-time terminals only — tabs/splits created later keep the global theme. Happy to extend to later surface-creation paths in a follow-up if you're open to the feature.
  • The printf is briefly visible in scrollback, same as setup.
  • Config-file only; no UI (avoids localization surface for v1).

Tests

Three decode tests added beside the existing color test in CmuxConfigTests (normalization, invalid hex throws, palette names rejected). Structured as red/green commits per CLAUDE.md. Draft PR: authored without local Xcode — relying on CI for build/test verification.

🤖 Generated with Claude Code

https://claude.ai/code/session_012ky5zNXk9QSPqvseLkqNU6


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Add per-workspace terminal colors to cmux.json via terminalBackground and terminalForeground, applied to every terminal the workspace launches for clearer visual context.

  • New Features
    • Add terminalBackground and terminalForeground on workspace definitions, strict #RRGGBB with normalization; invalid values fail decoding.
    • Deliver colors via OSC 11/10 on the same path as setup; for layouts, send to each terminal surface; without layout, prepend to startup commands.
    • Update web/data/cmux.schema.json to document the new keys.
    • Add decode tests for success and rejection cases.
    • v1 scope: launch-time terminals only (later splits/tabs keep global theme).

Written for commit e90a80b. Summary will update on new commits.

Review in cubic

OmarOneil and others added 2 commits July 13, 2026 15:15
Workspace definitions in cmux.json gain two optional keys that apply a
per-workspace terminal background/foreground color via OSC 11/10, using
the same delivery path as the existing setup command. Unlike setup, the
color command is applied to every terminal pane in a layout, not only
the first. Colors are strict #RRGGBB hex (normalized, shell-safe by
construction); invalid values fail decoding like an invalid color key.

v1 scope: launch-time terminals (first terminal + layout panes). Tabs
and splits created later keep the global theme.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ky5zNXk9QSPqvseLkqNU6
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

@OmarOneil is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d519482c-9506-4a7a-9f7b-52ea03c948c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo teamleaderleo added area: terminal Ghostty surface, rendering, scrollback, escape sequences, fonts area: settings Settings UI and the config file labels Sep 30, 2026

This branch has not been deployed

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

Labels

area: settings Settings UI and the config file area: terminal Ghostty surface, rendering, scrollback, escape sequences, fonts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants