Skip to content

Load TUI themes from bundled TOML files and drop-in directories - #110

Merged
github-actions[bot] merged 2 commits into
mainfrom
theme/file-based-registry
Aug 1, 2026
Merged

Load TUI themes from bundled TOML files and drop-in directories#110
github-actions[bot] merged 2 commits into
mainfrom
theme/file-based-registry

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

  • Bundle Forge Midnight and Forge Daylight as TOML theme files under crates/forge-tui/themes/, loaded at compile time via include_str!.
  • Add ThemeRegistry to discover custom themes from ~/.config/forge/themes/ and {workspace}/.forge/themes/ without any forge.toml configuration.
  • Switch the active theme from a fixed enum to string ids (forge-midnight, forge-daylight, system), with legacy dark/light aliases preserved for config and UI-state persistence.
  • Remove [tui.themes] palette overrides; forge.toml keeps only an optional [tui] theme preference.

Test plan

  • cargo test --package forge-config --package forge-tui --locked
  • cargo clippy --package forge-config --package forge-tui --package forge-cli --all-targets --locked -- -D warnings
  • /theme picker lists built-ins plus System (ANSI)
  • Drop a custom .toml into .forge/themes/ and confirm it appears in the picker
  • Verify theme = "light" in forge.toml still selects Forge Daylight

…ies.

Move Forge Midnight/Daylight palettes into crates/forge-tui/themes/, discover custom themes from ~/.config/forge/themes and .forge/themes, and switch the active theme to string ids while keeping forge.toml fully optional.
@github-actions
github-actions Bot enabled auto-merge (squash) August 1, 2026 09:54
@github-actions
github-actions Bot merged commit c2050ad into main Aug 1, 2026
6 checks passed
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