-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Labels
Description
Objective
Create a custom Huh theme in pkg/styles/huh_theme.go that maps the existing pkg/styles color palette into a huh.Theme, giving interactive forms the same Dracula-inspired visual identity as the rest of the CLI output.
Context
From the Terminal Stylist audit (discussion #21455), all 11 Huh forms use the default Huh theme. The project has a rich pkg/styles theme with adaptive colors that could be applied via huh.Theme customization for a cohesive UX.
Approach
- Create
pkg/styles/huh_theme.go - Use
huh.ThemeCharm()orhuh.ThemeBase()as the starting point and override with project-specific colors - Map
styles.ColorPrimary,styles.ColorSuccess,styles.ColorError,styles.ColorWarning, etc. to the appropriate Huh theme fields - Export a
HuhTheme()function that returns*huh.Theme - Apply the theme in
pkg/console/confirm.goandpkg/console/input.go(centralized form wrappers), and updateinteractive.go'shuh.NewForm()calls to use.WithTheme(styles.HuhTheme())
Example
// pkg/styles/huh_theme.go
func HuhTheme() *huh.Theme {
t := huh.ThemeCharm()
t.Focused.Base = t.Focused.Base.BorderForeground(ColorPrimary)
t.Focused.Title = lipgloss.NewStyle().Foreground(ColorPrimary).Bold(true)
t.Focused.ErrorMessage = lipgloss.NewStyle().Foreground(ColorError)
// ...
return t
}Files to Modify
- Create:
pkg/styles/huh_theme.go - Update:
pkg/console/confirm.go— add.WithTheme(styles.HuhTheme()) - Update:
pkg/console/input.go— add.WithTheme(styles.HuhTheme()) - Update:
pkg/cli/interactive.go— add.WithTheme(styles.HuhTheme())
Acceptance Criteria
-
pkg/styles/huh_theme.goexists with exportedHuhTheme()function - Theme uses colors from
pkg/styles(not hardcoded hex values) - All
huh.NewForm()calls inpkg/console/andpkg/cli/apply the theme -
make fmt && make lint && make test-unitpass
Generated by Plan Command for issue #discussion #21455 · ◷
- expires on Mar 19, 2026, 11:44 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.