Skip to content

CAMEL-23934: Fix light theme colors in TUI#24529

Merged
davsclaus merged 16 commits into
mainfrom
fix/CAMEL-23934
Jul 8, 2026
Merged

CAMEL-23934: Fix light theme colors in TUI#24529
davsclaus merged 16 commits into
mainfrom
fix/CAMEL-23934

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Summary

Claude Code on behalf of davsclaus

  • Route all hardcoded ANSI colors through CSS tokens so new themes can be added by writing a single .tcss file
  • Add 12 new CSS tokens: label, change, search-match, mnemonic, and 8 diagram-* tokens for theme-aware diagram colors
  • Standardize key-value label styling to Theme.muted() across all tabs
  • Add Theme.markdownStyles() for theme-aware MarkdownView heading/code/link colors
  • Add #mnemonic CSS token with bold+underline for tab bar and menu keyboard shortcuts
  • Show tab icons in the Go To popup with mnemonic-styled shortcut keys
  • Make DiagramColors theme-aware (borders, route IDs, EIP colors all resolve from CSS)
  • Add theme token validation at startup with clear error messages for missing tokens
  • Add theme.md reference documentation for all CSS tokens

Test plan

  • All 569 TUI tests pass
  • Build succeeds with mvn install -DskipTests
  • Visual check: verify all tabs readable on both dark and light theme (Ctrl+T to toggle)
  • Visual check: diagram colors readable on light theme
  • Visual check: Go To popup shows icons and underlined shortcut keys

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

🤖 Generated with Claude Code

davsclaus and others added 16 commits July 8, 2026 11:29
Replace ~260 hardcoded Color.YELLOW/WHITE/DARK_GRAY usages with
semantic CSS tokens resolved via Theme.java so that adding a new
color theme only requires a new .tcss file with no Java changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Replace BRIGHT_GREEN in throughput sparkline with plain GREEN to match
memory tab gauge. Replace Color.GREEN and Color.LIGHT_RED in history
section titles (Body, Headers, Properties, Variables) and status
indicators with Theme.success() and Theme.error() for better light
theme readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Replace BRIGHT_GREEN with plain GREEN for endpoint direction
indicators and chart elements for better light theme readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Replace Color.WHITE with Theme.baseFg() for property values so they
are readable on both dark and light backgrounds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
White text is invisible on light theme backgrounds. Replace all
~45 semantic Color.WHITE usages across 15 files with Theme.baseFg()
which resolves to the appropriate foreground per active theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…ss()/error()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…ectionBg()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…okens

Replace Color.CYAN, Color.RED, Color.MAGENTA, Color.LIGHT_MAGENTA,
Color.GRAY, and Color.BLUE with Theme.accent(), Theme.error(),
Theme.notice(), Theme.muted(), and other semantic tokens. Consolidate
MetricsTab metric type palette to use existing Theme tokens. Update
SearchHighlighter to use Theme.searchMatch(). Clean up unused Color
imports across 47 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Consolidate mcp-active/mcp-idle/mcp-down into existing
success/muted/error semantic tokens since they mapped to
identical colors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Validate all 27 CSS tokens on stylesheet load so missing tokens
fail fast instead of silently falling back. Replace remaining
hardcoded Color.rgb brand orange with Theme.accent() in
CamelCatalogTui, CamelMonitor, HttpTab, and SourceViewer.
Add theme.md reference documenting all tokens for theme authors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…oss all tabs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…shortcuts

- Add Theme.markdownStyles() for theme-aware MarkdownView heading/code/link
  colors and apply to all 5 MarkdownView usages (Help, AI, CVE, Endpoints, Doc)
- Wrap MetricsTab empty state in bordered panel for visual consistency
- Style tab bar key shortcuts (1-9, 0) with Theme.hintKey() so they stand out
  on light theme — primaryTabHeader now returns styled Span[] instead of String
- Use Theme.hintKey() for More dropdown mnemonic keys

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-plugin-tui

🔬 Scalpel shadow comparison — Scalpel: 2 tested, 1 compile-only — current: 2 all tested

Maveniverse Scalpel detected 3 affected modules (current approach: 2).

⚠️ Modules only in Scalpel (1)
  • camel-launcher

Skip-tests mode would test 2 modules (1 direct + 1 downstream), skip tests for 1 (generated code, meta-modules)

Modules Scalpel would test (2)
  • camel-jbang-plugin-tui
  • camel-launcher-container
Modules with tests skipped (1)
  • camel-launcher

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (3 modules)
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: Launcher
  • Camel :: Launcher :: Container

⚙️ View full build and test results

@davsclaus davsclaus merged commit 5cd1ec7 into main Jul 8, 2026
5 checks passed
@davsclaus davsclaus deleted the fix/CAMEL-23934 branch July 8, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant