Skip to content

Conversation

@sei40kr
Copy link

@sei40kr sei40kr commented Dec 13, 2025

Summary

Adds new style configuration options to allow users to customize the appearance of menus, command logs, and UI elements, providing finer control similar to Magit's transient face system.

New Style Options

Menu styles (style.menu.*):

  • heading - Menu titles and section headings (e.g., "Commit", "Arguments")
  • key - Keybinding display (e.g., "-a", "c", "q/esc")
  • active_arg - Active argument values (e.g., "--all", "--interactive")
  • inactive_arg - Inactive argument values

Message styles:

  • info_msg - Info messages and command prompts (e.g., "$ ", "Running: ")
  • error_msg - Error messages
  • command - Command text in logs (e.g., "git status")

UI element styles:

  • separator - Section separator lines
  • prompt - Prompt text and separators

Technical Changes

  • Fixed layout_line in src/ui.rs to properly merge line.style with span.style, ensuring Line::styled works correctly throughout the application
  • Updated all configuration structs to support the new style options
  • Updated 132 snapshot tests - all changes are only to styles_hash values which reflect the new style configurations

Snapshot Test Changes

All 132 snapshot test updates only change the styles_hash line (from old hash → new hash), confirming that:

  • No visual output has unexpectedly changed
  • Only the style configuration hash has been updated to reflect the new style options
  • All rendering behavior remains functionally identical

Test Plan

  • All existing tests pass (297 tests)
  • Menu styles apply correctly to headings, keys, and arguments
  • Message styles apply correctly to info/error messages and commands
  • UI element styles apply correctly to separators and prompts
  • Manual testing with Tokyo Night theme
  • Verified snapshot changes are hash-only updates

🤖 Generated with Claude Code

Add new style configuration options to allow users to customize the
appearance of menus, command logs, and UI elements:

- Menu styles: heading, key, active_arg, inactive_arg
- Message styles: info_msg, error_msg, command
- UI element styles: separator, prompt

This provides users with finer control over the UI appearance similar
to Magit's transient face system.

Also fixes layout_line to properly merge line.style with span.style,
ensuring Line::styled works correctly throughout the application.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
altsem
altsem previously approved these changes Dec 13, 2025
Copy link
Owner

@altsem altsem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good!

@altsem altsem enabled auto-merge (rebase) December 13, 2025 10:20
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
auto-merge was automatically disabled December 13, 2025 10:59

Head branch was pushed to by a user without write access

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.

2 participants