You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overview: gh-aw has a mature, well-architected terminal styling layer (pkg/console + pkg/styles) built on charm.land/lipgloss/v2 and charm.land/huh/v2. Consistency is high: only 2 non-test files mix raw fmt.Print* with console.* calls, and all interactive forms route through themed wrapper constructors. No direct/raw Lipgloss or Huh usage was found bypassing the shared abstractions.
Key Metrics
Metric
Result
Non-test fmt.Print* calls in pkg/
24 (22 in linter testdata fixtures / comments, 2 in pkg/cli)
Files importing pkg/console
240
Files with raw charmbracelet/lipgloss (bypassing pkg/styles)
0
Files with raw charmbracelet/huh field construction outside themed wrappers
0 (all 13 usage sites go through console.NewForm/NewSelectForm/NewInputForm/NewConfirmForm)
pkg/console/console.go centralizes all Format*Message/Format*Stderr helpers (Success, Info, Warning, Error, Progress, Prompt, Verbose, ListItem, SectionHeader) with a consistent formatXWithTTY(msg, ttyCheck, environ) pattern that always checks TTY before applying lipgloss.Style.
pkg/console/print.go wraps the formatters into Print*Message convenience functions for stdout/stderr, keeping call sites terse and consistent.
pkg/console/render.go provides reflection-based RenderStruct/table rendering driven by Go struct tags (documented in the repo's console-rendering skill) — a good pattern that avoids ad-hoc manual table formatting elsewhere.
All colors in pkg/styles/theme.go use lipgloss.AdaptiveColor/custom adaptiveColor with a hasDarkBackground probe (configureHasDarkBackground) — proper light/dark terminal adaptation rather than hardcoded ANSI colors.
Accessibility is centrally handled via IsAccessibleMode() (checks ACCESSIBLE, TERM=dumb, NO_COLOR) and threaded into every form via WithAccessible(IsAccessibleMode()) in console.NewForm.
Huh form usage evaluation
13 call sites across pkg/cli/* (interactive add/run/bootstrap/engine flows) all construct fields with huh.NewInput/NewSelect/NewMultiSelect/NewConfirm/NewText and pass them through the shared console.NewForm/NewInputForm/NewSelectForm/NewConfirmForm constructors in pkg/console/prompt_form.go — no raw huh.NewForm(...).Run() bypassing the theme/accessibility wiring was found.
pkg/styles/huh_theme.go maps the same Dracula-inspired palette (color* vars) used by theme.go's adaptive colors into huh.ThemeFunc, giving forms and static messages one visual identity — a strong "single source of truth" pattern.
Validation is used appropriately (e.g. bootstrap_profile_helpers.go, engine_secrets.go — non-empty checks, enum validation with example-driven error messages consistent with the repo's error-messages skill conventions).
Non-TTY fallback is handled explicitly: ConfirmAction/PromptSecretInput check tty.IsStderrTerminal() first and either fall back to a plain text prompt (showTextConfirm) or return an explicit "not available" error, avoiding broken interactive prompts in pipes/CI.
IsCancelled(err) correctly distinguishes user Ctrl-C/Esc abort (huh.ErrUserAborted) from real failures — good UX pattern worth reusing anywhere form.Run() errors are handled ad hoc.
Minor inconsistencies found
pkg/cli/status_command.go:288 and pkg/cli/view_command.go:168 call fmt.Print(console.RenderStruct(...)) / fmt.Print(output) directly for stdout table/timeline output, while errors/info in the same files correctly go through console.FormatInfoMessage/FormatWarningMessage + fmt.Fprintln(os.Stderr, ...). This is likely intentional (stdout is reserved for the primary structured/rendered payload so it can be piped/redirected cleanly, while diagnostics go to stderr), so it is not a bug, but worth a brief code comment confirming the stdout/stderr split is deliberate to avoid future "should this use console.Print*" confusion.
Remaining fmt.Println hits are inside linter testdata fixture files (intentionally minimal/uninstrumented sample code for static-analysis tests) and a code comment in pkg/linters/hardcodedfilepath/hardcodedfilepath.go — not production console output, no action needed.
Recommendations
No structural changes required — the existing pkg/console + pkg/styles abstraction already implements Lipgloss/Huh best practices (adaptive colors, TTY detection, accessibility mode, themed forms, cancellation handling).
Optionally add a short comment at status_command.go:288 and view_command.go:168 clarifying that stdout fmt.Print is intentional for the primary payload (vs. console.Print* for stderr diagnostics), to prevent future contributors from "fixing" this into an inconsistency.
Continue enforcing the pattern (e.g. via lint/review) that any new interactive prompt must go through console.NewForm/NewSelectForm/NewInputForm/NewConfirmForm rather than calling huh.NewForm directly, to keep theming and accessibility centralized.
No code changes were made; this is a read-only analysis.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Terminal Stylist Report: Console Output Consistency Analysis
Overview: gh-aw has a mature, well-architected terminal styling layer (
pkg/console+pkg/styles) built oncharm.land/lipgloss/v2andcharm.land/huh/v2. Consistency is high: only 2 non-test files mix rawfmt.Print*withconsole.*calls, and all interactive forms route through themed wrapper constructors. No direct/raw Lipgloss or Huh usage was found bypassing the shared abstractions.Key Metrics
fmt.Print*calls inpkg/pkg/cli)pkg/consolecharmbracelet/lipgloss(bypassingpkg/styles)charmbracelet/huhfield construction outside themed wrappersconsole.NewForm/NewSelectForm/NewInputForm/NewConfirmForm)pkg/console/terminal.go— screen/line clear,pkg/stringutil/ansi.go— ANSI stripper); both intentional, low-level, well-scopedFindings
Console formatter usage (correct patterns)
pkg/console/console.gocentralizes allFormat*Message/Format*Stderrhelpers (Success, Info, Warning, Error, Progress, Prompt, Verbose, ListItem, SectionHeader) with a consistentformatXWithTTY(msg, ttyCheck, environ)pattern that always checks TTY before applyinglipgloss.Style.pkg/console/print.gowraps the formatters intoPrint*Messageconvenience functions for stdout/stderr, keeping call sites terse and consistent.pkg/console/render.goprovides reflection-basedRenderStruct/table rendering driven by Go struct tags (documented in the repo'sconsole-renderingskill) — a good pattern that avoids ad-hoc manual table formatting elsewhere.pkg/styles/theme.gouselipgloss.AdaptiveColor/customadaptiveColorwith ahasDarkBackgroundprobe (configureHasDarkBackground) — proper light/dark terminal adaptation rather than hardcoded ANSI colors.IsAccessibleMode()(checksACCESSIBLE,TERM=dumb,NO_COLOR) and threaded into every form viaWithAccessible(IsAccessibleMode())inconsole.NewForm.Huh form usage evaluation
pkg/cli/*(interactive add/run/bootstrap/engine flows) all construct fields withhuh.NewInput/NewSelect/NewMultiSelect/NewConfirm/NewTextand pass them through the sharedconsole.NewForm/NewInputForm/NewSelectForm/NewConfirmFormconstructors inpkg/console/prompt_form.go— no rawhuh.NewForm(...).Run()bypassing the theme/accessibility wiring was found.pkg/styles/huh_theme.gomaps the same Dracula-inspired palette (color*vars) used bytheme.go's adaptive colors intohuh.ThemeFunc, giving forms and static messages one visual identity — a strong "single source of truth" pattern.bootstrap_profile_helpers.go,engine_secrets.go— non-empty checks, enum validation with example-driven error messages consistent with the repo'serror-messagesskill conventions).ConfirmAction/PromptSecretInputchecktty.IsStderrTerminal()first and either fall back to a plain text prompt (showTextConfirm) or return an explicit "not available" error, avoiding broken interactive prompts in pipes/CI.IsCancelled(err)correctly distinguishes user Ctrl-C/Esc abort (huh.ErrUserAborted) from real failures — good UX pattern worth reusing anywhereform.Run()errors are handled ad hoc.Minor inconsistencies found
pkg/cli/status_command.go:288andpkg/cli/view_command.go:168callfmt.Print(console.RenderStruct(...))/fmt.Print(output)directly for stdout table/timeline output, while errors/info in the same files correctly go throughconsole.FormatInfoMessage/FormatWarningMessage+fmt.Fprintln(os.Stderr, ...). This is likely intentional (stdout is reserved for the primary structured/rendered payload so it can be piped/redirected cleanly, while diagnostics go to stderr), so it is not a bug, but worth a brief code comment confirming the stdout/stderr split is deliberate to avoid future "should this use console.Print*" confusion.fmt.Printlnhits are inside lintertestdatafixture files (intentionally minimal/uninstrumented sample code for static-analysis tests) and a code comment inpkg/linters/hardcodedfilepath/hardcodedfilepath.go— not production console output, no action needed.Recommendations
pkg/console+pkg/stylesabstraction already implements Lipgloss/Huh best practices (adaptive colors, TTY detection, accessibility mode, themed forms, cancellation handling).status_command.go:288andview_command.go:168clarifying that stdoutfmt.Printis intentional for the primary payload (vs.console.Print*for stderr diagnostics), to prevent future contributors from "fixing" this into an inconsistency.console.NewForm/NewSelectForm/NewInputForm/NewConfirmFormrather than callinghuh.NewFormdirectly, to keep theming and accessibility centralized.No code changes were made; this is a read-only analysis.
All reactions