Skip to content

Add terminal color palette option - #535

Open
rodrigomencos wants to merge 2 commits into
vercel-labs:mainfrom
rodrigomencos:feature/terminal-color-palette
Open

Add terminal color palette option#535
rodrigomencos wants to merge 2 commits into
vercel-labs:mainfrom
rodrigomencos:feature/terminal-color-palette

Conversation

@rodrigomencos

@rodrigomencos rodrigomencos commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Add an fx or terminal color palette preference to /settings
  • Let terminal themes supply colors through the default foreground, background, and ANSI color slots
  • Keep the existing fx palette as the default
  • Preserve external command and tool ANSI output

This allows terminal themes to style fx without embedding theme-specific color tables.

Design

  • The typed contract is ColorPalette { fx, terminal }
  • The preference is profile-owned and stored in ~/.fx/settings.json
  • Project .fx.json cannot set the preference
  • Palette changes update fx-owned UI and newly generated output immediately and persist across launches
  • transcript and external ANSI content remain unchanged.
  • Interactive fx and terminal-formatted fx ask use the selected palette

Verification

  • zig fmt --check src/
  • git diff --check
  • zig build
  • Focused palette, configuration, persistence, presentation-snapshot, nested-runtime, and transcript-cache tests
  • Exercised ./zig-out/bin/fx under Nushell
  • Verified live UI and new-output switching in both directions without rewriting retained output
  • Verified persistence after restarting fx
  • Verified terminal mode emits default and ANSI-16 colors
  • Verified external ANSI content remains unchanged

@rodrigomencos
rodrigomencos marked this pull request as ready for review September 1, 2026 00:10
Apply persisted palette changes immediately to live chrome and new output while preserving retained ANSI content. Snapshot presentation across active and nested runtimes, and invalidate palette-dependent transcript projections.
@rodrigomencos
rodrigomencos force-pushed the feature/terminal-color-palette branch from a08373d to 7aadcb6 Compare September 1, 2026 00:22
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