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
Scanned all non-test .go files under pkg/ for console output patterns (fmt.Print*, console.*, lipgloss.*, huh.*). Overall the codebase is highly consistent: 252 files use pkg/console formatters, and only a handful use raw fmt.Print* — most of those are justified.
Huh forms: all 11 interactive-prompt call sites (add_interactive_*.go, bootstrap_profile_*.go, run_interactive.go, engine_secrets.go, interactive.go) go through console.NewForm/NewInputForm/NewSelectForm/NewConfirmForm, which centrally wires styles.HuhTheme and WithAccessible(IsAccessibleMode()). No raw huh.NewForm(...) calls bypass this wrapper — good discipline.
Lipgloss: core styling is centralized in pkg/styles/theme.go (adaptive Dracula-inspired palette, light/dark aware) and pkg/console/{render,console,banner}.go. pkg/styles/huh_theme.go derives huh's theme from the same color vars as the CLI styles (single source of truth) — a good pattern worth calling out as exemplary.
TTY/pipe safety: pkg/console/console.go has isTTY()/isStderrTTY() gating plus NO_COLOR/env checks in pkg/tty/tty.go, pkg/colorwriter/colorprofile_writer.go, pkg/console/accessibility.go — styling is properly suppressed when output is redirected.
⚠️ Minor inconsistencies (raw fmt.Print* in production code)
pkg/cli/view_command.go:168 — fmt.Print(output) (output from renderUnifiedTimelineStream)
Both are benign: they print pre-rendered, already-styled content to stdout (as opposed to using console.Format*Stderr for status messages, which these files do correctly elsewhere). No change strictly required, but for full consistency these could route through a console.PrintStdout/Println-style helper if one is ever added, so all terminal writes funnel through one audited path.
pkg/linters/hardcodedfilepath/hardcodedfilepath.go — comment only (analyzer detection text, not actual output code). No action.
Remaining fmt.Print hits are inside linter testdata/ fixtures (intentional test fixtures for the analyzers) — excluded from scope, no action.
Lipgloss-specific observations
pkg/cli/compile_schedule_calendar.go and pkg/cli/engine_secrets.go use raw lipgloss.NewStyle()...Render() for small local ad-hoc formatting (calendar day labels, secret-name column padding) rather than pulling from pkg/styles. These are layout-only (Width()), not adding new colors, so they don't create inconsistency risk — but could optionally move to shared pkg/styles helpers if similar width-padding logic is needed elsewhere.
No manual ANSI escape sequences or hardcoded (non-adaptive) lipgloss.Color(...) calls were found outside the pkg/styles palette definitions — good adherence to the adaptive-color guideline.
No custom lipgloss/table usage found outside pkg/console/render.go's RenderTable; all tabular output funnels through that single formatter.
Huh-specific observations
No standalone huh.Group/huh.Form construction outside the console.NewForm wrapper family — accessibility mode (WithAccessible) and theming are applied uniformly.
No opportunities identified where a simple fmt.Scan/manual prompt exists that should be replaced by Huh — no such raw prompts were found in scope.
Recommendations
No urgent fixes required — the codebase already follows a strong single-source-of-truth pattern (pkg/styles → pkg/console → CLI commands, and pkg/styles/huh_theme.go sharing colors with theme.go).
Optional polish: consider a thin console.Print/console.Println stdout wrapper so status_command.go and view_command.go don't call fmt.Print directly, purely for auditability/grep-ability of all terminal writes.
Optional polish: if calendar/secrets column-width logic in compile_schedule_calendar.go / engine_secrets.go grows, hoist the padding style into pkg/styles for reuse.
No code changes were made; this is an advisory review only.
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.
Summary
Scanned all non-test
.gofiles underpkg/for console output patterns (fmt.Print*,console.*,lipgloss.*,huh.*). Overall the codebase is highly consistent: 252 files usepkg/consoleformatters, and only a handful use rawfmt.Print*— most of those are justified.Findings by Category
✅ Consistent usage (no action needed)
pkg/console(FormatInfoMessage,FormatErrorMessage,FormatWarningMessage,RenderTable,RenderStruct, etc.), giving uniform TTY-aware, adaptive-color output.add_interactive_*.go,bootstrap_profile_*.go,run_interactive.go,engine_secrets.go,interactive.go) go throughconsole.NewForm/NewInputForm/NewSelectForm/NewConfirmForm, which centrally wiresstyles.HuhThemeandWithAccessible(IsAccessibleMode()). No rawhuh.NewForm(...)calls bypass this wrapper — good discipline.pkg/styles/theme.go(adaptive Dracula-inspired palette, light/dark aware) andpkg/console/{render,console,banner}.go.pkg/styles/huh_theme.goderives huh's theme from the same color vars as the CLI styles (single source of truth) — a good pattern worth calling out as exemplary.pkg/console/console.gohasisTTY()/isStderrTTY()gating plusNO_COLOR/env checks inpkg/tty/tty.go,pkg/colorwriter/colorprofile_writer.go,pkg/console/accessibility.go— styling is properly suppressed when output is redirected.fmt.Print*in production code)pkg/cli/status_command.go:295—fmt.Print(console.RenderStruct(statuses))pkg/cli/view_command.go:168—fmt.Print(output)(output fromrenderUnifiedTimelineStream)Both are benign: they print pre-rendered, already-styled content to stdout (as opposed to using
console.Format*Stderrfor status messages, which these files do correctly elsewhere). No change strictly required, but for full consistency these could route through aconsole.PrintStdout/Println-style helper if one is ever added, so all terminal writes funnel through one audited path.pkg/linters/hardcodedfilepath/hardcodedfilepath.go— comment only (analyzer detection text, not actual output code). No action.Remaining
fmt.Printhits are inside lintertestdata/fixtures (intentional test fixtures for the analyzers) — excluded from scope, no action.Lipgloss-specific observations
pkg/cli/compile_schedule_calendar.goandpkg/cli/engine_secrets.gouse rawlipgloss.NewStyle()...Render()for small local ad-hoc formatting (calendar day labels, secret-name column padding) rather than pulling frompkg/styles. These are layout-only (Width()), not adding new colors, so they don't create inconsistency risk — but could optionally move to sharedpkg/styleshelpers if similar width-padding logic is needed elsewhere.lipgloss.Color(...)calls were found outside thepkg/stylespalette definitions — good adherence to the adaptive-color guideline.lipgloss/tableusage found outsidepkg/console/render.go'sRenderTable; all tabular output funnels through that single formatter.Huh-specific observations
huh.Group/huh.Formconstruction outside theconsole.NewFormwrapper family — accessibility mode (WithAccessible) and theming are applied uniformly.fmt.Scan/manual prompt exists that should be replaced by Huh — no such raw prompts were found in scope.Recommendations
pkg/styles→pkg/console→ CLI commands, andpkg/styles/huh_theme.gosharing colors withtheme.go).console.Print/console.Printlnstdout wrapper sostatus_command.goandview_command.godon't callfmt.Printdirectly, purely for auditability/grep-ability of all terminal writes.compile_schedule_calendar.go/engine_secrets.gogrows, hoist the padding style intopkg/stylesfor reuse.No code changes were made; this is an advisory review only.
All reactions