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
This report analyzes console output patterns across all non-test Go files in pkg/, focusing on fmt.Print*, the console package, Lipgloss styling, and Huh form usage.
Key Metrics
Category
Count / Status
Files with raw fmt.Print*
3
Files using console.* helpers
widespread
Lipgloss usage
concentrated in pkg/console/, pkg/styles/, pkg/logger/
Huh usage
pkg/console/ wrappers + interactive CLI flows
Critical Bug 🐛
Double success prefix in pkg/cli/run_interactive.go:100:
Standardize raw stdout writes — pkg/cli/status_command.go, logs_report.go, view_command.go: prefer explicit fmt.Fprint(os.Stdout, ...) with a comment, or route through console helpers
Add spacing helpers — reduce repeated fmt.Fprintln(os.Stderr, "") patterns by adding a console.Spacing() helper
Document output layers formally:
console.Format* → semantic user messages
console.Render* → structured/plain rendering
direct fmt.Fprint(os.Stdout, ...) → raw command output
pkg/console/render.go emits markdown-like headings/bullets via raw fmt.Fprintf while other output uses console.Format*. These are parallel formatting systems. Treat RenderStruct as a serialization layer and document it as such.
Repeated blank-line management
Multiple files manually emit fmt.Fprintln(os.Stderr, "") for spacing:
pkg/cli/run_interactive.go:78-80, 99-103
pkg/cli/outcomes_history.go:171
pkg/cli/mcp_inspect.go (many locations)
Raw fmt.Print without writer intent
pkg/cli/view_command.go: fmt.Print(output) — no semantic layer
Strong: adaptive colors, TTY detection, LightDark usage in Huh theme, tree rendering styles in mcp_inspect.go.
Minor concern:pkg/logger/logger.go:128,141 — lipgloss.Fprintf without explicit TTY/color gating. If debug logs are redirected and DEBUG_COLORS is set, ANSI may leak.
Huh Form Usage Quality
Overall: good. Shared pkg/console/prompt_form.go wrapper ensures theme and accessibility. TTY fallbacks exist. Password masking used correctly. Verdict: consistent usage.
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.
-
Overview
This report analyzes console output patterns across all non-test Go files in
pkg/, focusing onfmt.Print*, theconsolepackage, Lipgloss styling, and Huh form usage.Key Metrics
fmt.Print*console.*helperspkg/console/,pkg/styles/,pkg/logger/pkg/console/wrappers + interactive CLI flowsCritical Bug 🐛
Double success prefix in
pkg/cli/run_interactive.go:100:FormatSuccessMessagealready prepends✓, so the output renders as✓ ✓ Workflow dispatched successfully!. Remove the manual prefix.Recommendations
pkg/cli/run_interactive.go:100: change"✓ Workflow dispatched successfully!"→"Workflow dispatched successfully!"pkg/cli/status_command.go,logs_report.go,view_command.go: prefer explicitfmt.Fprint(os.Stdout, ...)with a comment, or route through console helpersfmt.Fprintln(os.Stderr, "")patterns by adding aconsole.Spacing()helperconsole.Format*→ semantic user messagesconsole.Render*→ structured/plain renderingfmt.Fprint(os.Stdout, ...)→ raw command outputpkg/logger/logger.go:128,141useslipgloss.Fprintfwithout explicit TTY checkDetailed Findings
Good Patterns ✅
pkg/console/console.go:30-40,197-268pkg/styles/theme.go:67-107,137-206with light/dark variants and Windows background probe avoidancepkg/console/prompt_form.go:12-36— all Huh forms get theme + accessibility centrallypkg/styles/huh_theme.go:13-74usinglipgloss.LightDark(...)appropriatelypkg/console/confirm.go:23-27,pkg/console/list.go:28-32,pkg/cli/interactive.go:111-113pkg/cli/compile_schedule_calendar.go:198-217Inconsistencies / Anti-patterns⚠️
Duplicate formatting responsibility
pkg/console/render.goemits markdown-like headings/bullets via rawfmt.Fprintfwhile other output usesconsole.Format*. These are parallel formatting systems. TreatRenderStructas a serialization layer and document it as such.Repeated blank-line management
Multiple files manually emit
fmt.Fprintln(os.Stderr, "")for spacing:pkg/cli/run_interactive.go:78-80,99-103pkg/cli/outcomes_history.go:171pkg/cli/mcp_inspect.go(many locations)Raw
fmt.Printwithout writer intentpkg/cli/view_command.go:fmt.Print(output)— no semantic layerpkg/cli/status_command.go:fmt.Print(console.RenderStruct(statuses))pkg/cli/logs_report.go:fmt.Print(console.RenderStruct(data))Lipgloss Best-Practice Adherence
Strong: adaptive colors, TTY detection,
LightDarkusage in Huh theme, tree rendering styles inmcp_inspect.go.Minor concern:
pkg/logger/logger.go:128,141—lipgloss.Fprintfwithout explicit TTY/color gating. If debug logs are redirected andDEBUG_COLORSis set, ANSI may leak.Huh Form Usage Quality
Overall: good. Shared
pkg/console/prompt_form.gowrapper ensures theme and accessibility. TTY fallbacks exist. Password masking used correctly. Verdict: consistent usage.References: §29321202293
Beta Was this translation helpful? Give feedback.
All reactions